I am learning to use Selenium (V2.2.0) and these are some details on how this works. I'd like to uncover the pitfalls before they get there, and I've stumbled into one.
When I create my ChromeDriver, it always brings up a "Google Chrome EULA" and pops up two buttons: "Accept and Run" and "Cancel". I want this process to be automated without human intervention.
I referred this list of Chromium Command Switches but did not find any that worked, nor did any mention EULA. The test works fine if the user clicks "Accept and Run" and then let the code continue.
The code, up to the line that causes the problem, is below:
using (var driverService = ChromeDriverService.CreateDefaultService(@"C:\Apps\ChromeDriver\"))
{
driverService.Start();
// This line pops up the EULA
IWebDriver driver = new ChromeDriver(@"C:\Apps\ChromeDriver\");
// Test cases continued
}
}