Any ways to control !TESTSUITE_LOOP from Command line e.g. Powershell?

Hello, as per subject, I would like to run some macros in a folder and would like to loop them for certain times? However, i am not sure how i can do it via the command line via PowerShell. I know there’s a internal variable !TESTSUITE_LOOP but not sure I can make use of it in the command line as one of the parameter? Please share your experience. Thanks.

I suggest to make the loop in Powershell, as shown in this example: RPA/run one macro forever.ps1 at 22b134cde2c77dbbc97d6056aff8c475e12c5b62 · A9T9/RPA · GitHub

You can directly reuse this example. To loop a test suite (folder) instead of a single macro, just change line 38:

From

$arg = “”“file:///”+ $path_autorun_html + “?macro=”+ $macro + “&direct=1&closeRPA=1&closeBrowser=1&savelog=”+$log+“”“”

to

$arg = “”“file:///”+ $path_autorun_html + “?folder=”+ $macro + “&direct=1&closeRPA=1&closeBrowser=1&savelog=”+$log+“”“”

Thanks. I have tried but it can only run once for those macros in the folder. However can i instruct / control to run in loop from CLI? Just like in the Ui.Vision UI, there’s an option “Testsuites: Play in loop” and I can insert how many loops I want. Any ways to do the same via CLI? Thanks.

You can not press the LOOP button via the command line. We did not include such as switch, because we highly recommend to make the loop inside the Powershell script. This gives you more control over the execution.