I’ve seen a few posts in the forum related to Selenium testing but haven’t seen anything that might explain the behavior I’m seeing. I’ve also seen several posts online and youtube videos about folks running .NET based Selenium tests via Octopus, so I know it if possible.
In my environment, I’m using NUnit as the test executor and running the tests via a powershell script during the deploy process (nunit3-console.exe mytest.dll --test Test_I_Want_To_Run). I’m using the Chrome WebDriver and passing in arguments at startup to run in headless mode, and setting the browser size to 1920x1080. I’m also setting the browser size using the Selenium API. The test runs successfully on the Windows 10 box when I run it as a logged in user. When Octopus runs it, the test starts and is unable to locate elements on the page, which I believe to be caused by the fact that the browser window is not sized correctly or visible at all (my test takes a screenshot on failure, and the screenshot is blank).
I’ve also tried setting the Octopus Tentacle Service user to run as local system with “Allow service to interact with desktop” checked. That did not help.
Does anyone have any thoughts about what might be incorrect in the Octopus execution environment that is causing the behavior I’m seeing?