Home > Software design >  How to find Search input Element with selenium using python
How to find Search input Element with selenium using python

Time:10-13

How to find Element of a Search input with selenium using python

I tried many attempts and failed.

HTML Element Code

searchBar = self.browser.find_element_by_xpath("//div[@id='__field__38__']")
searchBar.send_keys("[email protected]")

How can I find this kind of elements ?

CodePudding user response:

Please try this:

searchBar = self.browser.find_element_by_xpath("//input[@placeholder='Search by name']")
  • Related