【发布时间】:2017-01-31 06:52:03
【问题描述】:
我的 selenium 脚本适用于 Chromedriver 和 IEDriver 当我没有连接到 VPN 时。
但是当我尝试运行相同的脚本时当我连接到 VPN 时 仅适用于 Chromedriver , 对于 IEDriver 只需打开浏览器、最大化、获取 URL,然后 所有场景都被跳过并出现以下错误。
org.openqa.selenium.NoSuchWindowException:无法获取浏览器(警告:服务器未提供任何堆栈跟踪信息) 命令持续时间或超时:17 毫秒
注意:在调试时我注意到了,
一旦打开浏览器窗口,在 getUrl() 之后, 我试图 getCurrenturl() 并得到以下结果。 对于 IE,它提供了 initialBrowserUrl instad 的实际 Url。
IEDriver 日志:
[testng]Started InternetExplorerDriver server (32-bit)
[testng] 2.53.1.0
[testng] Listening on port 28196
[testng] Only local connections are allowed
[testng] Actual URL url : mydomain.com/XYZApplication/
[testng] getCurrenturl (driver.getCurrenturl): localhost:28196/
Chrome 驱动程序日志:
[testng] Starting ChromeDriver 2.23.409699 (49b0fa931cda1caad0ae15b7d1b68004acd05129) on port 8160
[testng] Only local connections are allowed.
[testng] test url : mydomain.com/XYZApplication/
[testng] getCurrenturl (driver.getCurrenturl) : mydomain.com/XYZApplication/
【问题讨论】:
标签: java selenium selenium-webdriver vpn selenium-iedriver