I'm a new in Python with Selenium. I tried to test my first python/selenium code and got an error.
from selenium import webdriver
from selenium.common.exceptions import TimeoutException
from selenium.webdriver.support.ui import WebDriverWait # available since 2.4.0
import time
# Create a new instance of the Firefox driver
driver = webdriver.Firefox
# go to the google home page
driver.get("http://www.google.com")
Here, I've got the error:
**TypeError:unbound method get() must be called with Webdriver instance as first argument (got str instance instead)**
Anybody knows how to tackle this issue? Thanks in advance!
You need ()
after webdriver.Firefox
to actually call the class's constructor and create an instance.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With