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

124
Views
How can I access link by selenium?

Problem : can not click link which is using javascript by selenium.

tried : 1. element = driver.find_element_by_css_selector(a {href: "javascript:void(0)"} SyntaxError: invalid syntax

  1. element = driver.execute_script("javascript_:void(0)") Nothing happened.

element <a href="javascript_:void(0)" onclick="changeVis('dnskvmenu', 'dnskvtree')">「戒蘊篇」</a>

How can I access link by selenium? How can I click that link? I have found similar problem but I can not understand answer. Does anyone know the reason of this problem? Or are there other ways to access the link?

Access link by url which is javascript using selenium enter image description here

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

0

Find the element you want with nth-child, based on the div that the link is located in.

#sidebarElement a:nth-child(1)

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!