-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Element Selection Guide
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.
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:
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:
Then you can select the 2nd/3rd/.../n-th elements again by keep right-click your mouse or press F7 on the keyboard:
After the element is selected, you will see many options on the Operation Toolbox, which can be dragged freely:
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:
If you want to cancel the current selection, click the Deselect button on the toolbox to deselect all selected elements:
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:
And the selection area will also be marked:
Click Pages
above to see more pages