WriteText component writes the specified text to a file. If the file already exists, its text is overwritten. If the file does not exist, a new file is created, the specified text is written to the file and the file is closed.
WriteText component exposes the Control In, Control Out, Data In, and Data Out ports by default.
|ControlIn||Must be connected to the Control Out port of one or more components.|
|ControlOut||Can be connected to the Control In port of another component or the default end component.|
|Data Out||Returns “True” if the text is written to the file. Otherwise, returns “False” (Boolean).|
To edit the properties of the
WriteText component, in the Properties window, change the required property. You can edit the following properties.
|Search||Search for the respective property.|
|Delay After Execution||Specifies the wait time (in seconds) after the action is performed.|
|Delay Before Execution||Specifies the wait time (in seconds) before the action is performed.|
Let us consider an example.
To retrieve the network domain name:
- Open Internet Explorer and type https://intellibot.io
- In the Toolbox, expand
- Drag the
GetTextcomponent and drop it on the Design surface.
- To select the text to extract, click
Press “CTRL+SHIFT” for selection messageis displayed.
CTRL+SHIFT. The mouse pointer becomes a crosshair.
- Select the webpage content to extract.
The selected content is displayed in the
- Drag the
WriteTextcomponent and drop it on the Design surface.
- Double-click the
filePathbox and enter the required file path.
textbox and enter the required text.
You can override the existing data source for both the
textData In ports
To override the existing data source: Right-click the required Data In port.
Overrideand change the data source.
To learn more about overriding the data source of the data port, refer the Override section.
Connect the control ports in the activity.
- In the toolbar, click
The specified text is written to the file.