Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

566
Vistas
H-Captcha, can't fill the token in h-captcha-response innerHTML and g-recaptcha-response innerHTML

I'm trying to bypass a Hcaptcha with 2captcha thank to selenium and 2captcha in python.

When I receive my 2captcha token, I try to fill my token in both textareas named 'h-captcha-response' and 'g-captcha-response'

But it doesn't work.

Both textareas have ids with the pattern "h-captacha-[ID]" and "g-recaptacha-[ID]"

My problem is : As soon as I want to fill the innerHTML of the textareas, it returns me an error because I can't get the 2 items correctly

driver.execute_script('''                                                                                                                                                   
     let [captcha] = arguments[document.querySelectorAll('[name="h-captcha-response"], 
     [name="g-recaptcha-response"]')].map(el => {                                                          
     el.innerHTML = captcha})''', code)

Do you know why my driver.execute_script command doesn't work ? Code is the good token for the captcha, i need to send it in the 2 textareas.

Here is the error

selenium.common.exceptions.JavascriptException: Message: javascript error: Cannot read properties of undefined (reading 'map')

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda