Skip to content

Element Selection Guide

Naibo Wang edited this page Feb 13, 2023 · 10 revisions

To get data from the web page, the first step we need to do is to "Select" element on the web page. After the element is selected, then we can define subsequent operations based on it.

There are some concepts regarding with element selection.

Waiting Element

The Waiting Element refers to the element prepared to be selected. Just move the mouse pointer on the web page, we will see one element is marked with light-purple background, which means the element is waiting to be selected currently:

image

Select Element(s)

When you want to select one element, just right-click your mouse or press F7 on the keyboard to select the element, which will be marked with bright-blue background:

image

Then you can select the 2nd/3rd/.../n-th elements again by keep right-click your mouse or press F7 on the keyboard:

image

Operation Toolbox

After the element is selected, you will see many options on the Operation Toolbox, which can be dragged freely:

image

Revoke Selection

If you select more than 2 elements, but you don't want the latest selected element, you can click the Revoke selection option on the toolbox to revoke the latest selected element.

For example, you selected 3 elements on the webpage, which in order is:

(1) The "Daily Deals" link on the top bar.

(2) The "Shop by category" option.

(3) The "ebay" image (logo).

And now you don't want to select the "ebay" image anymore (3), then you can click the "Revoke selection" option to deselect it, remaining the other 2 elements (1 and 2) be selected:

image

Deselect Element

If you want to cancel the current selection, click the Deselect button on the toolbox to deselect all selected elements:

image

Expand Path

Sometimes you may want to select an element, but what is actually selected is its child element. E.g., the real XPath of the element you want to select is: /html/body/div/a, but the XPath of actually selected element is: /html/body/div/a/span, and you cannot actually select the "a" tag because it don't actually have a width or height. Here, you need to click the Expand Path button on the toolbox to expand the XPath of current selected element to its parent element:

image

And the selection area will also be marked:

image

Auto Similar Element(s) Match

EasySpider support automatically detect similar elements, which is very useful when we want to get data from a list, e.g., to get all product titles/prices on ebay:

Clone this wiki locally