Сравнение версий

Ключ

  • Эта строка добавлена.
  • Эта строка удалена.
  • Изменено форматирование.

...

  1. Create a variable with the data type «String» and set its value to the complete XPath of the element, where the varying part will be replaced with some word.
    Example:
    Image RemovedImage Added
    XPath value:
    Image Modified
  2. Choose the action «Replace by Pattern» from the «Text» action group.
    Image RemovedImage Added
  3. Fill in the action parameters:
    • Parameter «Text» - specify the variable created earlier that holds the XPath.
    • Parameter «Regex» - specify the regular expression for matching, i.e., the word that needs to be replaced.
    • Parameter «Replacement» - specify the new value for the text to be replaced.
      Example parameter entries:
      Image Modified
  4. In the «Result», specify the XPath of the web element whose XPath needs to be changed.
    Example:
    Image Modified
  5. After filling in the «Element» parameter of any action in the «Browsers» group with the variable whose XPath is specified for saving the result in the «Replace by Pattern» action, the action will be performed with the modified XPath.
    For a better understanding, let’s consider a use case for dynamic XPath replacement.