Running scripts on IE11 and windows 10

57 views
Skip to first unread message

ankit garg

unread,
Jun 29, 2018, 2:51:48 AM6/29/18
to seleniu...@googlegroups.com
Hi,

Can some one please help me on how to run scripts on IE-11.

String driverPath = "C:\\Softwares\\Drivers\\IEDriverServer_Win32_3.12.0\\";
System.setProperty("webdriver.ie.driver", driverPath + "IEDriverServer.exe");
DesiredCapabilities caps = DesiredCapabilities.internetExplorer();
caps.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS, true);
caps.setCapability("ignoreZoomSetting", true);
driver = new InternetExplorerDriver(caps);
//driver = new InternetExplorerDriver();
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
System.out.println("After navigation");
/*

For me browser is opening but it's not navigating to the url.

Thanks,
Ankit

c-spon...@neogov.net

unread,
Jul 1, 2018, 3:00:09 AM7/1/18
to Selenium Users
Try cleaning the cache before launching .
Local:

    var options = new InternetExplorerOptions();
    options.IntroduceInstabilityByIgnoringProtectedModeSettings = true;
    //Clean the session before launching the browser
    options.EnsureCleanSession = true;
Remote:

    capabilities = DesiredCapabilities.InternetExplorer();
    capabilities.SetCapability("ie.ensureCleanSession", true);

To Launch the browser ie11:

    var dc = DesiredCapabilities.internetExplorer()
    dc.setJavascriptEnabled(true)
    dc.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS, true)
    dc.setCapability(InternetExplorerDriver.IE_ENSURE_CLEAN_SESSION, true)
    dc.setCapability(InternetExplorerDriver.ENABLE_ELEMENT_CACHE_CLEANUP, true)

    dc.setCapability(InternetExplorerDriver.NATIVE_EVENTS, false);

    remote = new RemoteWebDriver(new URL("https://www.guru99.com/desired-capabilities-selenium.html"), dc);

This email may contain confidential and privileged material for the sole use of the intended recipient. Any unauthorized review, use, distribution or disclosure is strictly prohibited. If you are not the intended recipient, please contact the sender by reply email and delete all copies of this message.

ankit garg

unread,
Jul 2, 2018, 1:27:00 AM7/2/18
to seleniu...@googlegroups.com

Thanks above solution worked.

Regards,
Ankit

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.
To post to this group, send email to selenium-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/96550614-3939-4062-84a2-a318862ba5a0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Dev Perera

unread,
Jul 2, 2018, 1:39:17 AM7/2/18
to seleniu...@googlegroups.com
Hi Ankit,

Just replace,
with

....................
Thanks
Dev Chaminda Perera

To post to this group, send email to seleniu...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.
To post to this group, send email to selenium-users@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages