forked from adamdriscoll/selenium-powershell
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSelenium.psm1
22 lines (18 loc) · 808 Bytes
/
Selenium.psm1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
$functionFolders = @('Classes', 'Public', 'Internal')
. (Join-Path -Path $PSScriptRoot -ChildPath 'Internal/init.ps1')
ForEach ($folder in $functionFolders) {
$folderPath = Join-Path -Path $PSScriptRoot -ChildPath $folder
If (Test-Path -Path $folderPath) {
Write-Verbose -Message "Importing from $folder"
$functions = Get-ChildItem -Path $folderPath -Filter '*.ps1'
ForEach ($function in $functions) {
Write-Verbose -Message " Importing $($function.BaseName)"
. $($function.FullName)
}
}
}
$MyInvocation.MyCommand.ScriptBlock.Module.OnRemove = {
Get-SeDriver | Stop-SeDriver
}
$publicFunctions = (Get-ChildItem -Path "$PSScriptRoot\Public" -Filter '*.ps1').BaseName
Export-ModuleMember -Function $publicFunctions