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.
Last updated
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.
Last updated
With GPT Driver, these prompts serve as clear instructions. Using the IF
, 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.
The tool is also aware of which platform the test is currently running on. This is particularly valuable if you will be creating one test that applies to both iOS and Android.
You can use conditional AI steps by first identifying the platform and applying boolean logic for execution. For example: