История страницы
...
- 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:
XPath value: - Choose the action «Replace by Pattern» from the «Text» action group.
- 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:
- In the «Result», specify the XPath of the web element whose XPath needs to be changed.
Example: - 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.
Обзор
Инструменты контента