Suppose you want to extract data from a text file, access Amazon, and search for different items every time you refresh the page.
It's recommended to import the following JSON into AdsPower for further learning.
[
{
"type": "importText",
"config": {
"path": "C:\\Users\\snake\\Desktop\\RPA.txt",
"variable": "txt_data",
"remark": ""
}
},
{
"type": "randomGet",
"config": {
"content": "txt_data",
"variable": "random",
"remark": "Extract a random row of data"
}
},
{
"type": "newPage",
"config": {}
},
{
"type": "gotoUrl",
"config": {
"url": "https://www.amazon.com",
"timeout": 30000,
"remark": ""
}
},
{
"type": "waitTime",
"config": {
"timeoutType": "randomInterval",
"timeout": 30000,
"timeoutMin": 5454,
"timeoutMax": 6451,
"remark": ""
}
},
{
"type": "inputContent",
"config": {
"selector": "#twotabsearchtextbox",
"serialType": "fixedValue",
"selectorType": "selector",
"element": "",
"serial": 1,
"serialMin": 1,
"serialMax": 50,
"intervals": 300,
"content": "",
"isRandom": "1",
"randomContent": "${random}",
"remark": ""
}
}
]
1. Create a .txt file as shown in the image and fill it with some content. Write one word per line.

2. Use Import Data from Txt, upload the file you just created, and save it to the variable "txt_data".
The text data will be saved in the form of an array, for example: ["apple", "watch", "pillows", "glasses", "tools", "macbook", "iPhone", "iWatch", "xiaomi", "Vivo"].

3. Use Random Extraction to extract any line of data from the text and save it as the variable "random".

4. When using the Input feature, enter the variable "random" as the content.

Summary of ideas:
