Consider:
from selenium import webdriver
driver.get("http://www.jonessoda.com/contests/back2school")
element = driver.find_element_by_name("fname")
element.send_keys("Ben")
I just started. Will this thing work? (I would check myself, but I don't know how to debug with a web browser.)
It won't work. You need to instantiate driver
before you can use it.
from selenium import webdriver
# add this line
driver = webdriver.Firefox()
driver.get("http://www.jonessoda.com/contests/back2school")
element = driver.find_element_by_name("fname")
element.send_keys("Ben")
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