Multiple execution of the step

Hi, I’m a new user of the software, and I found something that I think should be considered as a bug. I am asking a way to go past it. When I’m executing a step like:

      "Command": "executeScript",
      "Target": "console.log('test')",
      "Value": "",
      "Description": ""

It will execute it multiples times. As the console shows you, the ‘test’ line is shown 4 times when the line is executed once.
Capture d’écran 2023-08-01 141820

It’s not a big deal, but when the action is a ‘click’, my screen goes numb because of the multiple click which isn’t possible for a normal user in this case.

Is there a way to correct it, or a way to go around this problem and be sure that only 1 click is done ?

Thank you so much for your help !

1 Like

Hi, I confirmed this issue and logged a bug for it.

As for a workaround: What exactly are you trying to do with your executeScript code? Click on something?

The executeScript code was just to test if the “multiple click at once” theory was exact. In reality, I am just trying to use a click. Normaly, after the user click on the specified div, a panel which take the whole screen appear so the user can’t click again on the div. But, UI-vision still can because it doesn’t use a user click. The fact that UI-vision is clicking multiple times there mess up the whole panel that should normaly appear, and create multiple one superposing. Then, when I am trying to click on a specific button, ui vision click on a panel which isn’t on the screen.

The objective is to allow that only one instance of the panel appear, so the display isn’t messed up anymore and I can continue my test.

The website I’m working on isn’t mine, and I can’t change anything on it.

Thank you for your answer !

1 Like

for simulating a real user click, you can use the XClick command.

Hi Ulrich,
I’m aware of the Xclick, but I want to fully automate, without user click or type.

Can I ask why you want to avoid this?

There is 3 reasons why I want to avoid it:

  • I want to avoid XClick because my script is a very big one, and I will have way more than 25 XClick in it. We can only have this maximum of 25 XClick in a script, which make it un-usable here.
  • The objective of this script is to be fully background automated, which mean that I want to start it and be able to do something else at the same time. The XClick doesn’t work really well in “browser automated” and need to be put in “desktop automated” to be fully functional. This mean that my mouse will move from a screen to another and complicates things for me
  • The last reason is that I need to take screenshots. If I go “desktop automated”, the screenshots can only be one of the full screen, not as centered as the “storeImage” function.

For all this reasons I want to avoid XClick.

Have you tried using the click or clickAt command?
I am also interested in an alternative to Xclick if it exists I would like to know it because Xclick requires installation of xmodules (.exe file on Windows) and does not work without xmodules installed

When I really need to click somewhere, I usually use xpath. There is a lot more possibility in xpath than what ui-vision shows. I personally use this cheatsheet: Xpath cheatsheet.

You can use children or parents to get the div you want.
But in this specific case, event using this kind xpath doesn’t click on the button. In fact, it shows the green box, and validate the step but the normal dialog that should open, doesn’t. My guess is that it click on the other window executed when the click is done.

Since I posted this issue, is there any news on this bug ?
Thanks for your answer :slight_smile:

We plan to fix this bug with one of the next updates.

There is a delay as we currently work on some larger refactoring of the code base. Once that is done, we are ready for new releases.

This issue is fixed with V9.0.5.

Thanks again for reporting the issue and the good test case!

1 Like