Extract URL

Extracts a URL from a tag and stores it in a variable. If the URL is relative, it can be converted to an absolute URL using the URL of the current page.

The URL can be extracted from an attribute, e.g. in the case of an <a>-tag with a href attribute. It can also be extracted as if the tag was clicked, e.g. in the case of a button whose onClick event handler loads a new page or submits a form. If the tag is a <form>-tag, either the value of the action attribute can be extracted or the URL that corresponds to the form submission (also when the POST method is used) can be extracted.

Properties

The Extract URL action can be configured using the following properties:

Extract How

Determines how the extraction is done

Automatic

The way to extract the URL is determined automatically.

From Tag Attribute

The URL can be extracted directly from the relevant attribute of the tag for the following tags:

  • <a>
  • <area>
  • <form>
  • <frame>
  • <iframe>
  • <script>
  • <img>
  • <input type="image">
  • <param>
  • <link>
  • <meta>
  • <body>, <table>, <tr>, <td> or <th> where the tag has a background attribute

The From Tag Attribute extraction has two additional properties:

Execute JavaScript URLs

If the tag attribute contains a JavaScript URL and this property is checked, the JavaScript URL is executed in the hope that it will result in the load of a non-Javascript URL. No actual loading is done, however. If this property is not checked, the JavaScript URL itself is extracted.

Convert to Absolute URL

If this is selected, relative URLs are converted to absolute URLs.

Click Without Loading

The URL is extracted as if the tag was clicked, except that no loading is done. This can be useful for tags with onClick / onMouseDown / onMouseUp event handlers, or for buttons that submit forms.

Submit Form Without Loading

The URL is extracted as if the form was submitted, except that no actual requests are sent to the server. This type of extraction can only be applied to <form>-tags. To submit using a submit button, select the Click Without Loading extraction instead, using the submit button as the found tag.

Variable

The variable used to store the extracted URL.

Continue when

Add a wait criterion for the step. If you have several wait criteria, execution stops when any wait criterion is met. You can have several met wait criteria such as if you are waiting for two HTML elements that appear on the same load, or if you are waiting for an element on the main frame, and Initial Page Load Completes is set. For more information, see Use Wait Criteria.

Options

The robot's options can be overridden with the step's own options. An option that is marked with an asterisk in the Options Dialog will override the one from the robot's configuration. All other options will be the same as specified for the robot.