I have 1000‘s of div‘s that need to be clicked and the order is the following code:
{
“Name”: “Test-2”,
“CreationDate”: “2024-6-12”,
“Commands”: [
{
“Command”: “click”,
“Target”: “xpath=//[@id="t1103077807"]/ul/li[3]/a/div/div",
“Value”: “”,
“Description”: “”
},
{
“Command”: “click”,
“Target”: "xpath=//[@id="t1103077807"]/ul/li[4]/a/div/div”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “click”,
“Target”: “xpath=//[@id="t1103077807"]/ul/li[5]/a/div/div",
“Value”: “”,
“Description”: “”
},
{
“Command”: “click”,
“Target”: "xpath=//[@id="t1103077807"]/ul/li[6]/a/div/div”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “click”,
“Target”: “xpath=//[@id="t1103077807"]/ul/li[7]/a/div/div",
“Value”: “”,
“Description”: “”
},
{
“Command”: “click”,
“Target”: "xpath=//[@id="t1103077807"]/ul/li[8]/a/div/div”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “click”,
“Target”: “xpath=//[@id="t1103077807"]/ul/li[9]/a/div/div",
“Value”: “”,
“Description”: “”
},
{
“Command”: “click”,
“Target”: "xpath=//[@id="t1103077807"]/ul[2]/li/a/div/div”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “click”,
“Target”: “xpath=//[@id="t1103077807"]/ul[2]/li[2]/a/div/div",
“Value”: “”,
“Description”: “”
},
{
“Command”: “click”,
“Target”: "xpath=//[@id="t1103077807"]/ul[2]/li[3]/a/div/div”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “click”,
“Target”: “xpath=//[@id="t1103077807"]/ul[2]/li[4]/a/div/div",
“Value”: “”,
“Description”: “”
},
{
“Command”: “click”,
“Target”: "xpath=//[@id="t1103077807"]/ul[2]/li[5]/a/div/div”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “click”,
“Target”: “xpath=//[@id="t1103077807"]/ul[2]/li[6]/a/div/div",
“Value”: “”,
“Description”: “”
},
{
“Command”: “click”,
“Target”: "xpath=//[@id="t1103077807"]/ul[2]/li[7]/a/div/div”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “click”,
“Target”: “xpath=//[@id="t1103077807"]/ul[2]/li[8]/a/div/div",
“Value”: “”,
“Description”: “”
},
{
“Command”: “click”,
“Target”: "xpath=//[@id="t1103077807"]/ul[2]/li[9]/a/div/div”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “click”,
“Target”: “xpath=//[@id="t1103077807"]/ul[3]/li/a/div/div",
“Value”: “”,
“Description”: “”
},
{
“Command”: “click”,
“Target”: "xpath=//[@id="t1103077807"]/ul[3]/li[2]/a/div/div”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “click”,
“Target”: “xpath=//*[@id="t1103077807"]/ul[3]/li[3]/a/div/div”,
“Value”: “”,
“Description”: “”
},
It goes until:
{
“Command”: “click”,
“Target”: “xpath=//*[@id="t1103077807"]/ul[106]/li[3]/a/div/div”,
“Value”: “”,
“Description”: “”
},
I used ChatGPT to continue this code but it’s very slow, so i wonder if it’s possible to use some operators to continue this and also reduce the size of the source code.
Thanks a lot in advance!