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 hidden layer

UI testing hidden layer

For this test case, we have to go ahead and handle the hidden layers. Now in the info, it says that some applications place elements on top of other elements using the Z order or the Z index. The best example is just right here. If I click on this green button, well, it vanishes or does the button change color? Well, if I go ahead and reload the page, and now open the developer tools, you can see we have a green button right here. And if I click it, another button appears just below it. Now, if you take a look at their parents, they have inline style with C index set to one for our green button. And for the blue button, the Z index is set to two, which means this blue button is placed on top of our green button. green button is still there, but it's being hidden away. So if I go ahead and just change the green button C index to something like let's say three, well, you can see the green button now comes forward. For this test case, we have to handle the same. So I'll go ahead and…

Contents