菜单

导入txt、随机提取

场景:

提取txt里的数据,访问 amazon.com ,刷新网页,每次随机输入不同的关键词。

 

建议:

请将以下RPA流程JSON导入到AdsPower中。案例讲解主要的步骤与思路,其他步骤请自行研究。

[ { "type": "importText", "config": { "path": "C:\\Users\\snake\\Desktop\\RPA.txt", "variable": "txt_data", "remark": "" } }, { "type": "randomGet", "config": { "content": "txt_data", "variable": "random", "remark": "随机提取一行数据" } }, { "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步:如图所示,创建一个txt文档,填充一些内容。一行一个单词。

 

第2步:使用【导入txt】,导入刚创建的txt文档,将txt内容存到变量 txt_data。txt的数据会以数组的形式保存,如:["apple","watch","pillows","glasses","tools","macbook","iPhone","iWatch","xiaomi","Vivo"]

 

第3步:使用【随机提取】,随机提取txt中任意一行数据,并将其存为变量 random。

 

第4步:输入内容的时候,选择使用变量:random

 

接下来的步骤,请您查看案例流程JSON研究。

 

思路总结:

 

上一个
导入Excel素材
下一个
导入Excel素材、字段提取
最近修改: 2024-06-20Powered by