I have a simple code where I click on a link and it opens up a new window. But while executing the script, single click acts as double click on the same element and 2 windows are opened.
I am using InternetExplorer driver
String baseURL = "URL_to_opened";
DesiredCapabilities cap = DesiredCapabilities.internetExplorer();
cap.setCapability(InternetExplorerDriver.NATIVE_EVENTS, false);
cap.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS,true);
WebDriver driver = new InternetExplorerDriver(cap);
driver.get(baseURL);
driver.findElement(By.xpath("Element to be clicked")).click();
When you work with
Selenium 3.4.0
,IEDriverServer 3.4.0
withIE(v 10/11)
, you may consider passing the following configuration properties throughDesiredCapabilities
Class:Sample Code Block: