Skip to main content
No Result Found
Connect & Get help from fellow developers on our Discord community. Ask the CommunityAsk the Community

Write tests using natural language syntax

Write tests using natural language syntax in App Low Code Automation.

App Low Code Automation allows you to create automated tests using simple and natural language commands. You can describe user interactions in plain English in the test editor. This makes test writing faster, easier, and more intuitive, even for those without a programming background.

As you write on the test editor, App Low Code Automation automatically suggests valid commands, reducing guesswork and speeding up test creation. You can manually enter the name of the element you want to perform an action on. For example, you can use commands like Tap <element> or Long press <element> to specify interactions.

  • When the user presses the Esc key, the current suggestion is closed. After closing the suggestion, the user can start typing again.
  • If the new input matches a command, a relevant suggestion is shown.
  • If the new input does not match any known command, an error message is shown.

This section covers the following supported UI gestures or interactions, the command to use, a brief description, and real-world examples to guide you.

Single tap

Simulates a single tap on a visible and interactive UI element.

Command: Tap <Element>

Example: Tap Login

Screenshot showing the command entry field in App Low Code Automation, with a single tap command Tap Login typed in

You can manually enter the specific UI element name you want to tap.

Screenshot showing the element name typed in

Double tap

Performs a quick double tap gesture on the specified element. You can manually enter the specific UI element name you want to double tap.

Command: Double tap <Element>

Example: Double tap Profile Picture

Screenshot showing the command entry field in App Low Code Automation, with a single tap command Tap Login typed in

Long press

Simulates a long press gesture on a UI element for a specified duration. By default, App Low Code Automation performs a long press for 3 seconds, but you can customize the duration as needed.

Command:

  • Long press <Element>
  • Long press <Element> for <seconds>

Examples:

  • Long press Cancel
  • Long press Cancel for 5

App Low Code Automation interface with the command entry field displaying Long press on the Cancel button.

Keyboard input

Enables you to automate text entry, field clearing, and key presses in input fields and other interactive elements using natural language commands.

Commands:

  • Enter <Text> in <Input_Field>
  • Type <Text>
  • Clear <Input_Field>
  • Press <Key>

Examples:

  • Enter john.doe@example.com in Email address
  • Clear Search Bar
  • Press Enter
  • Type BrowserStack

App Low Code Automation interface showing the command to enter specific text in the input field.

Swipe

Simulates a swipe gesture across the screen or within a specified scrollable element.

As you type the Swipe command, App Low Code Automation suggests available directions and elements based on the current app screen. The interface displays contextual options to help you select the right swipe action, making it easier to automate navigation through carousels, lists, or other interactive areas.

Commands:

  • Swipe <Direction>
  • Swipe <Direction> on <Element>

Examples:

  • Swipe Up
  • Swipe Left on Image Carousel

App Low Code Automation interface displaying the command entry field with the Swipe gesture command.

After you enter the Swipe command, App Low Code Automation automatically suggests available directions for you to select, making it easier to choose the appropriate swipe direction.

App Low Code Automation interface showing the Swipe Up command with available directions and elements highlighted.

Scroll

Scroll a scrollable area in a specified direction, or until a particular element becomes visible. You can also scroll up to a specific element within a defined scrollable area. By default, App Low Code Automation scrolls 50% of the area.

As you type a scroll command, App Low Code Automation suggests available directions, scrollable areas, and elements based on the current app screen. The interface displays contextual options to help you select the right scroll action, making it easier to automate navigation through lists, forms, or long pages.

Commands:

  • Scroll <Direction>
  • Scroll <Direction> in <Scrollable_Area>
  • Scroll to <Element> in <Scrollable_Area>

Examples:

  • Scroll up
  • Scroll down in Terms and Conditions
  • Scroll to Privacy Policy Link in Settings Page

App Low Code Automation interface showing scroll command suggestions, including direction, scrollable area, and element options.

Variables

Stores and manages data during the test run for use in later steps. You can set variables to static values. You can type the @ symbol and choose a variable from the dropdown to insert its value into your command. Supported types include strings, numbers, and boolean. For more information on how to create and import variables, refer to the Variables document.

Command:

  • Set <Variable> to <DATA>
  • Use variable with @ - at symbol

Examples:

  • Set email to example@browserstack.com
  • Enter @variable_name in Username. When you type @, a dropdown appears with suggested variable values. Select the variable you want to use.

App Low Code Automation interface showing the Variable command and variable assignment options.

Validations

Validations let you check the state, content, and value of UI elements during your test. Use these commands to assert expected outcomes, compare text, and verify element properties.

Page validation

Checks if the specified value/text or regular expression pattern exists or does not exist on the current screen.

Command:

  • Validate if page contains <value/regex>
  • Validate if page does not contain <value/regex>

Examples:

  • Validate if page contains Welcome, User
  • Validate if page contains regex Order ID: [0-9]{5}
  • Validate if page does not contain Error 404

App Low Code Automation interface showing the command for page validation

Element validation

Checks the current state or availability of UI elements.

Command:

  • Validate if <Element> is visible / is not visible
  • Validate if <Element> is enabled / disabled
  • Validate if <Element> is selected / not selected
  • Validate if <Element> is checked / selected
  • Validate if Select element is empty / is not empty

