I'm having trouble getting PowerShell and chromedriver to work together on a Windows 7 system.
OS: Windows 7 x64 Enterprise Service Pack 1 (fully patched)
Chrome:
ChromeDriver: 2.10.267521
PSVersion: 4.0
WSManStackVersion: 3.0
SerializationVersion: 1.1.0.1
CLRVersion: 4.0.30319.18063
BuildVersion: 6.3.9600.16406
PSCompatibleVersions: {1.0, 2.0, 3.0, 4.0}
PSRemotingProtocolVersion: 2.2
The following simple PowerShell script returns the following errors. The first error is when only a single argument argument (ChromeOptions object) is passed in. The second error is when the path to chromedriver, ChromeOptions and a timeout are included in the initialization.
Anybody have thoughts as to what I'm missing or haven't done?
New-Object : Exception calling ".ctor" with "1" argument(s): "Requested value 'Windows NT' was not found."
At C:\Smoketests\Test04.ps1:21 char:12
+ $driver1 = New-Object OpenQA.Selenium.Chrome.ChromeDriver($options)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [New-Object], MethodInvocationException
+ FullyQualifiedErrorId : ConstructorInvokedThrowException,Microsoft.PowerShell.Commands.NewObjectCommand
At C:\Smoketests\Test04.ps1:22 char:12
+ $driver2 = New-Object OpenQA.Selenium.Chrome.ChromeDriver($chromeDriverDir, $opt ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [New-Object], MethodInvocationException
+ FullyQualifiedErrorId : ConstructorInvokedThrowException,Microsoft.PowerShell.Commands.NewObjectCommand
===========================
$webDriverDir = "$PSScriptRoot\tools\WebDriver"
$env:Path += ";C:\Smoketests\tools\WebDriver"
$chromeDriverDir = "C:\Smoketests\tools\WebDriver\"
$chromeExe =
Add-Type -Path "$webDriverDir\WebDriver.dll"
Add-Type -Path "$webDriverDir\WebDriver.Support.dll"
$capabilities = New-Object OpenQA.Selenium.Remote.DesiredCapabilities
$capabilities.SetCapability("chrome.switches", $capabilityValue)
$options = New-Object OpenQA.Selenium.Chrome.ChromeOptions
$options.AddArgument("--enable-extensions")
$options.addArgument("--start-maximized");
$options.addArgument("--disable-new-ntp");
$options.addArgument("--test-type");
$options.BinaryLocation = "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"
$driver1 = New-Object OpenQA.Selenium.Chrome.ChromeDriver($options)
$driver2 = New-Object OpenQA.Selenium.Chrome.ChromeDriver($chromeDriverDir, $options, 1000)