Selenium 无法在 Linux 上打开虚拟浏览器窗口
我正在 Maven 项目中使用 Selenium 通过 JUnit 进行用户界面测试。该项目位于运行 IEs4Linux 和 Wine 的 Linux 机器上,允许我们在 IE 中运行测试。
现在我正在使用Xming和Putty来查看虚拟浏览器窗口,我可以使用命令“ie6”打开IE窗口,并且我可以看到它在Xming中正常运行。
当使用 *iexplore 浏览器模式设置 Selenium RC 时,我在 RC 服务器窗口中看到以下内容:
INFO - Command request: getNewBrowserSession[*iexplore, http://asdfasdfasdf.com:7011/, ] on session null
INFO - creating new remote session
INFO - Allocated session asdfasdfasdfasdfasdfasdfadsf for http://asdfasdfasdf.com:7011/, launching...
INFO - Launching Embedded Internet Explorer...
INFO - Launching Internet Explorer HTA...
这是正常的,除了浏览器永远不会打开并且测试永远不会运行。使用 *iexploreproxy 或 *piiexplore,我从 RC 收到以下错误:
13:46:06.957 INFO - Got result: Failed to start new browser session: org.openqa.selenium.server.browserlaunchers.WindowsUtils$WindowsRegistryException: Problem while managing the registry, OS Version '2.6.18-164.11.1.el5', regVersion1 = null on session null
是否有任何原因 Selenium 无法使用 *iexplore 启动 IE 窗口?我会使用 *firefox 或 *chrome,但我正在测试的应用程序仅与 IE 兼容。另请注意,这些测试用例在我的本地 Windows 计算机上运行得非常好。
如果您需要更多详细信息,请告诉我。
I am using Selenium to conduct user interface tests with JUnit, in a Maven project. The project is located on a Linux box running IEs4Linux and Wine to allow us to run the tests in IE.
Right now I'm using Xming along with Putty to view the virtual browser windows, and I am able to open an IE window with the command "ie6", and I can see it functioning correctly in Xming.
When setting up the Selenium RC using the *iexplore browser mode, I get the following in the RC server window:
INFO - Command request: getNewBrowserSession[*iexplore, http://asdfasdfasdf.com:7011/, ] on session null
INFO - creating new remote session
INFO - Allocated session asdfasdfasdfasdfasdfasdfadsf for http://asdfasdfasdf.com:7011/, launching...
INFO - Launching Embedded Internet Explorer...
INFO - Launching Internet Explorer HTA...
Which is normal, except the browser never opens and the tests never run. Using *iexploreproxy or *piiexplore, I get the following error from the RC:
13:46:06.957 INFO - Got result: Failed to start new browser session: org.openqa.selenium.server.browserlaunchers.WindowsUtils$WindowsRegistryException: Problem while managing the registry, OS Version '2.6.18-164.11.1.el5', regVersion1 = null on session null
Is there any reason Selenium would fail to launch the IE window using *iexplore? I would use *firefox or *chrome but the application I am testing is only compatible with IE. Also note that these test cases run perfectly fine on my local Windows machine.
Please let me know if you need more details.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
让它工作...以防其他人尝试使用与我的类似的配置...无论出于何种原因,当使用 IEs4Linux 打开 IE6 时,您似乎无法使用 Http.proxyName 和 Http.proxyPort 设置启动服务器。 .它只会忽略它们。您必须手动打开 IE6 浏览器并自行输入代理设置(很可能是 localhost 和 4444)。
我想我会开始研究适用于 Linux 的 IE7...显然 IE6 不喜欢 Selenium 对 XPath 的使用。
Got it working...in case anybody else attempts to use a similar configuration to mine...for whatever reason it seems you cannot start up the server with the Http.proxyName and Http.proxyPort settings when using IEs4Linux to open IE6...it will just ignore them. You have to manually open the IE6 browser and enter the proxy settings yourself (most likely localhost and 4444).
I think I'll start looking into IE7 for Linux...apparently IE6 doesn't like Selenium's use of XPaths.