I am trying to figure out how to use the page.waitForFunction()
in Playwright in Java.
I would like for a page.evaluate()
to run first, and for the page.waitForFunction()
to wait on it, before continuing.
I have the following:
page.waitForFunction(() => page.evaluate("document.readyState").equals("complete"));
But syntactically that is incorrect or maybe I'm doing something wrong.