Create an Extraction Step

An Extraction step can be created in the same manner as quick verification step. Instead of verifying the value of the target element this step will export it to a an extracted variable which could be reused in the test later.

This example is against a random word generator site.

1.  Enable highlighting and hover over the target element, choose Quick Steps > Extract - text contains entry.

Word Generator

2.  An Extraction step is added to the test.

3.  Pause recording, double click that step, and change the DataBindVariableName. In this example I renamed it to randomWord.

Extracted Step Added

4.  Resume recording and navigate to www.bing.com from the Navigation pane in the Recording toolbar</a.

5.  Enter any word into the search box and click Submit.

6.  Close the browser to stop recording.

Recorded Test Steps

7.  Select the step that enters a word for the search engine (step 4 in this example).

8.  Click the Bindings drop-down in the Step Properties pane.

9.  Select the extracted variable from the value drop-down and click Set.

Set Extracted Value

10.  Save and execute the test.

11.  A random word is extracted from the first site and used as the query in a Bing search.

Double Check that in the plugin If you've Set an Extracted Variable in Code, type the variable name in the text box (without the $ notation), click on the brackets and then Set:

Extracted variable in code

Extract an attribute of an element

1.  Create an advanced verification for an attribute of an element (e.g. Title).

Advanced verification

If the element is hidden you should select it from the DOM Explorer

DOM Selection

2.  Change the role of the verification step to Extraction.

Change the Step Role

3.  The step is changed to an extraction one.

Extraction

Note! Each Verfication/Wait/Extract step could have it role changed between Verification, Wait, and Extraction (if based on text). Right click the step and select from the context menu Change Role > Set As...

See Also:

In this article
Not finding the help you need? Improve this article