Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 53edf8c

Browse files
committed
Stop open driver on Module unload
1 parent 0571e04 commit 53edf8c

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

‎Internal/init.ps1

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
using namespace System.Collections.Generic
22

3+
4+
if (!$PSCommandPath.EndsWith('init.ps1')) {
5+
$MyInvocation.MyCommand.ScriptBlock.Module.OnRemove = {
6+
Get-SeDriver | Stop-SeDriver
7+
}
8+
9+
}
10+
11+
312
Function New-Condition {
413
Param([Parameter(Mandatory = $true)]$Text, [Type]$ValueType, $Tooltip, [Switch]$OptionalValue, $ElementRequired = $true )
514
return [PSCustomObject]@{

‎Output/Selenium/Selenium.psm1

350 Bytes
Binary file not shown.

‎Selenium.psm1

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,10 @@ ForEach ($folder in $functionFolders) {
1313
}
1414
}
1515
}
16+
17+
$MyInvocation.MyCommand.ScriptBlock.Module.OnRemove = {
18+
Get-SeDriver | Stop-SeDriver
19+
}
20+
1621
$publicFunctions = (Get-ChildItem -Path "$PSScriptRoot\Public" -Filter '*.ps1').BaseName
1722
Export-ModuleMember -Function $publicFunctions

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /