adamdriscoll/selenium-powershell

Method invocation failed

Closed this issue · 0 comments

Error:

Exception calling "GoToUrl" with "1" argument(s): " (InsecureCertificate)"
At C:\Github\selenium-powershell\Internal\Start-SeFirefoxDriver.ps1:71 char:26
+         if ($StartURL) { $Driver.Navigate().GoToUrl($StartURL) }
+                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : InvalidOperationException

Method invocation failed because [Microsoft.Management.Infrastructure.CimInstance] does not contain a method named 'Where'.
At C:\Github\selenium-powershell\Internal\Get-DriverProcessId.ps1:11 char:9
+         $BrowserProcess = $Processes.Where( { $_.Name -ne 'conhost.ex ...
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (Where:String) [], RuntimeException
    + FullyQualifiedErrorId : MethodNotFound

Steps to reproduce

$Service = New-SeDriverService -Browser Firefox

$Service.HideCommandPromptWindow = $false
$Options = New-SeDriverOptions -Browser Firefox
$Options.AddAdditionalCapability('acceptSslCerts',$true)
$Options.AddAdditionalCapability('acceptInsecureCerts',$true)
$Options.LogLevel = [OpenQA.Selenium.LogLevel]::All

Start-SeDriver -Browser Firefox -Options $Options -StartURL 'https://self-signed.badssl.com/' -Position 1920x0 -Service $Service
Stop-SeDriver