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 mouse hover

UI testing mouse hover

For this test, we have to mouse over or that is hover over a element which triggers or shows us another element, which we go ahead and click twice and expect here the count of the click to be two. So if I go ahead and inspect this, you will see we get nothing because the element is only available when we hover over the same. So I'll go ahead and manually dig it out which is this right here. So this divider has a link element which has a text of click me which is right here. Now watch the attributes change as I hover over the link. You can see the title changes from click me to active link. So what we do here is first of all locate a element with click me title hover over the same then we'll go ahead and locate the active link element and then click it twice and expect this click count to be two so let's go ahead and implement the same so we will go ahead and say our our link or just link page get by title which is the title attribute right here and the first link which we need to���

Contents