lundi 8 juillet 2019

How to locate google search bar by id with selenium and python

I'm learning selenium with python and I keep getting the following error when trying to do a google search: "Unable to locate element: [id="lst-ib"]"


driver = webdriver.Firefox()
driver.implicitly_wait(30)
driver.maximize_window()
driver.get("http://www.google.com")


search_field = driver.find_element_by_id("lst-ib")
search_field.clear()
search_field.send_keys("argentina vnl 2019")
search_field.submit()




Aucun commentaire:

Enregistrer un commentaire