Printer FriendlyEmail Article Link

iTest: How to substitute variables for Selenium and Web session actions.

Environment/Versions
  • iTest
  • Windows
  • Linux
  • Selenium
Answer
  • To substitute variables in Selenium and Web session actions we need to follow below instructions:
    • Need to enable field substitution for the steps that are going to be used with variables.
    • Need to check the description of the steps. If the step contains any special characters then we need to modify the description/details such that Selenium/Web session can understand and substitute the action.
      • Example:
      • show Table  ://div[@id='ext-gen80']/div[1]/table; if we want do a variable substitution for @id, then we need to change the action to "://div\[@id='${<variable name>}'\]/div\[1\]/table;
      • click  :id=ext-get80; for these type of descriptions; we will do the normal substitution like :id=$<variable name>;

Product : iTest Enterprise