I'm trying to learn selenium and I want to fill out a form and copying some tutorial . In this form there a text input with this code :
<input required="" autocomplete="off" placeholder="First Name" type="text" id="firstName" class=" mr-sm-2 form-control">
Following the tutorial this code should do it :
from selenium import webdriver as w
d=w.Chrome(executable_path="C:\\chromedriver.exe")
d.get("https://demoqa.com/automation-practice-form")
try :
d.find_element_by_id('firstName').send_keys("TEST")
except:
print('cant identify')
d.quit()
I think the problem is the find element syntax anyways what is the problem ?