Not able to run simple code on IE11 on a node using GRID
Not able to run simple code on IE11 on a node using GRID
M
Posted on 20/03/2016
Hi Guys,
I am unable to run a simple code using GRID for IE 11 browser, however i am able to run IE11 browser easily on my local machine. I have set protected modes disabled for internet security section which is a pre requisite when working with IE 11.
Please note that i was able to successfully set up a hub and a node.
Thanks in advance
Ahmed Siddiqui ################CODE######################### package test; import java.net.MalformedURLException; import java.net.URL;
//this annotation is used to fetch browser parameter from xml file when we need to run test sequentially or parallel on nodes. @SuppressWarnings("static-access") @Parameters("Browser") @Test public void SampleTest(String b) throws MalformedURLException{
DesiredCapabilities cap = null; if(b.equals("firefox")) { cap = new DesiredCapabilities().firefox(); cap.setBrowserName("firefox"); cap.setPlatform(Platform.ANY); } else if(b.equals("chrome")) { cap = new DesiredCapabilities().chrome(); cap.setBrowserName("chrome"); cap.setPlatform(Platform.ANY);
} else if(b.equals("ie")) { cap = new DesiredCapabilities().internetExplorer(); cap.setBrowserName("iexplore"); cap.setPlatform(Platform.WINDOWS);
} //making object of RemoteWebDriver RemoteWebDriver driver = new RemoteWebDriver(new URL("http://localhost:4444/wd/hub"),cap); driver.get("https://gmail.com"); }
===========ERROR======================== org.openqa.selenium.WebDriverException: The best matching driver provider org.openqa.selenium.ie.InternetExplorerDriver can't create a new driver instance for Capabilities [{ensureCleanSession=true, browserName=iexplore, version=, platform=WINDOWS}] Build info: version: '2.52.0', revision: '4c2593c', time: '2016-02-11 19:06:42' System info: host: 'BINCDV-I10167', ip: '10.2.233.55', os.name: 'Windows Server 2008 R2', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_60' Driver info: driver.version: unknown Command duration or timeout: 251 milliseconds Build info: version: '2.52.0', revision: '4c2593c', time: '2016-02-11 19:03:33' System info: host: 'BINCDV-I10167', ip: '10.2.233.55', os.name: 'Windows Server 2008 R2', os.arch: 'x86', os.version: '6.1', java.version: '1.8.0_60' Driver info: org.openqa.selenium.remote.RemoteWebDriver
M
Replied on 20/03/2016
Issue resolved. I was using iexplore instead of internet explorer in command and code.