Jean Pierre Waked
Jean Pierre Waked

Reputation: 123

How to find Search input Element with selenium using python

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 ?

Upvotes: 0

Views: 386

Answers (1)

Prophet
Prophet

Reputation: 33351

Please try this:

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

Upvotes: 1

Related Questions