2

I'm working with automation tests on C# + Selenium WebDriver. I'd like to know if there is any possibility to run tests on virtualized AppV 5.1 browsers (Firefox, Chrome).

I've tried to set ChromeOptions.BinaryLocation to chrome.exe under %PROGRAMDATA%\App-V\<PackageId>\<VersionId>\Root\VFS\ProgramFilesX86\Google\Chrome\Application, but it doesn't work.

Each test crashes with error

    Error Message:
       Initialization method Am.Tests.Login_Test.Init threw exception. System.Invali
    dOperationException: System.InvalidOperationException: unknown error: cannot fin
    d Chrome binary
      (Driver info: chromedriver=2.22.397933 (1cab651507b88dec79b2b2a22d1943c01833cc
    1b),platform=Windows NT 6.1.7601 SP1 x86_64).
    Stack Trace:
        at OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response err
    orResponse)
       at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecu
    te, Dictionary`2 parameters)
       at OpenQA.Selenium.Remote.RemoteWebDriver.StartSession(ICapabilities desiredC
    apabilities)
       at OpenQA.Selenium.Remote.RemoteWebDriver..ctor(ICommandExecutor commandExecu
    tor, ICapabilities desiredCapabilities)
       at OpenQA.Selenium.Chrome.ChromeDriver..ctor(ChromeOptions options)
       at Am.Logic.UiContext..ctor(Browser brw)
       at Am.Tests.Login_Test.Init()

Please clarify

Yuriy Rozhkov
  • 117
  • 1
  • 11

1 Answers1

1

It is not enough to put the path for that EXE. When an App-V application is launched the App-V client detects is and takes over its process(es), running them in a containerized bubble.

The only way to interact with those process is to run your process inside the bubble too. You can launch an external process in the App-V bubble using a couple of methods.

Bogdan Mitrache
  • 10,536
  • 19
  • 34
  • @YuriyRozhkov , able to share how you managed to resolve this? – Ronaldo Oct 14 '19 at 09:58
  • @Ronaldo, Unfortunately, I don't work with AppV packages anymore. But I do remember it was easy straight-forward solution, e.g. run nunit process from inside the parent browser appv-package context, as Bogdan described above ```$AppVName = Get-AppvClientPackage ; Start-AppvVirtualProcess -AppvClientObject $AppVName nunit.exe ``` – Yuriy Rozhkov Oct 21 '19 at 17:40