🏠 返回首頁 

Discussions » Creation Requests

Button code, for script.

§
Posted: 2021-05-20

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

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

§
Posted: 2021-05-20
Edited: 2021-05-20

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

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

§
Posted: 2021-05-20

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?

§
Posted: 2021-05-20
Edited: 2021-05-20

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

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

§
Posted: 2021-05-21

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.

§
Posted: 2021-05-21
Edited: 2021-05-21
document.querySelector('[class*="insidebtn"]').click()
or
document.querySelector('[onclick*="proverka"]').click()
§
Posted: 2021-05-21
document.querySelector('[class*="insidebtn"]').click()
or
document.querySelector('[onclick*="proverka"]').click()

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

Post reply

Sign in to post a reply.