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

181
Views
How to click this button with python & selenium - table

url of the website

enter image description here

Hey all, I just wanna click this button with python my code:

Main_page=webdriver.Chrome(options=chrome_options,service=chrome_service)
base_url="https://www.cbs.gov.il/he/Statistics/Pages/%D7%9E%D7%97%D7%95%D7%9C%D7%9C%D7%99%D7%9D/%D7%9E%D7%97%D7%95%D7%9C%D7%9C-%D7%AA%D7%90%D7%95%D7%A0%D7%95%D7%AA.aspx"
Main_page.get(base_url)
Main_page.maximize_window()
time.sleep(10)
button = Main_page.find_element(By.NAME, 'ישראל כולל יהודה ושומרון')
button.click()

i can figure it out why is not working

error: oSuchElementException: Message: no such element: Unable to locate element: {"method":"css selector","selector":"[name="ישראל כולל יהודה ושומרון"]"} (Session info: chrome=102.0.5005.63)

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

0

check this article https://www.geeksforgeeks.org/click-element-method-selenium-python/

NOTE : you can also use xpath to find elements

element = driver.find_element_by_xpath("//a[@id='link']")

NOTE : you can copy xpath from any Browser here is how to find xpath in browsers

about 4 years ago · Juan Pablo Isaza Report

0

button = Main_page.find_element(By.NAME, 'ישראל כולל יהודה ושומרון')
button.click()

you try to find elements by name , but שראל כולל יהודה ושומרון its not a valid html or xml name its an innerText of the button , try to find using xpath as i mentioned bef or find it by id

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!