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,760 points
10,754 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
+1 vote
4 answers
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,500 points
13,776 views
0 votes
2 answers

Problem while using InternetExplorerDriver in Selenium WebDriver

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

answered Aug 31, 2020 in Selenium by Sri
• 3,190 points
9,190 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,910 points
7,266 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 3, 2020 in Selenium by Sri
• 3,190 points
7,902 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 21, 2018 in Selenium by Shuvodip
5,543 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP