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

78
Views
Ejecutar JS con AppleScript

¡Nuevo en JS y AppleScript!

El objetivo del script es hacer clic en un botón automáticamente dentro de una página web utilizando el navegador Safari. Logré que esto funcionara correctamente usando otros métodos JS (por ejemplo document.getElementByID(IDName).click(); ), sin embargo, tengo que usar el título del botón en su lugar, ya que el ID del botón en esta página web se genera diariamente (lo que significa que el ID cambia).

He probado dentro del navegador que document.querySelector('[title="Move to Next Day"]').click(); funciona para hacer clic en el botón, pero hacer que funcione en mi script de Apple ha sido un problema.

Con mi código actual a continuación, aparece un error que dice Expected “,” or “)” but found property. para la última línea de código.

Aquí está mi guión:

 to clickID(theId) tell application "Safari" do JavaScript "document.querySelector('" & theId & "').click();" in document 1 end tell end clickID clickID('"[title="Move to Next Day"]"')
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!