im Starting with puppeeteer and now at a point where I have a question:
Im on a site and when clicking on a button the server sends an ajax request to the server and brings a message on the homepage. I want to evaluate the answer e.g.:
wait newPage.click('#myButton'); //here the ajax request is triggered, now im looking for something like:
if("AJAXRESPONSE" != "This is the correct answer") {
//Throw error here
}
else {
//continue
}