I am trying to use puppeteer in order to fill in a form and get the results.
when the form is submitted correctly, a table containing the results appear which has #some_id
. Now I'm looking for a good way to wait until the table is loaded and if the code fails, redo the process of filling in the form until it works correctly. I want it to do something like this (pseudo code):
while(table_is_not_loaded){
get_information;
fill_in_the_form;
submit_the_form;
}
I think that it's maybe achievable using page.waitForSelector()
function, but I can't use it the way I want and I also don't know how it handle errors if the selector is not ready or visible.