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

130
Views
Algo extraño con el valor de entrada de webElement en javascript

Recientemente estoy usando javascript para encontrar elementos web e interactuar con sitios web. Mi objetivo es hacer lo mismo que el método "sendkeys" de selenio con javascript. Y descubrí algo raro.

En el sitio web de Youtube, puedo usar este código javascript para llenar automáticamente la barra de búsqueda e investigarlo.

 document.getElementsByTagName("input")[0].value = "test"; document.getElementById("search-icon-legacy").click();

¡Y funciona bien! Youtube acepta mis términos y me redirige a la url

Pero en alguna web no funciona, a pesar de que las claves realmente están en el campo derecho, y el valor parece ser correcto en el html, pero no aparece en la url de búsqueda, por lo tanto, no puedo hacer cualquier búsqueda. Aquí está mi código con Indeed.com.

 document.getElementById("text-input-what").value = "test"; document.getElementById("text-input-where").value = "test"; document.getElementsByClassName("yosegi-InlineWhatWhere-primaryButton")[0].click();

¿Es algo de seguridad en algún sitio web? ¿He cometido un error? ¿Hay alguna otra forma de enviar claves reales con javascript? Gracias por cualquier consejo

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!