Skip to content

Commit c433b22

Browse files
authored
Fixing names and $iErr usage (#503)
* Small_correct * $iErr usage
1 parent c81c96f commit c433b22

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

wd_capabilities.au3

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,10 +297,10 @@ Func _WD_CapabilitiesGet()
297297
Local $Data1 = Json_Encode($_WD_CAPS__OBJECT)
298298

299299
Local $Data2 = Json_Decode($Data1)
300-
Local $Json2 = Json_Encode($Data2, $Json_UNQUOTED_STRING)
300+
Local $Json2 = Json_Encode($Data2, $JSON_UNQUOTED_STRING)
301301

302302
Local $Data3 = Json_Decode($Json2)
303-
Local $Json3 = Json_Encode($Data3, $Json_PRETTY_PRINT, " ", ",\n", ",\n", ":")
303+
Local $Json3 = Json_Encode($Data3, $JSON_PRETTY_PRINT, " ", ",\n", ",\n", ":")
304304

305305
If $Json3 = '' Or $Json3 = '""' Or Not IsString($Json3) Then $Json3 = $_WD_EmptyDict
306306

wd_helper.au3

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -692,7 +692,7 @@ Func _WD_GetFrameCount($sSession)
692692
Local Const $sFuncName = "_WD_GetFrameCount"
693693
Local $iValue = _WD_ExecuteScript($sSession, "return window.frames.length", Default, Default, $_WD_JSON_Value)
694694
Local $iErr = @error
695-
If @error Then $iValue = 0
695+
If $iErr Then $iValue = 0
696696
Return SetError(__WD_Error($sFuncName, $iErr), 0, Number($iValue))
697697
EndFunc ;==>_WD_GetFrameCount
698698

@@ -1984,7 +1984,7 @@ Func _WD_SelectFiles($sSession, $sStrategy, $sSelector, $sFilename)
19841984
If $iErr = $_WD_ERROR_Success Then
19851985
$sResult = _WD_ExecuteScript($sSession, "return arguments[0].files.length", __WD_JsonElement($sElement), Default, $_WD_JSON_Value)
19861986
$iErr = @error
1987-
If @error Then $sResult = "0"
1987+
If $iErr Then $sResult = "0"
19881988
EndIf
19891989
EndIf
19901990

@@ -2266,7 +2266,7 @@ Func _WD_GetBrowserVersion($sBrowser)
22662266
Local $sPath = _WD_GetBrowserPath($sBrowser)
22672267
$iErr = @error
22682268
$iExt = @extended
2269-
If @error Then
2269+
If $iErr Then
22702270
; as registry checks fails, now checking if file exist
22712271
If FileExists($sBrowser) Then
22722272
; Resetting as we are now checking file instead registry entries

0 commit comments

Comments
 (0)