帮忙指点下吧,百度半天了也没解决问题
Starting ChromeDriver (v2.7.236900) on port 36770Exception in thread "main" org.openqa.selenium.NoSuchElementException: no such element
(Session info: chrome=53.0.2785.116)
(Driver info: chromedriver=2.7.236900,platform=Windows NT 6.1 SP1 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 10.04 seconds
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '2.47.1', revision: '411b314', time: '2015-07-30 02:56:46'
System info: host: 'lichunxiang-PC', ip: '192.168.1.120', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.7.0_02'
*** Element info: {Using=id, value=kw}
Session ID: 9411d8eb2f967f75ec7c64e757fafe2f
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities [{platform=XP, acceptSslCerts=true, javascriptEnabled=true, browserName=chrome, chrome={userDataDir=C:\Users\LICHUN~1\AppData\Local\Temp\scoped_dir13112_20521}, rotatable=false, locationContextEnabled=true, version=53.0.2785.116, takesHeapSnapshot=true, cssSelectorsEnabled=true, databaseEnabled=false, handlesAlerts=true, browserConnectionEnabled=false, webStorageEnabled=true, nativeEvents=true, applicationCacheEnabled=false, 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:206)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:595)
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:348)
at org.openqa.selenium.remote.RemoteWebDriver.findElementById(RemoteWebDriver.java:389)
at org.openqa.selenium.By$ById.findElement(By.java:215)
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:340)
at chrome.Testchrome.main(Testchrome.java:14)
已经解决了 ,一个小错误导致了一片红:$:$ 小小鸟lcx 发表于 2016-9-29 16:01
已经解决了 ,一个小错误导致了一片红
;P能发现问题不错哦! :victory: 常见原因:
1、元素定位错误
2、等待时间不够
3、没有加载页面元素
你遇到是哪个原因 解决就好 没有此元素!说明driver没有找到此元素,你看看输入的元素名称是否是对的,合法的
页:
[1]