Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Custom delay function for waitfor puppeteer

function waitFor(delay) {
    return new Promise(resolve => setTimeout(resolve, delay));
}

page.evaluate(async() => {
     //Define your waitFor function
     //Code to execute before
     await waitFor(1000);
     //Code to execute after the 1000ms time delay
 });
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Custom #delay #function #waitfor #puppeteer
ADD COMMENT
Topic
Name
8+8 =