Automated Testing with UI.Vision

Does anyone have an example of an automated UI.Vision test script? including the installation of UI.Vision.

I’ve tried a number of ways to script the installation of Chrome or Firefox, and install the UI.Vision extension, but all attempts fail to setup the extension prior to load a test page/macro. I’ve tried both Ubuntu and MacOs.

This is the related bug report

thanks

Hi, just to clarify: You are looking for a way to automatically install the UI Vision RPA extension in Chrome and/or Firefox on Linux and macOS?

Have you seen this? Force install apps

Technically UIvision is just a regular browser extension, so whatever works for other extensions should work for uivision as well.

Anyway, it seems your approach is almost working => Can you post the command line that you are using for the installation?

Thanks for the reply Timo. Yes, we are looking to fully automate some UIvision tests. The target environment will be a Jenkins CI pipeline, running Ubuntu Docker images, with Chrome (or Firefox) and the UI.Vision extension.

The Dockerfile installs Chrome, and then the following command run’s the tests:

/opt/google/chrome/chrome
  --allow-file-access-from-files
  --disable-translate
  --no-first-run
  --no-default-browser-check
  --user-data-dir
  --disable-dev-shm-usage
  --disable-features=InfiniteSessionRestore,TranslateUI
  --no-sandbox
  --ignore-certificate-errors
  --window-position=0,0
  --window-size=1440,900
  --force-device-scale-factor=1
  --load-extension=/dist/gcbalfbdmfieckjlnblleoemohcganoc/5.2.3_0
  --new-windows file:///home/chrome/test.html?direct=1&savelog=mylog

This tries to install the extension unpacked, but from what I seen in testing, it doesn’t matter whether it is packed or unpacked.

I tried a similar approach with Firefox, but add the extension XPI to the user’s .mozilla directory (/home/firefox/.mozilla) prior to launching the browser.

/usr/bin/firefox
  --new-instance
  --browser
  --window-size 1440,900
  --first-startup
  --new-window file:///home/chrome/test.html?direct=1&savelog=mylog

There are similar UI.Vision extension initialization failures in both cases.

This is a very interesting case. I assume the variable is only initialized after UI Vision is opened at least once. But in your case, that never happens, as it is always a fresh install. We will test this, and try to fix it soon. I will update the post when we know more.

Thanks for the update.