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,750 points
4,095 views
thanks, it worked.

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
2 answers

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,520 points
3,784 views
0 votes
2 answers

Problem while using InternetExplorerDriver in Selenium WebDriver

enable trusted connection  in internet explorer by ...READ MORE

answered Aug 31 in Selenium by Sri
• 2,970 points
4,766 views
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,890 points
2,742 views
0 votes
2 answers

How to use such xpath to find web elements

xpath are two types. 1) Absolute XPath:    /html/b ...READ MORE

answered Sep 2 in Selenium by Sri
• 2,970 points
3,109 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
2,676 views