【Flowchart Mode】What is an Action Component
Abstract：This tutorial describes what action components are and what their respective features are.
The action Component is a set of programming modules used in the ScrapeStorm Flowchart Mode, each component corresponding to an operational behavior.
There are a total of 8 action components, including:
Open URL, Click, Input, Scroll, Hover, Dropdown, Verify code, Extract data, Waiting, and End Loop.
Components can be automatically generated by clicking on a web page or manually dragged from the component window below. If you need to delete the component, just click the “X” in the upper right corner of the component to delete it.
1. Open URL
“Open URL” component refers to the behavior of opening a web page specifically. Generally, when we enter a URL in the Flowchart Mode, an “Open URL” component appears on the task flow interface, and the component can be dragged to the operation interface.
The settings for the “Open URL” component include the following four sections:
(1) Edit URL: Click this setting to modify the open URL.
(2) Timeout(seconds): It is used to set the timeout period for waiting for the webpage to open. The default time of the software is 1 seconds, and the user can modify it.
(3) Cookie: Same as the pre-login function, you can enter the cookie here to achieve the pre-login effect. The system default setting does not require login.
The “Click” component corresponds to a click operation on a web page, and its settings include the XPath of the element, whether to open a new tab and click type.
The “Click” component added by the auxiliary point selection will be set automatically, we can use it directly, no need to manually configure it.
By manually dragging and adding the “Click” component, we can generate XPath by clicking the button to the right of the settings box and then clicking on the elements in the page, or we can edit the XPath parameters directly.
On the option to open a new tab, we generally choose not to open the new tab, only when you need to extract the data on the details page, you can choose to open a new tab.
The “Input” component corresponds to the operation of inputing text in a web page, and its settings include the XPath of the input box and the input text.
During the operation, we input the text in the operation prompt box according to the software prompt process. In this case, the component has been set up, we can use it directly, no need to manually configure.
By manually dragging and adding the “Input” component, you can set XPath by clicking the search box on the web page. Users with programming basics can manually set XPath manually, and enter the text we want to search in the input text box.
If you need to jump directly to the search page after typing, select “Press Enter”.
The “scroll” component means that when the URL is opened directly, the item does not appear directly on one screen, but you need to manually scroll the page to see more items.
In this case, the normal settings may affect the extraction effect, and the user can set a component of the scrolling page to solve the problem.
Rolling method: You can choose to scroll one screen at a time or scroll directly to the bottom.
Number of scrolls: The number of scrolls in this operation, the software defaults to 1 time, the user can also change the number of scrolls as needed.
Rolling interval(seconds): The time between one scrolling interval, the software default is 1 second.
The application scenario of “Hover” is that some web pages need to be moved to a certain location to display content. Its setting is mainly the XPath of the element.
We generally need to add the component by manual dragging. You can create XPath by clicking the button to the right of the setting box, then clicking the element in the page, or you can edit the XPath parameter directly.
The “Dropdown” component is used to select a drop-down list in a web page. Its settings include the XPath of the droplist and the options for the droplist.
The “Dropdown” component added by the auxiliary click operation, the software has automatically set up XPath, we only need to select the list option in the operation prompt box according to the software prompt.
By manually dragging and dropping the “Dropdown” component, you can set XPath by clicking the list box on the web page. Users with programming basics can manually set Xpath manually.
7. Verify code
The “Verify code” component is applied to situations where a verification code is encountered on a website during a task scraping process.
“Verify code” is not used alone and should be used in conjunction with other components.
8. Extract data
The “Extract Data” component refers to extracting data from a web page and setting the extracted fields.
Click here to learn more about the Extract Data component.
The “Waiting” component is used for the timing wait process inserted between components.
For example, some web pages are slow to open. If you do not set the “Waiting” component, the results may be incomplete because some web page content is not loaded.
The default waiting time of the system is 1 second. You can set the waiting time according to your needs.
10. End Loop
The “End loop” is usually nested inside the “Loop” component to stop the current loop operation.
Normally, the Loop component loops through the task when the set loop condition is met until the loop condition ends.
If we want to end the loop ahead of time under certain conditions, we can set up a “Branch” component and an “End loop” component.