How to make a bookmarklet that executes functions in multiple pages without clicking again?

224 views Asked by At

I am trying to run a JavaScript's code snippet from a bookmarklet.

My intention is to automate clicks and fill text boxes in order to simulate a journey through multiple pages.

Make it happening in a single page is easy, but when the first page redirects to the next one the script stops executing functions on the next page.

The code that I am using is this:

javascript:(function(){ $(“#textbox").select(), $(“#textbox").val(“my-value").change(), $(“.go-to-next-page").click(), setTimeout(function(){doThingsOnSecondPage()},2000); })();

But it seems to stop as soon as the next page is requested.

0

There are 0 answers