Hi,
I’m trying to automate web tests with the autorun ui.vision.html file together with C# and Selenium WebDriver. I followed your guide: paste autorun file with parameters to address bar and everything went well…cool
But when I want to do with Selenium WebDriver in C# and fresh installation of extension, it does not work. The scenario is following:
Start WebDriver (chromedriver) and Selenium with option chromeOptions.AddExtension(...). That installs the UI.Vision RPA extension. OK.
The browser is opened and chromedriver is working. .
But when paste same autorun file via chromedriver from Selenium: driver.Url = "file://...." I got an error message
Error #204: It seems UI.Vision RPA is not installed yet - or you need to turn on Allow access to file URLs for UI.Vision RPA in your browsers extension settings.
Then I’ve observed one thing. When the extension is installed and NOT opened yet (the main extension settings window of UI.Vision.RPA), then it throws mentioned error when autorun wants to start. In all cases. Manually, from C#…
When the settings window was sometimes already opened after installation, then the autorun will go fine.
So it seems that the extension needs to be somehow initialized before first autorun or is it normal behavior?
And from the C# Selenium WebDriver, is my suggested solution doable? So Selenium starts the chromedriver and then executes the autorun?
XModules are already installed on Windows and I’m using hard-drive file storage. I was also trying search if is possible to somehow “start” the extension settings from chromedriver so it is initialized first but I wasn’t successful. Otherwise I have to find some workaround for that.
I confirmed the issue. As you correctly assumed, the extension runs some setup processes when it is first started. We will check if we can run these procedures also directly after installation.
One possible workaround is that you use desktop automation (specifically web extension testing) to start and then close the extension once. This can be done by a preinstalled version of UI Vision in either a different browser (Firefox, Edge) or simply a different Chrome profile. Then the procedure would be:
Use webdriver to install RPA extension
Call macro in preinstalled UI.Vision (in other browser or profile) to click extension button once and then send XTYPE Alt+F4 to close it again.
The fresh RPA installation is now ready to run your automation
Then I navigate chromedriver to the autorun file and voila…the test starts
Btw. it would be really nice if it would be possible to set the home folder with parameter in command line (temporary or permament?). It could be very useful when configuring the test case in pipelines so you don’t have to rely on home folder setup in extension itself.