I am runnning selenium webdriver tests on a Windows 10 system. The tests are in C# using Selenium.Webdriver 3.141.0, and Selenium.WebDriver.ChromeDriver 91.0.4472.10100. On this computer whenever I launch Selenium tests either via Visual Studio or via command line (executed by an Azure DevOps pipeline), as soon as the browser launches, Windows logs off.
Tests ran on this computer without issue until recently, and the same tests currently run on other computers without any problems. No events that would seem related are logged, aside from information events that Windows has logged off and logged on. I've also run Windows updates, deleted temp files, run basic diagnostics on the system. No magic bullets have been found, and I'm running out of options other than scrapping this system and building a new one.
The tests are using very straightforward code, as a demonstration of just how simple the code can be exhibiting this issue, here is some code that I whipped up that is textbook day one intro code, and this causes the Windows account logout:
using OpenQA.Selenium;
using OpenQA.Selenium.Chrome;
namespace SeleniumConsoleTest
{
class Program
{
static void Main(string[] args)
{
IWebDriver driver = new ChromeDriver();
driver.Navigate().GoToUrl("http://localhost/");
driver.Close();
}
}
}