0

My Wordpress website can be accessed by typing localhost/wordpress in the browser. So I thought if I pass that inside driver.get() in Selenium, I'll be able to access it. But it didn't turn out the way I wanted it to and got an error.

What should I try for this?

Zero
  • 1,800
  • 1
  • 5
  • 16

1 Answers1

1

Though manually when you pass localhost/wordpress in the url bar you are able to access the My Wordpress website but while passing through get() you have to pass the fully qualified url_string. Else you will face InvalidArgumentException


Solution

You need to pass localhost/wordpress as the url: str through get()as an argument as follows:

driver.get("https://localhost/wordpress")

References

You can find a couple of relevant detailed discussions in:

undetected Selenium
  • 183,867
  • 41
  • 278
  • 352