selenium.common.exceptions.InvalidArgumentException

Sumanto

I am new to selenium.

When I try to launch a new driver with below code, I get error. What to do ? I checked the driver version. Its the same as my browser.

from selenium import webdriver  
driver = webdriver.Edge()  
driver.get("www.youtube.com")

Error:

Traceback (most recent call last):
  File "C:\Users\Suman\PycharmProjects\pythonProject1\main.py", line 5, in <module>
    driver.get("www.youtube.com")
  File "C:\Users\Suman\PycharmProjects\pythonProject1\venv\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 353, in get
    self.execute(Command.GET, {"url": url})
  File "C:\Users\Suman\PycharmProjects\pythonProject1\venv\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 344, in execute
    self.error_handler.check_response(response)
  File "C:\Users\Suman\PycharmProjects\pythonProject1\venv\Lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 229, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.InvalidArgumentException: Message: invalid argument
  (Session info: MicrosoftEdge=116.0.1938.69)
Stacktrace:
    GetHandleVerifier [0x00007FF727143DB2+61490]
Shawn

Root cause: get method expects a fully qualified URL as the argument.

Change this: driver.get("www.google.com")

TO:

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

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

selenium.common.exceptions.InvalidArgumentException: Message: File not found while trying to upload image by url through selenium

selenium.common.exceptions.InvalidArgumentException: Message: invalid argument: 'using' must be a string using waits and expected conditions

solved: python: selenium.common.exceptions.InvalidArgumentException: Message: invalid argument: invalid locator

selenium.common.exceptions.InvalidArgumentException: Message: invalid argument: 'using' must be a string

selenium.common.exceptions.InvalidArgumentException: Message: invalid argument: File not found error while uploading file using Selenium Python

selenium.common.exceptions.InvalidArgumentException: Message: invalid argument error invoking get() with urls read from text file with Selenium Python

selenium.common.exceptions.InvalidArgumentException: Message: invalid argument: user data directory is already in use error with real Chrome Browser

selenium.common.exceptions.JavascriptException

selenium.common.exceptions.InvalidSelectorException

selenium.common.exceptions.InvalidSelectorException:

Python Selenium selenium.common.exceptions.StaleElementReferenceException

Selenium (Python) >> selenium.common.exceptions.NoSuchFrameException:

Python - Selenium: selenium.common.exceptions.WebDriverException

How to fix selenium.common.exceptions.NoSuchElementException?

selenium.common.exceptions.ElementNotVisibleException: Python error

selenium.common.exceptions.TimeoutException: Message:

selenium.common.exceptions.NoSuchFrameException: and text input

selenium.common.exceptions.TimeoutException Error

Selenium crashing with selenium.common.exceptions.WebDriverException: Message: newSession

Selenium "selenium.common.exceptions.NoSuchElementException" when using Chrome

Using Python Selenium getting "selenium.common.exceptions.StaleElementReferenceException" error

selenium.common.exceptions.ElementNotVisibleException: Message: element not interactable using Selenium

selenium.common.exceptions.InvalidSelectorException using Selenium in python 3.7

selenium.common.exceptions.NoSuchElementException using selenium in python 3.7

selenium.common.exceptions.InvalidSelectorException with "span:contains('string')"

Error selenium.common.exceptions.JavascriptException: Message: ReferenceError: room is not defined

selenium.common.exceptions.WebDriverException: Message: session not created exception

selenium.common.exceptions.NoSuchElementException from dynamic content

selenium.common.exceptions.WebDriverException: Message: File not found: /path/to/file