I've tried clearing the Chrome Driver from Activity Monitor (Mac) and rerunning the test. It does not work. I've seen this question posted quite often but none of the solutions have worked so far and were all windows based. I am using C# and Visual Studio and a Mac.
Please see the below Stack Trace:
at OpenQA.Selenium.DriverService.Start()
at OpenQA.Selenium.Remote.DriverServiceCommandExecutor.Execute(Command commandToExecute)
at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
at OpenQA.Selenium.Remote.RemoteWebDriver.StartSession(ICapabilities desiredCapabilities)
at OpenQA.Selenium.Remote.RemoteWebDriver..ctor(ICommandExecutor commandExecutor, ICapabilities desiredCapabilities)
at OpenQA.Selenium.Chrome.ChromeDriver..ctor(ChromeDriverService service, ChromeOptions options, TimeSpan commandTimeout)
Please see the browser code below:
**BROWSER.CS**
public enum Drivers
{
Chrome,
}
#endregion
** Class containing browser driver setup, URL setup, Waits, find element definition, and browser manipulation methods**
public static class Browser
{
#region Driver Instantiation
static IWebDriver _webDriver;
public static ISearchContext Driver { get { return _webDriver; } }
**Returns the driver executable application**
internal static IWebDriver GetDriver(Drivers driver)
{
switch (driver)
{
case Drivers.Chrome:
return new ChromeDriver(@"/Users/wsmith/Projects/Github/folio-quality-assurance/Folio.Selenium.Framework");
default:
throw new NotImplementedException("I do not know the driver you specified.");
}
}
#endregion
#region Initialize Browser
**Initializes the webdriver, opens the browser window. This is called in the test fixtures to set up before running the tests**
public static void Initialize()
{
_webDriver = GetDriver(Drivers.Chrome);
_webDriver.Manage().Window.Maximize();
Goto("");
}
#endregion
#region URL