I am trying to execute a really basic script which clicks a log in button in a specific page.
document.getElementsByClassName(“rc-button rc-button–secondary external-login keyclock”)[0].click();
The thing is the script is getting executed before the button appears and i am getting a button undefined . I know this because if i run the script while the page is opened already it works just fine.
My problem is that i don’t have access to files , i have access to a specific area that just has a box to enter Javascript code for that specific page.
I tried delaying the script for 30 seconds and i still get undefined.