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 progress bar

UI testing progress bar

For this test we have to track the progress of this progress bar and when it hits 75% we stop the same. To do that we can click on the start button to start the progress and you will see it increases the progress value and then when it will hit 75% or more than that we stop the same by clicking on the stop button. So let's wait for it to reach 75%, it has reached 75, click stop, and we stop the progress. Now you can see I stopped at 76% and the test says if your progress has stopped at 75% or more than that, then consider this test case passed. The closer you are to 75, the better your result. So let's go ahead and perform the same. Let's inspect our progress bar and it is a div element with a role of progress bar. So we can select the same using our get by role locator. And then we can also select the buttons using their tag name and the name on the same. So first of all, let's select our progress bar and we can use the get by role locator. it progress bar then we can select our…

Contents