Discuții » Cerere de creare

Button code, for script.

§
Postat în: 20-05-2021

Hello.
Please help make the right script, for clicking on the button.

Link on part of the code: https://pastebin.com/JFsvC5Eq

§
Postat în: 20-05-2021
Editat în: 20-05-2021

All you have to do is get the element and add .click() on the end

document.querySelector("#load1822570").click()

§
Postat în: 20-05-2021

All you have to do is get the element and add .click() on the end

document.querySelector("#load1822570").click()

Yes, it works!
But only for one task :(
Because in "#load876431 " there is an identifier. And he different, for each task.
What to do in this situation?

§
Postat în: 20-05-2021
Editat în: 20-05-2021

document.querySelectorAll('[class*="insidebtn"]').forEach(el => el.click())

document.querySelectorAll('[onclick*="proverka"]').forEach(el => el.click())

§
Postat în: 21-05-2021

document.querySelectorAll('[class*="insidebtn"]').forEach(el => el.click())

document.querySelectorAll('[onclick*="proverka"]').forEach(el => el.click())

Now clicks occur on all buttons at once, \ they're there 20
Is there any way to make the click happen only on the very first button?

I can give the full page code if needed.

§
Postat în: 21-05-2021
Editat în: 21-05-2021
document.querySelector('[class*="insidebtn"]').click()

or

document.querySelector('[onclick*="proverka"]').click()
§
Postat în: 21-05-2021
document.querySelector('[class*="insidebtn"]').click()

or

document.querySelector('[onclick*="proverka"]').click()

Now everything works correctly.👍
Thank you very much!🙂

Postează un raspuns

Autentifică-te pentru a posta un răspuns.