How can I prevent the script from stop beign executed when it hits the timeout limit? My code looks like:
this.waitForSelector("#my_selector", function(){
//... magic code
} , null, 30000)
After reaching 30000
miliseconds it stops but there is more things to be scraped after this iteration.
The point of a timeout is to handle an non-nominal behavior (cannot connect or else...).
Your function should stop. If in your case if it shouldn't, it means that your timeout is not set accordingly to your use case, you surely needs to increase it.
The waitWhileSelector() function can take a callback in case of timeout, which would be your error handling.