- Print
- DarkLight
Screenshot timing based on step type
1. Introduction
This guide provides detailed insights into the timing and management of screenshots within our workflow, covering best practices and common pitfalls.
2. Screenshot Timing
2.1 Overview
Screenshots are essential for documenting and validating steps. Accurate timing ensures they reflect the actions performed.
2.2 Step Timings
Middle Step Capture: Screenshots taken during the action. Use techniques like long-press clicks to keep the target element visible.
Pre-Step Capture: Screenshots taken before the action begins, documenting the state before any changes.
Post Step Capture: Screenshots taken after actions such as "Switch Window", "Go To", and "Execute JS Script", capturing the state post-execution.
2.3 Considerations and Best Practices
- Post-action screenshots may not always capture the target element if it disappears quickly.
- Use the Step Name or Memo section on the Scenario Details page for clarification if the element is not visible.
- For click actions, long-press clicks can help keep the element visible for the screenshot.
3. Common Issues and Solutions
- Element Disappearance: If an element disappears quickly after an action, the screenshot may not capture it. Use descriptive names and memos to provide context.
- Timing Mismatch: Screenshots might slightly lag behind the actual action. Ensuring a longer action duration can mitigate this issue.
4. Examples
Step | Screenshot Timing |
---|---|
Click Element | Middle |
Close Window | Pre |
Execute JS Script | Post |
Go To | Post |
Key Press | Middle |
Set Input Value | Post |
Switch Window | Post |
Sleep | Post |
5. Conclusion
Effective screenshot timing is crucial for accurate documentation and validation of actions. By following the guidelines and best practices outlined in this document, you can ensure that your screenshots effectively represent the steps taken.