Skip to content

Commit cdef593

Browse files
authored
Merge pull request #2 from adamdriscoll/master
Merge From Upstream
2 parents 26e5410 + b76093f commit cdef593

File tree

3 files changed

+43
-0
lines changed

3 files changed

+43
-0
lines changed

.github/workflows/build-test.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: CI
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
8+
runs-on: ${{ matrix.os }}
9+
strategy:
10+
matrix:
11+
os: [ubuntu-latest, windows-latest, macOS-latest]
12+
13+
steps:
14+
- uses: actions/checkout@v1
15+
- name: Run a one-line script
16+
run: |
17+
pwsh -Command "Install-Module Pester -Force -Scope CurrentUser"
18+
pwsh ./Selenium.tests.ps1
19+

.github/workflows/release.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Release
2+
3+
on: [release]
4+
5+
jobs:
6+
build:
7+
8+
runs-on: ubuntu-latest
9+
secrets: ["api_key"]
10+
11+
steps:
12+
- uses: actions/checkout@v1
13+
- name: Publish
14+
run: |
15+
pwsh -Command "Publish-Module -Path ./Selenium.psd1 -NuGetApiKey $Env:api_key"
16+

Selenium.psm1

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,14 @@ function Start-SeChrome {
114114

115115
}
116116

117+
if($Headless -and $DefaultDownloadPath) {
118+
$HeadlessDownloadParams = New-Object 'system.collections.generic.dictionary[[System.String],[System.Object]]]'
119+
$HeadlessDownloadParams.Add('behavior', 'allow')
120+
$HeadlessDownloadParams.Add('downloadPath', $DefaultDownloadPath.FullName)
121+
122+
$Driver.ExecuteChromeCommand('Page.setDownloadBehavior', $HeadlessDownloadParams)
123+
}
124+
117125
if($StartURL){
118126
Enter-SeUrl -Driver $Driver -Url $StartURL
119127
}

0 commit comments

Comments
 (0)