简体   繁体   English

使用Selenium Grid从Linux集线器运行IE测试

[英]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. 在工作中,我们构建了一些Selenium测试来帮助测试我们正在构建的网站。 We need to support Firefox, Chrome and IE (both 10 and 11), and therefore the tests must run on all these browsers. 我们需要支持Firefox,Chrome和IE(两者均为10和11),因此测试必须在所有这些浏览器上运行。 We are working on setting up Selenium grid, with the hub on a linux (xubuntu to be specific) machine. 我们正在使用Linux(特别是xubuntu)计算机上的集线器来设置Selenium网格。 However, getting the hub to run tests on our windows VM (on an external machine) is proving troublesome. 但是,让中心在我们的Windows VM(外部计算机)上运行测试变得很麻烦。

We keep getting this error: 我们不断收到此错误:

The path to the driver executable must be set by the webdriver.ie.driver system property; 驱动程序可执行文件的路径必须由webdriver.ie.driver系统属性设置; for more information, see http://code.google.com/p/selenium/wiki/InternetExplorerDriver . 有关更多信息,请参见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: 我们反复尝试使用以下代码将IEDriverServer添加到linux计算机和Windows VM上的webdriver.ie.driver属性中,但无济于事:

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. 其中details [1]是IEDriverServer的路径。 We have tried using the path on both the Linux and the Windows. 我们已经尝试在Linux和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)? 还是我们几乎停滞在Windows VM上运行集线器(我们宁愿不这样做)?

So after 4 hours we got it working. 因此,在4个小时后,我们开始工作了。

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]);" 您必须在Windows PATH环境变量中包括IE驱动程序以及selenium-server-standalone-1.45.0.jar,并且不包括“ System.setProperty(“ webdriver.ie.driver”),details [1 ]);” line in the test running on the linux machine, else it gets confused. 在linux机器上运行的测试中排成一行,否则会感到困惑。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在同一台机器上运行 selenium 网格集线器和节点 - Run selenium grid hub and node the same machine Selenium 网格集线器和节点来自 Java 代码 - Selenium Grid Hub and Node from Java Code 一种允许测试人员在Selenium Grid上运行测试的方法 - A way to allow testers to run tests on Selenium Grid 如何使硒RC测试在多个浏览器中运行(使用Java和Eclipse和Selenium网格) - How to make selenium RC tests run in multiple browsers (using java & eclipse & selenium grid) 在使用 Selenium Grid 时,我们如何从 Hub 机器访问 Node 机器中下载的文件? - While using Selenium Grid, How do we access downloaded file in Node machine from Hub machine? 无法通过使用Selenium grid2调用浏览器特定的节点来运行Testng测试 - Unable to run Testng tests by Invoking browser specific node using selenium grid2 从硒获取网格(集线器节点)信息 - Getting grid (hub-node)information from selenium Selenium Grid:如何以编程方式从HUB检索节点信息? - Selenium Grid: How to retrieve node information from HUB programatically? 使用Selenium WebDriver,Selenium Grid和testNG运行并行测试 - Running Parallel Tests using Selenium WebDriver, Selenium Grid and testNG 硒网格,并行运行时,测试从同一线程开始 - Selenium grid, tests start starting on the same thread when run in parallel
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM