Search
 
SCRIPT & CODE EXAMPLE
 

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
 });
Comment

PREVIOUS NEXT
Code Example
:: javascript getHours from epoch 
Javascript ::  
Javascript :: react native full screen view video player 
Javascript ::  
Javascript :: selected option using javascript 
:: jstree expend all node 
::  
Javascript :: Highest Scoring Word 
Javascript ::  
:: display text on button click react 
Javascript :: res.write in node js 
:: apollo graphql 
Javascript ::  
Javascript :: electron open dev tools 
::  
Javascript ::  
:: having written a counter with redux how does it work 
Javascript ::  
Javascript :: js similar jquery document ready 
::  
Javascript :: componentdidmount in hooks 
::  
::  
:: angular-chart.js 
:: useQuery by click 
:: odd and even in javascript 
Javascript :: listen for double click before click 
Javascript :: jquery clone object 
Javascript :: javascript filter method arrow function 
Javascript :: javascript undefined 
ADD CONTENT
Topic
Content
Source link
Name
3+5 =