Mouse Hover
locator.hover() moves the mouse over an element, triggering hover effects.
To read the computed background color (same pattern as the CSS-property lesson), use locator.evaluate(el => getComputedStyle(el).backgroundColor).
On the Buttons page, #colorChangeOnHover changes color when hovered.
Task:
- Navigate to
https://testkru.com/Elements/Buttons - Get the background color of
#colorChangeOnHoverbefore hover - Hover over the button
- Get the background color after hover
- Print whether the color changed
Expected output:
Color changed: true
TestKru