我正在尝试开始一些测试,在firefox上运行非常好
所以我得到了下一个例外: IE9打开 - “这是WebDriver服务器的初始启动页面。”
在日食中:
Dec 13, 2011 4:10:48 PM org.openqa.selenium.remote.RemoteWebDriver execute
INFO: Executing: [null, newSession {"desiredCapabilities":"Capabilities [{platform=WINDOWS, ensureCleanSession=true, browserName=internet explorer, version=}]"}]
Dec 13, 2011 4:10:50 PM org.apache.http.impl.client.DefaultRequestDirector tryExecute
INFO: I/O exception (org.apache.http.NoHttpResponseException) caught when processing request: The target server failed to respond
Dec 13, 2011 4:10:50 PM org.apache.http.impl.client.DefaultRequestDirector tryExecute
INFO: Retrying request
Dec 13, 2011 4:10:50 PM org.openqa.selenium.remote.RemoteWebDriver execute
INFO: Executing: [fa123e21-3209-448a-b070-2c6d155fe490, getCurrentWindowHandle {}]
Dec 13, 2011 4:10:50 PM org.openqa.selenium.remote.RemoteWebDriver execute
INFO: Executing: [fa123e21-3209-448a-b070-2c6d155fe490, executeScript {"script":"if (window.screen) { window.moveTo(0, 0); window.resizeTo(window.screen.availWidth, window.screen.availHeight);};","args":[]}]
任何想法??? (缩放正常,还有保护模式)
答案 0 :(得分:0)
您正在尝试使用javascript最大化浏览器窗口(请参阅堆栈跟踪的最后一行),但您不在有效的网页上(IE不喜欢这样)。首先尝试导航到有效的网页,或者将基本网址设置为有效的网页,这样当您的脚本开始运行时,它就可以使用。