简体   繁体   中英

Using Selenium Grid to run IE tests from a linux hub

At work, we have some Selenium tests built to help test a website we are building. We need to support Firefox, Chrome and IE (both 10 and 11), and therefore the tests must run on all these browsers. We are working on setting up Selenium grid, with the hub on a linux (xubuntu to be specific) machine. However, getting the hub to run tests on our windows VM (on an external machine) is proving troublesome.

We keep getting this error:

The path to the driver executable must be set by the webdriver.ie.driver system property; for more information, see http://code.google.com/p/selenium/wiki/InternetExplorerDriver .

We have repeatedly tried adding the IEDriverServer to the webdriver.ie.driver property on both the linux machine and the windows VM using the following code to no avail:

System.setProperty("webdriver.ie.driver", details[1]);
DesiredCapabilities capability = DesiredCapabilities.internetExplorer();
driver = new RemoteWebDriver(new URL("http://localhost:4444/wd/hub"), capability);

Where details[1] is the path of the IEDriverServer. We have tried using the path on both the Linux and the Windows.

Is there any way to do this? Or are we pretty much stuck running the hub on the windows VM (which we would rather not do)?

So after 4 hours we got it working.

You have to include the IE driver, as well as the selenium-server-standalone-1.45.0.jar in the Windows PATH environment variable, and not include the "System.setProperty("webdriver.ie.driver", details[1]);" line in the test running on the linux machine, else it gets confused.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM