Using Java, I'm trying to wait for a response to one of the Javascript scripts I'm waiting for.
I've already discovered that I can use waitForResponse, but this leads to issues if the script has already completed loading before I reach the waitForResponse statement.
Is there a way I could wait for the script to be completed but only if it hasn't been received yet?
page.waitForResponse("**/*<<Script reference>>*.js", () -> { });
Any help would be greatly appreciated!