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 scrollbars
From the course: Playwright Python and Pytest for Web Automation Testing: Master Modern Web Testing with Playwright and Pytest in Python
UI testing scrollbars
For this test, we have to handle the scrolling of an element into the view before performing actions on the same. That is here, you will see we have a scroll bar, so if I scroll it to the end and to the end for this as well, you can see we get our button, which is hidden away in the scroll area. so for this test we have to go ahead and scroll this button into the view so let's go ahead and first of all inspect the same you can see we have a button with the text of hiding button i can just select the name on the same now go ahead and locate it so page get by role a button with the name as hiding button. Now to scroll an element into view, playwright offers a method that is scroll into view if needed. What it does is if the element is not visible in our viewport, it goes ahead and scrolls it into the view using the scroll bars. Now the same thing happens if we go ahead and just click on the button now for this we don't have to click on the button we just have to go ahead and scroll into…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
-
-
-
-
-
(Locked)
UI testing dynamic ID3m 17s
-
(Locked)
UI testing class attribute3m 19s
-
(Locked)
UI testing hidden layer5m 2s
-
(Locked)
UI testing load delay3m 23s
-
(Locked)
UI testing AJAX request2m 25s
-
(Locked)
UI testing click action2m 4s
-
(Locked)
UI testing input field2m 34s
-
(Locked)
UI testing scrollbars3m 5s
-
(Locked)
UI testing dynamic table9m 45s
-
(Locked)
UI testing verify text2m 5s
-
(Locked)
UI testing progress bar5m 28s
-
(Locked)
UI testing visibility7m 19s
-
(Locked)
UI testing app login5m 30s
-
(Locked)
UI testing mouse hover3m 49s
-
(Locked)
UI testing nbsp character2m 14s
-
(Locked)
UI testing overlapped4m 40s
-
(Locked)
-
-
-
-
-
-
-
-
-
-