Can UI.Vision runs in CLI mode like Selenium IDE

I’m using Selenium IDE for my UI test automation, even In that I facing the issue like some tests which run in Selenium UI is not working with Selenium CLI mode. I came across the UI.Vision and from my understanding it looks like a replacement for Selenium IDE. In that case, I like to understand the following

  • How it is better than Selenium IDE.?
  • IS it possible to execute the UI.Vision in CLI mode as Selenium IDE ?
  • Is UI.Vision is open source so that if we willing to contribute is that is possible.
  • IN Selenumium IDE some commands like waitforcomponentstovisible/load are not at all working so we need to go with pause time not sure we will hit such an issue with UI.Vision also?

Thanks In Advance,
Arun V

Interesting questions…

How it is better than Selenium IDE.?

For me the two key differences are

  • Visual testing options with computer vision and even OCR (XClick,…). This is a bit like applitools.
  • The XClick and XType commands work on truly every website and component. They are useful if the Selenium IDE like commands fail.

Other differences:

What it can not do:

Is it possible to execute the UI.Vision in CLI mode as Selenium IDE ?

Yes, UIvsion has a command line interface.

Is UI.Vision is open source so that if we willing to contribute is that is possible.

Yes

In Selenium IDE some commands like waitforcomponentstovisible/load are not at all working so we need to go with pause time not sure we will hit such an issue with UI.Vision also?

This is a perfect use case for the visual commands I mentioned above :wink:

In this case I would use visualAssert | image_of_the_component.png.
See also Wait for Button and for second page load or Wait for the logo to disappear

2 Likes

Excellent Answers Thanks a lot

Few more Question came out after certain things I tried with the links you provided.

  • Parameters/Variables declared in One Macro is not seen in the next macro when I run the test suite. Say my 1st Macro is initialize which declares the setup values and on the later macros we need to use those variables for test run.

    • folder=foldername - So folder can be test suite. Whether I can use the old test suite as folder name for execution.
  • Also When running the UI.Vision from UI I’m not seeing the browser coming up and showing the play. Is this is expected.

Thanks In Advance,
Arun

Parameters/Variables declared in One Macro is not seen in the next macro when I run the test suite.

Variables are per macro, just like in the original Selenium IDE. But UIVision also has global variables. => You can create global variables by prefixing the variable name with “Global…” (e. g. “globalMyCounter” or “GLOBAL_username”).

  • folder=foldername - So folder can be test suite. Whether I can use the old test suite as folder name for execution.

The old test suites format is deprecated. I do not use them.

Also When running the UI.Vision from UI I’m not seeing the browser coming up and showing the play. Is this is expected.

The browser should be visible. But I am not sure I understand this question. Can you maybe add a screencast?

Thanks a lot for your prompt response.
I read that the folder can be now treated as “TestSuite”. As per my requirement, I need three test suites (In this case it is folders) and all three 3 test suites to share the same macro. but the problem is how to have the same copy of macro in all 3 test suites. for example: loginMacro is the same for all three test suites. In my case from the CI, I’ll 1st run the 1 test suites and do other configurations and then come back and run the 2nd test suite.

Also in folder, the macros are aligned as per alphabetical order which doesn’t allow us to reorder the macros as per our need and also in legacy test suite we need to update the json to rearange the tests.

I need three test suites (In this case it is folders) and all three 3 test suites to share the same macro.

You can use the Selenium IDE RUN command for this.

So the macros in all 3 folders have a RUN | /shared_macros/loginMacro statement. => So you only have one copy of the “loginMacro” macro in the " /shared_macros/" folder (a 4th folder).

Also in folder, the macros are aligned as per alphabetical order which doesn’t allow us to reorder the macros as per our need

Yes, correct. The test suite folder macros are executed alphabetically.

One way around this is to use one “master” macro with many RUN commands inside. Then, in the macro, you can change the order of the RUN commands easily.

Nice write up, that post should be saved / sticky

1 Like

Thanks.
With your reply, I’m able to come out of all my problems. Excellent Answers.
Might be the last few questions

  • I need to execute the test in slow mode with CLI. How to enable it. Right now I’m setting it in the “Settings page is the UI”. Is that works?
  • Although I set - nodisplay=1 the RDA and firefox is opening up. Since I need to execute the command from CLI I don’t want it to open up.
  • With nodisplay-1 I’m seeing " A macro-internal !replayspeed setting overwrites this global value. ", Does this mean we can’t control the speed in CLI mode.

Regards,
Arun V

Hi Arun,

  • you can control the speed with store | fast / medium / slow / nodisplay) | !replayspeed directly inside each macro.

  • the -nodisplay command line option does not prevent the UI from opening up! => It “only” prevents UI updates, so the macro runs faster. So technically this is the same as using store | nodisplay | !replayspeed inside the macro.

  • The message “A macro-internal !replayspeed setting overwrites this global value” means you already have something like store | fast | !replayspeed in the macro. This overwrites the -nodisplay command line,

If you ask me… I think the -nodisplay command line is not very useful. I never use it. If I have a macro or a section in a macro that I want to speed up (or slow down) I use the !replayspeed variable in the macro itself. Because the need to change the speed strongly depends on what the macro does.

1 Like

Thanks a lot for all your support. With your help, all my test cases are now UI.vision compatible and it is production-ready.

2 Likes