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

182
Views
Simulating Clicking a span/div element, not working

I'm trying to make an automation tool for google classrooms to auto-submit my work for me, instead of having to go through 1-by-1 (I have more than 100 to be turned in), and I'm trying to make js press the submit work/mark as done button. I've tried with all the divs and spans, but it doesn't do anything. here's some screen shots: inspect elemet

script

alerting

mark as done the code:

var elementsArray = document.getElementsByClassName("uArJ5e TuHiFd UQuaGc Y5sE8d M9Bg4d");
alert(elementsArray[0].innerHTML);
var span = elementsArray[0];
var click = new Event('click');
span.dispatchEvent(click);

Trying to run the script makes the alert pop up, but nothing else happens. No errors appear in the console, and I'm wondering why this isn't working. Any answers would be nice, thanks.

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

0

maybe you can try span.click()

about 4 years ago · Juan Pablo Isaza Report

0

Can you try with elementsArray[0][2] instead of elementsArray[0]?

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!