Locators and variables

Locators are the expressions that select which HTML element a command refers to. The format of a locator is: locatorType=argument

In addition to the standard Selenium locators (listed on Selenese command reference), we offer the "copado=type:value" locators, which are better suited to describe salesforce fields and controls.

Locators can also be defined as a record, in the Selenium Locators tab, and then used in a test case as {!Locator.LOCATOR_ID}
This allows to name/manage the locators across multiple test cases in a central location.


Variables represent text strings to be replaced at the time of the execution of a test case. The syntax is similar to Visualforce variables:  {!variable-name}
  • Pre-defined variables
    • {!NS} Namespace defined in the Copado Environment record.
    • {!RUN_ID} unique number per Test Run, useful to generate unique Name values
    • {!BLANK} forces to execute a command, even when the value/dataset is empty.

  • Environmental variables, defined in a Copado Environment
    • {!Environment.VARIABLE}

  • Group variables, defined in a Selenium Test Group.
    • {!Group.VARIABLE}

Comments