get the following error on selenium

守給你的承諾、 提交于 2019-12-08 11:28:28

问题


I get the following error on selenium, I don't know how to fix it or what I should do,

unknown error: unhandled inspector error: {"code":-32603,"message":"Cannot navigate to invalid URL"} (Session info: chrome=29.0.1547.57) (Driver info: chromedriver=2.2,platform=Windows NT 6.1 SP1 x86_64) (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 3 milliseconds Build info: version: '2.35.0', revision: 'c916b9d', time: '2013-08-12 15:42:01' System info: os.name: 'Windows Server 2008 R2', os.arch: 'x86', os.version: '6.1', java.version: '1.7.0_04' Session ID: 6c0f76e6f67873a6318edab1d66e4ccf Driver info: org.openqa.selenium.chrome.ChromeDriver Capabilities [{platform=XP, acceptSslCerts=true, javascriptEnabled=true, browserName=chrome, chrome={chromedriverVersion=2.2}, rotatable=false, locationContextEnabled=true, version=29.0.1547.57, cssSelectorsEnabled=true, databaseEnabled=true, handlesAlerts=true, browserConnectionEnabled=false, nativeEvents=true, webStorageEnabled=true, applicationCacheEnabled=false, takesScreenshot=true}] Command duration or timeout: 2.27 seconds

please help


回答1:


It happens if you´re using relative path to open the link. You can use absolute path (starting with http://) or - if it is an internal link/button on the web - you can mapp it as WebElement and perform click() method.




回答2:


I too got this error "org.openqa.selenium.WebDriverException: unknown error: unhandled inspector error: {"code":-32000,"message":"Cannot navigate to invalid URL"}"

To remove hardcoded URL and calling a URL from a file I defined like this - ex: url="https://test.com" then I got the above error, after so many research and failures - simply I removed double quotes...it worked ex: url=https://test.com




回答3:


We managed to overcome the above error by changing the initialization Url. but now we are experiencing a bunch of new issues the latest chrome version, latest chromedriver and latest selenium versions. Everything is extremely slow and we get many timeout since than.



来源:https://stackoverflow.com/questions/18429127/get-the-following-error-on-selenium

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!