Skip to content

Selectors

Selectors are used to select HTML elements on a page, either to perform actions on them, or to extract data from them. They can be used from any global with the Select. prefix.

Creating and Fine-Tunning Selectors

The easiest way to create them is by pressing the Show Selection button on the browser (if loading, selection mode will become active as soon as the page completes loading) and selecting one or more elements on the page. To select many elements, hold the control key while clicking on elements. Then, create a selector by right clicking Selectors and selecting Create from Selection.

A selector is defined as a list of HTML properties, such as class name, tag name, font family, and many others. When sample elements are added to the selector, properties that are not shared by all sample elements and by the selector definition are removed from the selector, making the selector less specific and normally causing it to select more elements.

Selectors can be previewed by right clicking them and selecting Preview Selector in Browser. If any elements are missing, the selector can be fixed by selecting some of the missing elements and selecting Add Samples to Selector on the selector's context menu.

Tolerance

Selectors can also have a tolerance. If a selector has a tolerance of zero, only elements that match all the properties on the selector definition will be selected, and the larger the tolerance, the more properties will be ignored, and hence the more elements the selector will select. If a single sample element was used to create a selector, this selector will have a default, larger than zero tolerance. If new sample elements are added, the tolerance is reset to zero. This tolerance can later be changed on the selector editor. Note that the tolerance will be reset to zero if new elements are added.