Find the same inscriptions on the page one by one, and click on each

How to disable autorefresh?
can this be done in code?

the auto refresh depends on the website, maybe you can try with the esc key to block it but you risk that the page does not load completely and then does not work well

I have not yet been able to create an account for experiments.Сanstockphoto to carry out checks, and, possibly, the account will be approved.
Yes, your code works, but it only finds the first occurrence of “illustration”. I can not turn off auto-update.
This piece of code does not work.
image

To click other element change [2] with [3] or [4] you must try to find the correct [n] number

what should the code look for enumerating n in a loop?

You need to study ui vision otherwise you need a paid service for custom macro.

Custom macro require time and tests and can not create free in a forum in few minutes.

This is the code for a loop

{
  "Name": "ClickInLoop",
  "CreationDate": "2020-3-18",
  "Commands": [
    {
      "Command": "store",
      "Target": "true",
      "Value": "!errorignore"
    },
    {
      "Command": "bringBrowserToForeground",
      "Target": "",
      "Value": ""
    },
    {
      "Command": "store",
      "Target": "1",
      "Value": "Loop_Counter"
    },
    {
      "Command": "label",
      "Target": "Engine_Code",
      "Value": ""
    },
    {
      "Command": "executeScript_Sandbox",
      "Target": "return Number (${Loop_Counter}) + 1",
      "Value": "Loop_Counter"
    },
    {
      "Command": "click",
      "Target": "xpath=(//label[contains(.,'Illustration')])[${Loop_Counter}]",
      "Value": ""
    },
    {
      "Command": "pause",
      "Target": "5000",
      "Value": ""
    },
    {
      "Command": "echo",
      "Target": "Loop Counter Is ${Loop_Counter}",
      "Value": "#shownotification"
    },
    {
      "Command": "gotoIf_v2",
      "Target": "${Loop_Counter} < 5",
      "Value": "Engine_Code"
    }
  ]
}

hello. Which software shows you the relative XPath alternatives? Would love to try :slight_smile:

For firefox i use this truepath but there are more addons with similar function, the same thing for Chrome

Thank you very much for paying so much attention to my problem. Is there any ui vision tutorial that might be useful to me?
I correctly understand that you recommend me to put ui vision on firefox and add TruePath?

I learned ui vision by looking at the demo macros and modifying them slowly from them I understood the various commands today I know automate anything. The important thing is to create short, simple and precise macro codes otherwise there are risks of errors or freezes, so before creating a macro use 1-2 days to study the best simple and precise structure to manage everything.

To my great joy, your script has earned. The authors of the site suddenly changed the code, or maybe I sent something differently, but the code worked. I removed the pause and added speed.
Thank you so much for your time and patience.
Unfortunately, my experience is very small and I could not understand from examples how to make a loop, how to make a counter, how to recognize a button correctly … Thank you and I hope that I can use this script for a long time.
{
“Name”: “canstock”,
“CreationDate”: “2020-3-22”,
“Commands”: [
{
“Command”: “store”,
“Target”: “fast”,
“Value”: “!replayspeed”
},
{
“Command”: “store”,
“Target”: “1”,
“Value”: “Loop_Counter”
},
{
“Command”: “label”,
“Target”: “Engine_Code”,
“Value”: “”
},
{
“Command”: “executeScript_Sandbox”,
“Target”: “return Number ({Loop_Counter}) + 1", "Value": "Loop_Counter" }, { "Command": "click", "Target": "xpath=(//label[contains(.,'Illustration')])[{Loop_Counter}]”,
“Value”: “”
},
{
“Command”: “pause”,
“Target”: “1”,
“Value”: “”
},
{
“Command”: “gotoIf_v2”,
“Target”: “${Loop_Counter} < 100”,
“Value”: “Engine_Code”
}
]
}

1 Like

Thanks to you :slight_smile: