Python Forum
Selenium webbrowser send entern and escape key
Thread Rating:
  • 3 Vote(s) - 2.67 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Selenium webbrowser send entern and escape key
#1
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


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.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  webbrowser not working in screen management in kivy thousif 1 1,878 Nov-25-2020, 04:02 PM
Last Post: Axel_Erfurt
  Python - control a webbrowser ARGMER 1 3,422 Oct-26-2018, 06:20 PM
Last Post: metulburr
  Error in Selenium: CRITICAL:root:Selenium module is not installed...Exiting program. AcszE 1 3,624 Nov-03-2017, 08:41 PM
Last Post: metulburr
  webbrowser ian 3 6,966 Aug-28-2017, 01:21 AM
Last Post: metulburr

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020