FAILED: test org.openqa.selenium.WebDriverException: unknown error: unhandled inspector error: {R
- khyati sehgal
- Oct 30, 2019
- 1 min read
FAILED: test
org.openqa.selenium.WebDriverException: unknown error: unhandled inspector error: {"code":-32603,"message":"Cannot navigate to invalid URL"}
(Session info: chrome=49.0.2623.105)
(Driver info: chromedriver=2.18.343845 (73dd713ba7fbfb73cbb514e62641d8c96a94682a),platform=Windows NT 6.1 SP1 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 180 milliseconds
Build info: version: '2.53.0', revision: '35ae25b', time: '2016-03-15 16:57:40'
System info: host: 'HSNMM-KhyatiS', ip: '10.50.33.63', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.7.0_79'
Session ID: 805809dc0b6156ce969fb10e0e95c2a5
Driver info: io.appium.java_client.android.AndroidDriver
Capabilities [{platform=ANDROID, acceptSslCerts=true, javascriptEnabled=true, browserName=chrome, chrome={}, rotatable=false, locationContextEnabled=true, mobileEmulationEnabled=false, version=49.0.2623.105, takesHeapSnapshot=true, cssSelectorsEnabled=true, databaseEnabled=false, handlesAlerts=true, browserConnectionEnabled=false, webStorageEnabled=true, nativeEvents=true, hasTouchScreen=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)
Understanding the problem statement:-
Capabilities Set [{platform=ANDROID,
acceptSslCerts=true,
javascriptEnabled=true,
browserName=chrome,
chrome={},
rotatable=false,
locationContextEnabled=true,
mobileEmulationEnabled=false,
version=49.0.2623.105,
takesHeapSnapshot=true,
cssSelectorsEnabled=true,
databaseEnabled=false,
handlesAlerts=true,
browserConnectionEnabled=false,
webStorageEnabled=true,
nativeEvents=true,
hasTouchScreen=true,
applicationCacheEnabled=false,
takesScreenshot=true}]
Error occurred:-
{"code":-32603,"message":"Cannot navigate to invalid URL"}
Remediation by digging into problem:-
The URL which I was sending dint have the protocol- HTTP , HTTPs so the URL forming was incorrect. I tried inspecting the code by debugging and putting
System.out.println(url);
Solution:
While sending URL you should concatenate http or https with the url you need to pass depending on which protocol your website supports.
("http://" + url)
Comments