1 Star 0 Fork 0

LiuQuanlin/工具管理

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
3.txt 7.84 KB
一键复制 编辑 原始数据 按行查看 历史
LiuQuanlin 提交于 2024-06-05 06:08 . RAP
[
{
"type": "newPage",
"config": {}
},
{
"type": "gotoUrl",
"config": {
"url": "https://app.testnet.initia.xyz/swap?from=INIT&to=USDC",
"timeout": 180000,
"remark": ""
}
},
{
"type": "javaScript",
"config": {
"params": [],
"content": "document.documentElement.requestFullscreen().catch(console.log);",
"variable": "",
"remark": ""
}
},
{
"type": "waitForSelector",
"config": {
"selectorRadio": "CSS",
"selector": "#root > div > div > main > div > form > div.mantine-1qmugn3 > div > div > div:nth-child(1) > div > div > div > div > div",
"serial": 1,
"isShow": "1",
"timeout": 180000,
"variable": "",
"remark": ""
}
},
{
"type": "getElement",
"config": {
"selectorRadio": "CSS",
"selector": "#root > div > header > div > div > div > div.mantine-MediaQuery-media.mantine-1tpbqot > div.mantine-17pudyo > button > div > div",
"serial": 1,
"selectorType": "selector",
"serialType": "fixedValue",
"serialMin": 1,
"serialMax": 50,
"element": "",
"type": "innerText",
"key": "",
"variable": "selectWallet",
"remark": ""
}
},
{
"type": "ifElse",
"config": {
"condition": [
"selectWallet"
],
"relation": "equal",
"result": "Connect",
"hiddenChildren": false,
"children": [
{
"type": "click",
"config": {
"selectorRadio": "XPath",
"selector": "//*[@id=\"root\"]/div/header/div/div/div/div[4]/div[3]/button",
"selectorType": "selector",
"element": "",
"serialType": "fixedValue",
"serial": 1,
"serialMin": 1,
"serialMax": 50,
"button": "left",
"type": "click",
"remark": ""
}
},
{
"type": "waitTime",
"config": {
"timeoutType": "fixedValue",
"timeout": 2000,
"timeoutMin": 1000,
"timeoutMax": 300000,
"remark": ""
}
},
{
"type": "javaScript",
"config": {
"params": [],
"content": "const aa = document.querySelector('initia-onboard');\n\nif (aa) {\n const shadow_root = aa.shadowRoot;\n const el = shadow_root.querySelector('div > main > div > div > div.desktop.svelte-2jsizg > div:nth-child(1) > div > div > button:nth-child(2)');\n if (el) {\n el.click();\n }\n}",
"variable": "",
"remark": ""
}
}
],
"remark": ""
}
},
{
"type": "javaScript",
"config": {
"params": [
"acc_id"
],
"content": "var info = {};\n\ntry {\n const url = 'http://localhost:8080/api/ads/getWalletByAdsId?adsId=' + acc_id;\n\n const response = await fetch(url);\n const data = await response.json();\n info = data.data.metamaskKey;\n\n } catch (error) {\n\n info = '请求失败!!'\n\n }\n\nreturn info;",
"variable": "metamaskKey",
"remark": ""
}
},
{
"type": "waitTime",
"config": {
"timeoutType": "fixedValue",
"timeout": 15000,
"timeoutMin": 1000,
"timeoutMax": 300000,
"remark": ""
}
},
{
"type": "inputContent",
"config": {
"selectorRadio": "CSS",
"selector": "#root > div > div > main > div > form > div.mantine-1qmugn3 > div > div > div:nth-child(1) > div > div > div > div > div > input",
"serialType": "fixedValue",
"selectorType": "selector",
"element": "",
"serial": 1,
"serialMin": 1,
"serialMax": 50,
"intervals": 30,
"content": "1",
"isRandom": "0",
"randomContent": "1",
"randomInputNum": {
"min": 5,
"max": 5
},
"remark": ""
}
},
{
"type": "waitTime",
"config": {
"timeoutType": "fixedValue",
"timeout": 5000,
"timeoutMin": 1000,
"timeoutMax": 300000,
"remark": ""
}
},
{
"type": "waitForSelector",
"config": {
"selectorRadio": "XPath",
"selector": "/html/body/div[1]/div/div/main/div/form/div[3]/div/div/button",
"serial": 1,
"isShow": "1",
"timeout": 180000,
"variable": "",
"remark": ""
}
},
{
"type": "click",
"config": {
"selectorRadio": "XPath",
"selector": "/html/body/div[1]/div/div/main/div/form/div[3]/div/div/button",
"selectorType": "selector",
"element": "",
"serialType": "fixedValue",
"serial": 1,
"serialMin": 1,
"serialMax": 50,
"button": "left",
"type": "click",
"remark": ""
}
},
{
"type": "waitTime",
"config": {
"timeoutType": "fixedValue",
"timeout": 5000,
"timeoutMin": 1000,
"timeoutMax": 300000,
"remark": ""
}
},
{
"type": "waitForSelector",
"config": {
"selectorRadio": "XPath",
"selector": "/html/body/div[1]/div/div/main/div/form/div[2]/div/div/button[2]",
"serial": 1,
"isShow": "1",
"timeout": 180000,
"variable": "",
"remark": ""
}
},
{
"type": "click",
"config": {
"selectorRadio": "XPath",
"selector": "/html/body/div[1]/div/div/main/div/form/div[2]/div/div/button[2]",
"selectorType": "selector",
"element": "",
"serialType": "fixedValue",
"serial": 1,
"serialMin": 1,
"serialMax": 50,
"button": "left",
"type": "click",
"remark": ""
}
},
{
"type": "waitTime",
"config": {
"timeoutType": "fixedValue",
"timeout": 5000,
"timeoutMin": 1000,
"timeoutMax": 300000,
"remark": ""
}
},
{
"type": "switchPage",
"config": {
"type": "url",
"relation": "equal",
"content": "chrome-extension://ffbceckpkpbcmgiaehlloocglmijnpmp/index.html",
"remark": ""
}
},
{
"type": "inputContent",
"config": {
"selectorRadio": "XPath",
"selector": "/html/body/div[1]/div/form/div/div[2]/div/div/div/input",
"serialType": "fixedValue",
"selectorType": "selector",
"element": "",
"serial": 1,
"serialMin": 1,
"serialMax": 50,
"intervals": 30,
"content": "",
"isRandom": "0",
"randomContent": "${metamaskKey}",
"randomInputNum": {
"min": 0.1,
"max": 10
},
"remark": ""
}
},
{
"type": "click",
"config": {
"selectorRadio": "XPath",
"selector": "/html/body/div[1]/div/form/div/div[2]/div/button",
"selectorType": "selector",
"element": "",
"serialType": "fixedValue",
"serial": 1,
"serialMin": 1,
"serialMax": 50,
"button": "left",
"type": "click",
"remark": ""
}
},
{
"type": "waitTime",
"config": {
"timeoutType": "fixedValue",
"timeout": 20000,
"timeoutMin": 1000,
"timeoutMax": 300000,
"remark": ""
}
},
{
"type": "click",
"config": {
"selectorRadio": "XPath",
"selector": "/html/body/div[1]/div/form/div/div[3]/div/div/div/button[2]",
"selectorType": "selector",
"element": "",
"serialType": "fixedValue",
"serial": 1,
"serialMin": 1,
"serialMax": 50,
"button": "left",
"type": "click",
"remark": ""
}
},
{
"type": "waitTime",
"config": {
"timeoutType": "fixedValue",
"timeout": 20000,
"timeoutMin": 1000,
"timeoutMax": 300000,
"remark": ""
}
}
]
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/liuquanlin/tool-management.git
git@gitee.com:liuquanlin/tool-management.git
liuquanlin
tool-management
工具管理
master

搜索帮助