Skip to content

Commit 00e8c16

Browse files
authored
Support _WD_Options('version') (#266)
1 parent 6c8318f commit 00e8c16

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

wd_core.au3

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1054,6 +1054,7 @@ EndFunc ;==>_WD_Cookies
10541054
; |HTTPTIMEOUTS - Set WinHTTP timeouts on each Get, Post, Delete request (Boolean)
10551055
; |PORT - Port used for web driver communication
10561056
; |SLEEP - Function to be called when UDF pauses the script execution
1057+
; |VERSION - Version number of UDF library (read only)
10571058
; $vValue - [optional] if no value is given, the current value is returned (default = "")
10581059
; Return values .: Success - 1 or current value.
10591060
; Failure - 0 or "" (empty string) and sets @error to $_WD_ERROR_InvalidDataType
@@ -1172,8 +1173,12 @@ Func _WD_Option($sOption, $vValue = Default)
11721173
EndIf
11731174
$_WD_Sleep = $vValue
11741175

1176+
Case "version"
1177+
If $vValue == "" Then Return $__WDVERSION
1178+
Return SetError(__WD_Error($sFuncName, $_WD_ERROR_InvalidDataType, "(none) $vValue: " & $vValue), 0, 0)
1179+
11751180
Case Else
1176-
Return SetError(__WD_Error($sFuncName, $_WD_ERROR_InvalidDataType, "(BaseURL|BinaryFormat|Console|ConsoleSuffix|DebugTrim|DefaultTimeout|Driver|DriverClose|DriverDetect|DriverParams|ErrorMsgBox|HTTPTimeouts|OutputDebug|Port|Sleep) $sOption=>" & $sOption), 0, 0)
1181+
Return SetError(__WD_Error($sFuncName, $_WD_ERROR_InvalidDataType, "(BaseURL|BinaryFormat|Console|ConsoleSuffix|DebugTrim|DefaultTimeout|Driver|DriverClose|DriverDetect|DriverParams|ErrorMsgBox|HTTPTimeouts|OutputDebug|Port|Sleep|Version) $sOption=>" & $sOption), 0, 0)
11771182
EndSwitch
11781183

11791184
Return 1

0 commit comments

Comments
 (0)