标签:
今天偶遇一个问题,运行项目时,发现这个问题:
org.openqa.selenium.WebDriverException: f.QueryInterface is not a function
Command duration or timeout: 30.17 seconds
Build info: version: ‘2.45.0‘, revision: ‘5017cb8e7ca8e37638dc3091b2440b90a1d8686f‘, time: ‘2015-02-27 09:10:26‘
System info: host: ‘BJWS145064‘, ip: ‘169.254.24.166‘, os.name: ‘Windows Vista‘, os.arch: ‘x86‘, os.version: ‘6.1‘, java.version: ‘1.6.0_11‘
Session ID: d5feee27-45bb-4a98-aa04-8ad84038e24b
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities [{platform=WINDOWS, acceptSslCerts=true, javascriptEnabled=true, browserName=firefox, rotatable=false, locationContextEnabled=true, version=36.0.1, cssSelectorsEnabled=true, databaseEnabled=true, handlesAlerts=true, nativeEvents=false, webStorageEnabled=true, applicationCacheEnabled=true, takesScreenshot=true}]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:204)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:156)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:599)
at org.openqa.selenium.remote.RemoteWebDriver.get(RemoteWebDriver.java:304)
at TestModule1.Test001.test001(Test001.java:23)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: org.openqa.selenium.WebDriverException: f.QueryInterface is not a function
Build info: version: ‘2.45.0‘, revision: ‘5017cb8e7ca8e37638dc3091b2440b90a1d8686f‘, time: ‘2015-02-27 09:10:26‘
System info: host: ‘BJWS145064‘, ip: ‘169.254.24.166‘, os.name: ‘Windows Vista‘, os.arch: ‘x86‘, os.version: ‘6.1‘, java.version: ‘1.6.0_11‘
Driver info: driver.version: unknown
at <anonymous class>.FirefoxDriver.prototype.get(file:///C:/Users/145064/AppData/Local/Temp/anonymous5488289901357885105webdriver-profile/extensions/fxdriver@googlecode.com/components/driver-component.js:10132)
at <anonymous class>.DelayedCommand.prototype.executeInternal_/h(file:///C:/Users/145064/AppData/Local/Temp/anonymous5488289901357885105webdriver-profile/extensions/fxdriver@googlecode.com/components/command-processor.js:12274)
at <anonymous class>.fxdriver.Timer.prototype.setTimeout/<.notify(file:///C:/Users/145064/AppData/Local/Temp/anonymous5488289901357885105webdriver-profile/extensions/fxdriver@googlecode.com/components/command-processor.js:603)
解决办法:
遇到这个问题多事url写的不正确
当给url填上https://之后就对啦。。。。
标签:
原文地址:http://www.cnblogs.com/fatfatdachao/p/4355813.html