Hello,
I am using page.waitForUrl method to wait for desired url. After clicking the submit button, I am trying to wait for url using
page.waitForURL("/my-test-url/v1/foo/") but getting time out error. I see that url is caught in onResponse handler log but some how it is failing to wait. Am I using the correct method or does waitForUrl checks for only first response url it has received after form submit?
Hello, I am using page.waitForUrl method to wait for desired url. After clicking the submit button, I am trying to wait for url using page.waitForURL("/my-test-url/v1/foo/") but getting time out error. I see that url is caught in onResponse handler log but some how it is failing to wait. Am I using the correct method or does waitForUrl checks for only first response url it has received after form submit?
Is these any better way for do this?
Code to perform wait for url::
page.waitForURL("**/my-test-url/v1/**");
code to print all response urls:
page.onResponse(response -> System.out.println("<<" + response.status() + " " + response.url()));
Response: