πŸͺΆ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:

If <text, element> is displayed on the screen, then tap on <text, element>. Otherwise tap on <text, element>

They're also useful when you may want to wait for a screen to fully load:

Wait until <text, element> is displayed on the screen, then tap on <text, element> otherwise repeat this step.

Another way of achieving this is by adding (optional step) at the beginning of your prompt:

(optional step) Tap on <element>

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