Get CSS Property Values
Playwright locators do not have a getCssValue() helper. To read a computed CSS property, run a small function on the element with locator.evaluate() (you used this earlier to read a tag name).
Example: const cursor = await btn.evaluate(el => getComputedStyle(el).cursor);
On the Buttons page, the disabled button (ID: disabledButton) has no custom cursor style, so the browser reports the computed default.
Task:
- Navigate to
https://testkru.com/Elements/Buttons - Find the disabled button
- Check if it is enabled using
isEnabled() - Get its cursor CSS value using evaluate
Expected output:
Enabled: false Cursor: default
TestKru