Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

354
Views
how can i send ENTER/RETURN key with javascript executor code in selenium python?

Hi all i am new to python selenium, i am in the process of automating a website but unfortunately the search text box of the website does not have any buttons to click once you enter the text

things i tried

1)driver.sendkeys-not working

2)JavaScript executor - just sends the data but no clue how to send the Enter/return key

 driver.execute_script("document.getElementsByClassName('tau-search__input')[0].value ='" + var+"'");

3}Action chains class- tried to send keys but yet no result

also the search icon highlighted here is unable to send data and we can only send data by entering values and clicking on enter at the end enter image description here

there are no frames there too please help

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

Try this:

input_element = driver.find_elements_by_class_name("tau-search__input")[0]
input_element.send_keys("your_text_string_input" + Keys.ENTER)
about 4 years ago · Juan Pablo Isaza Report

0

I hope your xpath is wrong, you are pointing to the search icon not the search box. please share us the element screenshot if possible. your url is not working for us.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!