Skip to content
Merged
19 changes: 19 additions & 0 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: CI

on: [push]

jobs:
build:

runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]

steps:
- uses: actions/checkout@v1
- name: Run a one-line script
run: |
pwsh -Command "Install-Module Pester -Force -Scope CurrentUser"
pwsh ./Selenium.tests.ps1

16 changes: 16 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Release

on: [release]

jobs:
build:

runs-on: ubuntu-latest
secrets: ["api_key"]

steps:
- uses: actions/checkout@v1
- name: Publish
run: |
pwsh -Command "Publish-Module -Path ./Selenium.psd1 -NuGetApiKey $Env:api_key"

8 changes: 8 additions & 0 deletions Selenium.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,14 @@ function Start-SeChrome {

}

if($Headless -and $DefaultDownloadPath) {
$HeadlessDownloadParams = New-Object 'system.collections.generic.dictionary[[System.String],[System.Object]]]'
$HeadlessDownloadParams.Add('behavior', 'allow')
$HeadlessDownloadParams.Add('downloadPath', $DefaultDownloadPath.FullName)

$Driver.ExecuteChromeCommand('Page.setDownloadBehavior', $HeadlessDownloadParams)
}

if($StartURL){
Enter-SeUrl -Driver $Driver -Url $StartURL
}
Expand Down