Jul-20-2017, 08:31 PM
(This post was last modified: Jul-20-2017, 08:32 PM by pythongeekme.)
Hi I am using Selenium webdriver. I am sending a search term into the browser to search. However, the website doesn't have a search button so I have to press enter followed by escape key to see the search results. I have done following thing but I want to know if there is a better alternative
Thank you.
wait( driver, 10 ).until( EC.visibility_of_element_located( (By.ID, "search-bar") ) ).send_keys( Keys.ENTER ) wait( driver, 10 ).until( EC.visibility_of_element_located( (By.ID, "search-bar") ) ).send_keys(Keys.ESCAPE )I am a beginner.
Thank you.