Examples:

  • Validate if Submit button is visible
  • Validate if success message is not visible
  • Validate if button Proceed to Checkout is enabled
  • Validate if Apply Coupon button is disabled
  • Validate if radio button Credit Card is selected
  • Validate if radio button Cash is not selected
  • Validate if checkbox Agree to Terms is checked
  • Validate if toggle Dark Mode is unchecked
  • Validate if Hidden Debug Log exists

App Low Code Automation interface showing the command entry field with a validation command for element state.

Text validation

Text validation lets you check if the text content of an element or a variable matches your expected value. You can validate against both string values and numbers. If the keyword number is included, the validation is performed numerically; otherwise, it defaults to a lexicographic (string-based) comparison. The following comparison operators are supported:

  • contains
  • does not contain
  • equals
  • does not equal
  • starts with
  • does not start with
  • matches regex

Command:

  • Validate if text of <Element> is <expected text>
  • Validate if text of <Element> contains <partial text>
  • Validate if text of <Element> matches regex <pattern>
  • Validate if text of <Element> equals [number] <value>
  • Validate if <Element locator> is empty
  • Validate if text of <variable> equals <value>
  • Validate if text of <variable> contains <number>

Examples:

  • Validate if text of Username field is john.doe
  • Validate if text of Price is Rs. 1200
  • Validate if text of Element left to Product title contains Pro Max
  • Validate if text of orderTotal equals 1200
  • Validate if text of discount does not equal 0
  • Validate if text of score equals number

App Low Code Automation interface showing the command entry field with a validation command for text of an element.

Configure test step failure

When a test step fails in App Low Code Automation, you can control how the failure is handled. You can define what happens next when an action or validation step fails. This gives you flexibility to stop execution, continue with a failure, or continue with a warning based on the needs of your test.

The following failure behavior options are supported:

  • Continue execution if validation/action fails: marks the test as failed but continues the test execution.
  • Warn but continue execution if validation/action fails: marks the step with a warning but continues the test execution. The test is not marked as failed.
  • Fail test immediately if validation/action fails: marks the test as failed and immediately stops the test execution.

You can define this condition by appending and to the end of a DSL command and selecting the appropriate option from the dropdown. Note that you must first press the Right Arrow (→) key at the end of the DSL command to exit the text block before typing and.

If and is not appended, the following defaults apply:

  • For action: the test fails immediately if the action fails.
  • For validation: the execution continues if the validation fails.

Test step failure configuration panel in App Low Code Automation, highlighting failure behavior dropdown options.

Command:

  • Validate if <Condition> and continue execution if validation fails
  • Validate if <Condition> and warn but continue execution if validation fails
  • Validate if <Condition> and fail test immediately if validation fails
  • <Action> and continue execution if action fails
  • <Action> and warn but continue execution if action fails
  • <Action> and fail test immediately if action fails

Examples:

  • Validate if text of Login header contains Wikipedia and continue execution if validation fails
  • Validate if element Error message is visible and warn but continue execution if validation fails
  • Validate if text of Price equals 1200 and fail test immediately if validation fails
  • Tap Login and continue execution if action fails
  • Tap Submit and warn but continue execution if action fails
  • Tap Pay now and fail test immediately if action fails

Supported steps: The failure behavior options are supported for all existing actions and validations, including:

  • Tap
  • Double Tap
  • Long Press
  • Scroll
  • Swipe
  • Press
  • All validation commands

Wait time

Wait time lets you explicitly pause the execution for a specified number of seconds (up to a maximum of 180 seconds) before continuing with the next action.

Command:

Wait for <number> seconds

Rules & constraints:

  • Number of seconds must be greater than 0
  • Maximum allowed value: 180 seconds
  • Supports up to 1 decimal point value.
    • Supported: 0.1, 0.5, 1, 1.5, 10
    • Not supported: 0, 1.55, 200

Examples:

  • Wait for 0.5 seconds
  • Wait for 5 seconds
  • Wait for 10 seconds
  • Wait for 1.5 seconds

App Low Code Automation interface showing the Wait time command.

Execute selected steps

Execute selected steps command lets you run only the steps you select in your test flow, instead of executing the entire test case. You can select the required steps using cursor or Shift + ↑ or Shift + ↓ keys and click Execute selected steps.

For example, you can select steps 4, 5, and 6 while skipping steps 1, 2, and 3. Ensure the app is already in the correct state so execution can begin directly from step 4.

Command: Execute selected steps

App Low Code Automation interface showing the Execute selected steps command.

Intelligent step descriptions

App Low Code Automation’s natural language syntax captures your actions and translates them into plain, easy-to-understand English, making step descriptions accessible even to non-technical users. It understands the context and intent behind each step the same way you naturally think about how an app should behave.

Best practices for entering commands

Follow these best practices to ensure your tests are simple, fast, and reliable:

  • Use the label value of the element:
    Enter the exact label, such as Login for a Login button. Avoid adding extra words like Login button. App Low Code Automation uses exact string matching for labels, making this approach simple, fast, and reliable.

  • Use natural language descriptions:
    You can describe elements in natural language, for example, Home button icon at bottom of screen. This method relies on AI to interpret your intent. It is simple, but may be slower and somewhat reliable than using exact labels.

  • Use accessibility ID or XPath:
    For complex scenarios, use the accessibility ID or XPath of the element. This approach is fast and reliable, but requires more effort to identify and enter the correct locator.

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked





Thank you for your valuable feedback

Is this page helping you?

Yes
No

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked





Thank you for your valuable feedback!

Talk to an Expert
Download Copy Check Circle