Luke Allen
Luke Allen

Reputation: 13

Basic Selenium Project Invalid Argument Error

I'm just getting into Selenium, and in my test program it's coming up with this error:

selenium.common.exceptions.InvalidArgumentException: Message: invalid argument

(Session info: chrome=83.0.4103.106)

This is all I've typed:

from selenium import webdriver

PATH = "C:\\Program Files (x86)\\chromedriver.exe"
driver = webdriver.Chrome(PATH)
driver.get("www.musiciansfriend.com")

A chrome window pops up but it only says " data:, " in the URL. It also says this:

[10692:9544:0619/154112.340:ERROR:device_event_log_impl.cc(208)] [15:41:12.340] Bluetooth: bluetooth_adapter_winrt.cc:1060 Getting Default Adapter failed.

I think it'll be some simple fix, but I can't think of it/ Selenium and chromedriver are installed and are the correct version.

Upvotes: 1

Views: 1431

Answers (3)

user13809472
user13809472

Reputation: 1

I have similar issue A chrome window pops up but it only says " data:, " in the URL. It also says invalid argument .this:Session info: chrome=83.0.4103.106. For me the strange thing is it happens only when I start tests from Bamboo server.When I start from my local on to remote machine it works fine. ChromeDriver 84.0.4147.30 is available. Try with that and let me know if it works.

Upvotes: 0

Justin Lambert
Justin Lambert

Reputation: 978

don't type url into your code please copy url from browser and paste with http

Upvotes: 0

TheManWithNoPlan
TheManWithNoPlan

Reputation: 436

Looks like selenium doesn't append https://

driver.get("https://www.musiciansfriend.com")

Upvotes: 3

Related Questions