Currently, it is not possible to capture a screenshot at an exact moment, such as when a button is clicked.
However, if you need to capture a screenshot after the page has fully loaded, you can achieve this by using the Take screenshot command at the appropriate timing.
To ensure the correct timing, use wait commands like the ones below before executing the screenshot command.
- Wait for fixed seconds
- Wait until screen is rendered
- Wait until UI element is visible