Open andreas-globi opened 1 month ago
I don't think iframes fire onload
events or anything similar. You would have to inspect the iframe's content manually in a loop until the info you are looking for gets loaded there.
That's what I'm trying.
The issue though is that occasionally an exception is thrown while evaluating when the evaluate call is made DURING the iframe reload.
I get the same issue with the main page, but waitForPageReload()
fixes it there.
I guess I could just try
catch
the iframe evals until a timeout is hit.
In the man DOM, you can use JS to click on an element, and use
waitForPageReload()
to wait for the reload to completeeg:
But if you're clicking on an element in an iframe that causes the iframe to reload,
waitForPageReload()
won't work because the main page doesn't reload.waitForResponse()
doesn't work either, because the next call could be broken due to the iframe reloading.How can we
evaluate()
and then wait for the iframe to reload?