51Testing软件测试论坛
标题:
使用SeleniumIDE能定位,到java中为什么定位不到
[打印本页]
作者:
bty5412
时间:
2017-7-29 18:19
标题:
使用SeleniumIDE能定位,到java中为什么定位不到
这个是什么意思?????
Exception in thread "main" org.openqa.selenium.NoSuchElementException: Unable to locate element: {"method":"id","selector":"J_Quick2Static"}
Command duration or timeout: 35 milliseconds
For documentation on this error, please visit:
http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '2.44.0', revision: '76d78cf', time: '2014-10-23 20:03:00'
System info: host: 'admin-PC', ip: '192.168.0.65', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.6.0_43'
Session ID: d7af0da4-96e8-477f-b45c-a358afa75dc1
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities [{platform=WINDOWS, acceptSslCerts=true, javascriptEnabled=true, browserName=firefox, rotatable=false, locationContextEnabled=true, version=33.1.1, cssSelectorsEnabled=true, databaseEnabled=true, handlesAlerts=true, nativeEvents=true, 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.findElement(RemoteWebDriver.java:352)
at org.openqa.selenium.remote.RemoteWebDriver.findElementById(RemoteWebDriver.java:393)
at org.openqa.selenium.By$ById.findElement(By.java:214)
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:344)
at day01.TestFirefox3.main(TestFirefox3.java:24)
Caused by: org.openqa.selenium.NoSuchElementException: Unable to locate element: {"method":"id","selector":"J_Quick2Static"}
For documentation on this error, please visit:
http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '2.44.0', revision: '76d78cf', time: '2014-10-23 20:03:00'
System info: host: 'admin-PC', ip: '192.168.0.65', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.6.0_43'
Driver info: driver.version: unknown
at <anonymous class>.FirefoxDriver.prototype.findElementInternal_(file:///C:/Users/ADMINI~1/AppData/Local/Temp/anonymous1510818938475279237webdriver-profile/extensions/fxdriver@googlecode.com/components/driver-component.js:9641:26)
at <anonymous class>.FirefoxDriver.prototype.findElement(file:///C:/Users/ADMINI~1/AppData/Local/Temp/anonymous1510818938475279237webdriver-profile/extensions/fxdriver@googlecode.com/components/driver-component.js:9650:3)
at <anonymous class>.DelayedCommand.prototype.executeInternal_/h(file:///C:/Users/ADMINI~1/AppData/Local/Temp/anonymous1510818938475279237webdriver-profile/extensions/fxdriver@googlecode.com/components/command-processor.js:11635:16)
at <anonymous class>.DelayedCommand.prototype.executeInternal_(file:///C:/Users/ADMINI~1/AppData/Local/Temp/anonymous1510818938475279237webdriver-profile/extensions/fxdriver@googlecode.com/components/command-processor.js:11640:7)
at <anonymous class>.DelayedCommand.prototype.execute/<(file:///C:/Users/ADMINI~1/AppData/Local/Temp/anonymous1510818938475279237webdriver-profile/extensions/fxdriver@googlecode.com/components/command-processor.js:11582:5)
作者:
掉渣饼
时间:
2017-7-30 09:48
回放时找不到那个元素,加个等待时间试试或者看看你页面上有没有iframe
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/)
Powered by Discuz! X3.2