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 overlapped

UI testing overlapped

For this test, we have to handle an overlapped element and scroll it into view before performing any action. In this case, we have an input field which is overlapped by this grey box right here. Now to do that, we can simply go ahead and make use of the scroll bar, or we can use the mouse wheel on our mouse that is like this. scroll the input field into the view. Then we have to go ahead and enter some text on the same and make sure that it is just what we enter. That is, let's say I can enter Python and expect it to be the same. So let's go ahead and first of all, scroll the input field into the view. To do that, let's locate the same. You can see it as a input element with a placeholder of name. We'll go ahead and make use of the same. So input page get by placeholder and the placeholder is name. Now you may think we can use the input scroll into view if needed method to do the same. Well, in this case it will not work. That That is the name itself says is that scroll into view if…

Contents