Element Screenshot
locator.screenshot({ path }) captures a screenshot of just that element.
Task:
- Navigate to
https://testkru.com/Elements/Buttons - Find the
#leftClickbutton - Take a screenshot of just that button
- Verify the file was created
Expected output:
Element screenshot taken: true Element screenshot has content: true
TestKru