Getting error: unhandled inspector error: {"code":-32000,"message":"Cannot navigate to invalid URL"}

0 votes

I am new to selenium and I am trying to open google using selenium. I am using

driver.get("www.google.com");

I am getting the following error:

Exception in thread "main" org.openqa.selenium.WebDriverException: unknown error: unhandled inspector error: {"code":-32000,"message":"Cannot navigate to invalid URL"}

Can someone help?

Dec 31, 2018 in Selenium by Sradha
• 1,720 points
1,666 views

1 answer to this question.

0 votes

Hey, @sradha,

The error you are getting is because you are not using https://

This won't be accepted if you don't use the http

Hence, your statement should be 

driver.get("https://www.google.com");

It will work like a charm. Hope this helps.

answered Dec 31, 2018 by Shuvodip
thanks it worked. But why dint it work earlier. Any technical reason?
Hey @Kartikl you need to mention the url in its proper syntax because get is done using an HTTP GET operation.

Related Questions In Selenium

0 votes
1 answer
+1 vote
1 answer
0 votes
1 answer
0 votes
1 answer

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,050 points
403 views
0 votes
1 answer
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,130 points
758 views
0 votes
1 answer

How to use such xpath to find web elements

It's much simpler to use: #MyDiv123 > div.super or ...READ MORE

answered Jun 14, 2018 in Selenium by Samarpit
• 5,130 points
400 views
+4 votes
1 answer
0 votes
1 answer

Getting error saying element not found in selenium

Hey @Jino, The things I figured out ...READ MORE

answered Dec 20, 2018 in Selenium by Shuvodip
237 views