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')
Sign up to request clarification or add additional context in comments.

1 Comment

Thanks driver = webdriver.Chrome('/path/to/chromedriver') worked

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.