Click Elements
Playwright's locator.click() clicks an element. Playwright automatically waits for the element to be visible and enabled before clicking.
On the Buttons page, the "Left click on me" button (id: leftClick) changes its text after being clicked.
Task:
- Navigate to
https://testkru.com/Elements/Buttons - Find the button with ID
leftClick - Print the button text before clicking
- Click the button
- Print the button text after clicking
Expected output:
Before: Left click on me After: I was left-clicked!
TestKru