waitForUrl behaviour
ThatYodaCoder opened this issue · 1 comments
ThatYodaCoder commented
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:
<<200 https://secured.com/v1/pcs/services/browser/qreq/L/8888
<<200 https://s3.ap-south-1.amazonaws.com/in-m/static/common/images/waiting.gif
<<200 https://s3.ap-south-1.amazonaws.com/in-m/static/common/html/wait.htm
<<200 https://s3.ap-south-1.amazonaws.com/in-m/static/common/images/wait.gif
<<200 https://pentinelapi.com/V1/turl/2.0/qed
<<307 https://test-domain.com/my-test-url/v1/foo
mxschmitt commented
Answered here microsoft/playwright#31507 (comment)