3

This is my code

from selenium import webdriver from selenium.webdriver.common.keys import Keys driver = webdriver.Chrome driver.get("http://www.python.org") 

I am getting error

Traceback (most recent call last): File "E:/codes/python/script.py", line 5, in <module> driver.get("http://www.python.org") TypeError: get() missing 1 required positional argument: 'url' 

I referred the docs but there is not much info there

    1 Answer 1

    9

    webdriver.Chrome() is constructor, not a field. It should be

    driver = webdriver.Chrome() 

    Or

    driver = webdriver.Chrome('/path/to/chromedriver') 
    1
    • 2
      Thanks driver = webdriver.Chrome('/path/to/chromedriver') worked
      – Equinox
      CommentedJan 23, 2016 at 12:01

    Start asking to get answers

    Find the answer to your question by asking.

    Ask question

    Explore related questions

    See similar questions with these tags.