Extract Tree as XML
This step helps you extract a part of the application tree and save it in a variable as an XML string.
When using the Extract Tree as XML step with the Chromium built-in browser, an invalid XML may be produced from a malformed HTML if unsupported symbols, incorrect tags, or incorrect attributes are used. In this case, the invalid elements are replaced as shown below, and the XML becomes valid.
-
All unsupported symbols, except the first symbol, are replaced with an underscore. If an attribute starts with an unsupported tag, the step appends an underscore to the beginning of the attribute.
-
For an incorrect tag, a special attribute is added with the original tag name in the following format:
kapow:original_tag_name=<original tag name>
-
For an incorrect attribute, a special attribute is added with the original attribute name in the following format:
kapow:attr_<incorrect attribute>_<index>=<original attribute name>
Correct Unicode characters in names are not converted or replaced.
Properties
- Include Derived Attributes
- You can choose to include or exclude derived attributes. For example, If your goal is to extract the pure HTML code from an HTML node, select excl. Derived Attr. into on the shortcut menu when inserting the step in the Recorder view, or clear the Include Derived Attributes option in the step in the workflow view. For more information about derived attributes, see "Application Tree" in Introduction to Robot Building.
- Evaluate Expression
-
Optional. Contains a list of conversion functions suggested for use on a value. The function list suggested for
a particular value is limited, depending on the value type. To specify a conversion function, in the step context menu, click
Evaluate Expression, and then do either of the following:
- Select the required function from the list of suggested functions.
- Click Plain to manually type the required function.
For more information on the supported functions and examples, see Expressions.
You can add one or more Evaluate Expression steps.
- Store Current In
- Name of the variable of specified type to store the extracted/converted value.
- You can add one or more Store Current In steps.
The Extract Tree as XML step can also contain the following set of action steps: