Conditional Steps
In test cases involving unscheduled pop-up messages or scenarios like A/B testing, conditional prompts play a crucial role in guiding the testing process intelligently.
With GPT Driver, these prompts serve as clear instructions. Using the IF
action command, they examine the screen for specific elements like buttons or text. If found, GPT Driver follows through with the appropriate action. If not, it seamlessly continues with the test or jumps ahead as needed.
Here's an example to show how a conditional prompt can be structured:
They're also useful when you may want to wait for a screen to fully load:
Another way of achieving this is by adding (optional step)
at the beginning of your prompt:
If the element isn't present on the screen, GPT Driver will automatically proceed to the next step.
By adapting to the current screen conditions, these conditional prompts simplify testing by adjusting to subsequent steps accordingly.
Last updated