I am using Snippets a Chromium browser to automate a project. Starting from one URL I want to go into another URL,then wait for the page to load, and finally run more script. Is there a way to wait for the page to load in Snippets before running more code?
I have tried
window.location.replace('example.com');
sleep(3000).then(() => {
//// my code
})
and also:
window.location.replace('example.com');
document.onload = function(){
//code
};