@@ -644,14 +644,14 @@ EndFunc ;==>_WD_Window
644
644
; #FUNCTION# ====================================================================================================================
645
645
; Name ..........: _WD_FindElement
646
646
; Description ...: Find element(s) by designated strategy
647
- ; Syntax ........: _WD_FindElement($sSession, $sStrategy, $sSelector[, $sStartNodeID = Default[, $lMultiple = Default[,
648
- ; $lShadowRoot = Default]]])
647
+ ; Syntax ........: _WD_FindElement($sSession, $sStrategy, $sSelector[, $sStartNodeID = Default[, $bMultiple = Default[,
648
+ ; $bShadowRoot = Default]]])
649
649
; Parameters ....: $sSession - Session ID from _WDCreateSession
650
650
; $sStrategy - Locator strategy. See defined constant $_WD_LOCATOR_* for allowed values
651
651
; $sSelector - Value to find
652
652
; $sStartNodeID - [optional] ID to use as starting node. Default is ""
653
- ; $lMultiple - [optional] Return multiple matching elements? Default is False
654
- ; $lShadowRoot - [optional] Starting node is a shadow root? Default is False
653
+ ; $bMultiple - [optional] Return multiple matching elements? Default is False
654
+ ; $bShadowRoot - [optional] Starting node is a shadow root? Default is False
655
655
;
656
656
; Return values .: Success - Element ID(s) returned by web driver
657
657
; Failure - ""
@@ -667,17 +667,17 @@ EndFunc ;==>_WD_Window
667
667
; Link ..........: https://www.w3.org/TR/webdriver#element-retrieval
668
668
; Example .......: No
669
669
; ===============================================================================================================================
670
- Func _WD_FindElement($sSession , $sStrategy , $sSelector , $sStartNodeID = Default , $lMultiple = Default , $lShadowRoot = Default )
670
+ Func _WD_FindElement($sSession , $sStrategy , $sSelector , $sStartNodeID = Default , $bMultiple = Default , $bShadowRoot = Default )
671
671
Local Const $sFuncName = " _WD_FindElement"
672
672
Local $sCmd , $sBaseCmd = ' ' , $sResponse , $sResult , $iErr
673
673
Local $oJson , $oValues , $sKey , $iRow , $aElements [0 ]
674
674
675
675
If $sStartNodeID = Default Then $sStartNodeID = " "
676
- If $lMultiple = Default Then $lMultiple = False
677
- If $lShadowRoot = Default Then $lShadowRoot = False
676
+ If $bMultiple = Default Then $bMultiple = False
677
+ If $bShadowRoot = Default Then $bShadowRoot = False
678
678
679
679
If $sStartNodeID Then
680
- $sBaseCmd = ($lShadowRoot ) ? " /shadow/" : " /element/"
680
+ $sBaseCmd = ($bShadowRoot ) ? " /shadow/" : " /element/"
681
681
$sBaseCmd &= $sStartNodeID
682
682
683
683
; Make sure using a relative selector if using xpath strategy
@@ -688,7 +688,7 @@ Func _WD_FindElement($sSession, $sStrategy, $sSelector, $sStartNodeID = Default,
688
688
EndIf
689
689
690
690
If $iErr = $_WD_ERROR_Success Then
691
- $sCmd = ' /element' & (($lMultiple ) ? ' s' : ' ' )
691
+ $sCmd = ' /element' & (($bMultiple ) ? ' s' : ' ' )
692
692
$sSelector = __WD_EscapeString($sSelector )
693
693
694
694
$sResponse = __WD_Post($_WD_BASE_URL & " :" & $_WD_PORT & " /session/" & $sSession & $sBaseCmd & $sCmd , ' {"using":"' & $sStrategy & ' ","value":"' & $sSelector & ' "}' )
@@ -697,7 +697,7 @@ Func _WD_FindElement($sSession, $sStrategy, $sSelector, $sStartNodeID = Default,
697
697
698
698
If $iErr = $_WD_ERROR_Success Then
699
699
If $_WD_HTTPRESULT = $HTTP_STATUS_OK Then
700
- If $lMultiple Then
700
+ If $bMultiple Then
701
701
702
702
$oJson = Json_Decode($sResponse )
703
703
$oValues = Json_Get($oJson , ' [value]' )
@@ -733,7 +733,7 @@ Func _WD_FindElement($sSession, $sStrategy, $sSelector, $sStartNodeID = Default,
733
733
Return SetError (__WD_Error($sFuncName , $iErr , " HTTP status = " & $_WD_HTTPRESULT ), $_WD_HTTPRESULT , " " )
734
734
EndIf
735
735
736
- Return SetError ($_WD_ERROR_Success , $_WD_HTTPRESULT , ($lMultiple ) ? $aElements : $sResult )
736
+ Return SetError ($_WD_ERROR_Success , $_WD_HTTPRESULT , ($bMultiple ) ? $aElements : $sResult )
737
737
EndFunc ; ==>_WD_FindElement
738
738
739
739
; #FUNCTION# ====================================================================================================================
@@ -859,11 +859,11 @@ EndFunc ;==>_WD_ElementAction
859
859
; #FUNCTION# ====================================================================================================================
860
860
; Name ..........: _WD_ExecuteScript
861
861
; Description ...: Execute Javascipt commands
862
- ; Syntax ........: _WD_ExecuteScript($sSession, $sScript[, $sArguments = Default[, $lAsync = Default]])
862
+ ; Syntax ........: _WD_ExecuteScript($sSession, $sScript[, $sArguments = Default[, $bAsync = Default]])
863
863
; Parameters ....: $sSession - Session ID from _WDCreateSession
864
864
; $sScript - Javascript command(s) to run
865
865
; $sArguments - [optional] String of arguments in JSON format
866
- ; $lAsync - [optional] Perform request asyncronously? Default is False.
866
+ ; $bAsync - [optional] Perform request asyncronously? Default is False.
867
867
; Return values .: Raw response from web driver
868
868
; @ERROR - $_WD_ERROR_Success
869
869
; - $_WD_ERROR_Exception
@@ -877,17 +877,17 @@ EndFunc ;==>_WD_ElementAction
877
877
; Link ..........: https://www.w3.org/TR/webdriver#executing-script
878
878
; Example .......: No
879
879
; ===============================================================================================================================
880
- Func _WD_ExecuteScript($sSession , $sScript , $sArguments = Default , $lAsync = Default )
880
+ Func _WD_ExecuteScript($sSession , $sScript , $sArguments = Default , $bAsync = Default )
881
881
Local Const $sFuncName = " _WD_ExecuteScript"
882
882
Local $sResponse , $sData , $sCmd
883
883
884
884
If $sArguments = Default Then $sArguments = " "
885
- If $lAsync = Default Then $lAsync = False
885
+ If $bAsync = Default Then $bAsync = False
886
886
887
887
$sScript = __WD_EscapeString($sScript )
888
888
889
889
$sData = ' {"script":"' & $sScript & ' ", "args":[' & $sArguments & ' ]}'
890
- $sCmd = ($lAsync ) ? ' async' : ' sync'
890
+ $sCmd = ($bAsync ) ? ' async' : ' sync'
891
891
892
892
$sResponse = __WD_Post($_WD_BASE_URL & " :" & $_WD_PORT & " /session/" & $sSession & " /execute/" & $sCmd , $sData )
893
893
@@ -1224,7 +1224,7 @@ EndFunc ;==>_WD_Option
1224
1224
; ===============================================================================================================================
1225
1225
Func _WD_Startup()
1226
1226
Local Const $sFuncName = " _WD_Startup"
1227
- Local $sFunction , $lLatest , $sUpdate , $sFile , $pid
1227
+ Local $sFunction , $bLatest , $sUpdate , $sFile , $pid
1228
1228
1229
1229
If $_WD_DRIVER = " " Then
1230
1230
Return SetError (__WD_Error($sFuncName , $_WD_ERROR_InvalidValue , " Location for Web Driver not set." & @CRLF ), 0 , 0 )
@@ -1236,7 +1236,7 @@ Func _WD_Startup()
1236
1236
1237
1237
If $_WD_DEBUG = $_WD_DEBUG_Info Then
1238
1238
$sFunction = " _WD_IsLatestRelease"
1239
- $lLatest = Call ($sFunction )
1239
+ $bLatest = Call ($sFunction )
1240
1240
1241
1241
Select
1242
1242
Case @error = 0xDEAD And @extended = 0xBEEF
@@ -1245,10 +1245,10 @@ Func _WD_Startup()
1245
1245
Case @error
1246
1246
$sUpdate = " (Update status unknown [" & @error & " ])"
1247
1247
1248
- Case $lLatest
1248
+ Case $bLatest
1249
1249
$sUpdate = " (Up to date)"
1250
1250
1251
- Case Not $lLatest
1251
+ Case Not $bLatest
1252
1252
$sUpdate = " (Update available)"
1253
1253
1254
1254
EndSelect
0 commit comments