|
本帖最后由 yimaotao 于 2010-12-28 09:44 编辑
我想直接用selenium 直接关掉浏览器,然后再打开浏览器,操作如下:
selenium.close()方法后再调用selenium.open("/")报了以下错误:
org.openqa.selenium.WebDriverException: Session has no driver: f05f2e41-1216-4a02-8785-f1a96fc58b3a
System info: os.name: 'Windows XP', os.arch: 'x86', os.version: '5.1', java.version: '1.6.0_11'
Driver info: driver.version: remote
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:94)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:327)
at org.openqa.selenium.firefox.FirefoxDriver.execute(FirefoxDriver.java:191)
at org.openqa.selenium.remote.RemoteWebDriver.get(RemoteWebDriver.java:137)
at org.openqa.selenium.internal.seleniumemulation.Open.handleSeleneseCommand(Open.java:36)
at org.openqa.selenium.internal.seleniumemulation.Open.handleSeleneseCommand(Open.java:22)
at org.openqa.selenium.internal.seleniumemulation.SeleneseCommand.apply(SeleneseCommand.java:30)
at org.openqa.selenium.WebDriverCommandProcessor$1.call(WebDriverCommandProcessor.java:271)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
... Removed 4 stack frames |
|