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

227
Views
selenuim web driver switch_to_frame no working \ select JS context with selenuim

I am trying to execute this JS code with "selenium web driver" but I am getting an error

JS: window.hcaptcha.render = (container, params) => { window.hcaptchaCallback = params.callback };

Error: Uncaught TypeError: Cannot set properties of undefined (setting "render") at <anonymous>:1:24

the issue is that my driver \ my console is running on the wrong js context

wrong JS context

dsaddsadsa

the iframe that I need to run the code on is "captchaFrame" this is the last version of the code that I am running

try:
     driver.execute_script("window.hcaptcha.render = (container, params) => { window.hcaptchaCallback = params.callback };")
except JavascriptException:
     driver.switch_to_frame('captchaFrame')
finally:
     driver.execute_script("window.hcaptcha.render = (container, params) => {window.hcaptchaCallback = params.callback };")

but I am getting the same error, any idea how to perform this? is it possible?

about 4 years ago · Juan Pablo Isaza
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!