On a webpage, I have a list with each result showing a button I want to automatically click. The issue is : sometimes the click makes me leave the page and brings me to another url. When this happens I just want to go back to the list (so make a "go back" on the brower) and click the next button of the list.
How would you do that ? Thanks a lot, really a lot, for your answer !
iimPlay("#click.iim"); //make a click on the first connect button, through the extension imacros
var url = iimGetLastExtract(1); // to get the current url
if (/https:\/\/www.nameofthewebsite.com\/profile/.test(url)) { window.history.back(); } else { iimPlay("#click2.iim"); // if I am still on the search result list, click on the next connect button, and so forth until all the ones on this page are done.
} </br>
It is a mix of JS and the language that the firefox extension Imacros uses.. And it doesn't work If it possible to do it all in Javascript it's even better !