From the course: Playwright Python and Pytest for Web Automation Testing: Master Modern Web Testing with Playwright and Pytest in Python

Unlock this course with a free trial

Join today to access over 25,200 courses taught by industry experts.

UI testing load delay

UI testing load delay

For this test, we have to handle the load delay of a page navigation. So if we take a look at the scenario, you can see it says navigate to the homepage and click on the load delay button. Then you should go ahead and come to this page after a delay and have this button appear that is button appearing after delay. So if I go ahead and go back to the homepage, we can see our load delay button. So if I click on the same, you can see there's a load delay. And after a while, we navigate to the second page with our target button. So let's go ahead and simulate the same. So going back to the homepage, we are visiting that first, then we can locate this button, is a link item with the text of load delay so let's go ahead and use get by role locator so load delay link i'll go ahead and use page get by role the role is link the name on the same is load delay now you can go ahead and click the link it should initiate oops we should click the link it should go ahead and initiate the navigation…

Contents