Skip to content

Commit ec98912

Browse files
rootroot
authored andcommitted
Updated driver and added support for Chrome Options
1 parent e0574c8 commit ec98912

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

Selenium.psm1

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
11
[System.Reflection.Assembly]::LoadFrom("$PSScriptRoot\assemblies\WebDriver.dll")
22
[System.Reflection.Assembly]::LoadFrom("$PSScriptRoot\assemblies\WebDriver.Support.dll")
33
function Start-SeChrome {
4-
New-Object -TypeName "OpenQA.Selenium.Chrome.ChromeDriver"
4+
Param(
5+
[Parameter(Mandatory = $false)]
6+
[array]$Arguments
7+
)
8+
if($Arguments) {
9+
$Chrome_Options = New-Object -TypeName "OpenQA.Selenium.Chrome.ChromeOptions"
10+
$Chrome_Options.AddArguments($Arguments)
11+
}
12+
New-Object -TypeName "OpenQA.Selenium.Chrome.ChromeDriver" -ArgumentList $Chrome_Options
513
}
614

715
function Start-SeFirefox {

assemblies/chromedriver.exe

-59.5 KB
Binary file not shown.

0 commit comments

Comments
 (0)