Dropdown boxes not closing when moving to next field

Good day,

I am testing a Webapp where clients can log in and capture an order.
I have created macros in UI.Vision and when executed manually through the User Interface they work flawlessly.

I am now trying to have the macros executed from a PowerShell script in order to incorporate my tests into the CI/CD.
However, when I execute the macros using a PS1 script (downloaded from your help pages) some of the macros, not always the same ones, will not close dropdown boxes even after the correct or any list item is selected.

This does not always happen, but happens enough with some of the macros in the ps file that it fails every time.

The PS1 file that I am using is the one that is provided here https://github.com/A9T9/RPA/tree/master/command-line/powershell which is a reference from your help page here https://ui.vision/rpa/docs#cmd.

I have created my own PS1 script file that literally has only one line in it, and that is to start up chrome and execute the macro.
The reason I did this was to get rid of all the “noise” in the script, thinking that the counters or logging might somehow be causing issues.
This worked the first two times I ran the script but now its no longer working either, the dropdown boxes stay open and the macro cannot proceed to “Submit” the order due to the order being incomplete and therefore fails.

Please see image below of what the dropdown boxes look like. Sometimes there are multiple dropdown boxes open at one time.


I have tried addressing the issue in the macro itself by adding additional clicks out of the dropdown box to try and “commit” the selection but this does not work.

A second issue, that only appears when executing the macro form the command line is that some of the text entered is also not “committed” to the fields. In the image above you will see that the word “Address” is red, indicating that there is “no” data entered yet you can see it is there, this randomly happens to any of the fields.

Again, all this works flawlessly when running from the user interface of UI.Vision, the only problem is when I run the macro from command line I get the issues listed above.

Close this with the X

Can you please add a screen video of it running via command line? Then we get a better idea what is going on.

Make sure you have bringBrowserToForeground at the beginning of your macro. When you start via command line sometimes you will see the browser in the front but it actually doesn’t have focus and many commands fail

For this reason i do not use Xclick and Xtype and i search good alternative xpaths, all my macro working in background because I usually work with multiple Windows in front in same time.