Skip to content

Commit a2cccca

Browse files
committed
Chore: Remove left over error checks
1 parent b984f20 commit a2cccca

File tree

1 file changed

+0
-36
lines changed

1 file changed

+0
-36
lines changed

wd_core.au3

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -727,12 +727,6 @@ Func _WD_Window($sSession, $sCommand, $sOption = Default)
727727
$oJson = Json_Decode($sResponse)
728728
$sResult = Json_Get($oJson, "[value]")
729729
EndSwitch
730-
731-
ElseIf $_WD_HTTPRESULT = $HTTP_STATUS_NOT_FOUND Then
732-
$oJson = Json_Decode($sResponse)
733-
$sErr = Json_Get($oJson, "[value][error]")
734-
$iErr = ($sErr == $WD_Element_Stale) ? $_WD_ERROR_NoMatch : $_WD_ERROR_Exception
735-
736730
Else
737731
$iErr = $_WD_ERROR_Exception
738732
EndIf
@@ -814,11 +808,6 @@ Func _WD_FindElement($sSession, $sStrategy, $sSelector, $sStartElement = Default
814808
$sResult = Json_Get($oJson, "[value][" & $_WD_ELEMENT_ID & "]")
815809
EndIf
816810

817-
ElseIf $_WD_HTTPRESULT = $HTTP_STATUS_NOT_FOUND Then
818-
$oJson = Json_Decode($sResponse)
819-
$sErr = Json_Get($oJson, "[value][error]")
820-
$iErr = ($sErr == $WD_Element_NotFound) ? $_WD_ERROR_NoMatch : $_WD_ERROR_Exception
821-
822811
Else
823812
$iErr = $_WD_ERROR_Exception
824813
EndIf
@@ -908,26 +897,6 @@ Func _WD_ElementAction($sSession, $sElement, $sCommand, $sOption = Default)
908897
$sResult = Json_Get($oJson, "[value]")
909898
EndSwitch
910899

911-
Case $HTTP_STATUS_NOT_FOUND
912-
$oJson = Json_Decode($sResponse)
913-
$sErr = Json_Get($oJson, "[value][error]")
914-
$iErr = ($sErr == $WD_Element_Stale) ? $_WD_ERROR_NoMatch : $_WD_ERROR_Exception
915-
916-
Case $HTTP_STATUS_BAD_REQUEST
917-
$oJson = Json_Decode($sResponse)
918-
$sErr = Json_Get($oJson, "[value][error]")
919-
920-
Switch $sErr
921-
Case $WD_Element_Invalid
922-
$iErr = $_WD_ERROR_InvalidArgue
923-
924-
Case $WD_Element_Intercept, $WD_Element_NotInteract
925-
$iErr = $_WD_ERROR_ElementIssue
926-
927-
Case Else
928-
$iErr = $_WD_ERROR_Exception
929-
EndSwitch
930-
931900
Case Else
932901
$iErr = $_WD_ERROR_Exception
933902
EndSwitch
@@ -992,9 +961,6 @@ Func _WD_ExecuteScript($sSession, $sScript, $sArguments = Default, $lAsync = Def
992961
EndIf
993962

994963
Return SetError($_WD_ERROR_Success, $_WD_HTTPRESULT, $sResponse)
995-
996-
997-
;~ Return SetError(($_WD_HTTPRESULT <> $HTTP_STATUS_OK) ? $_WD_ERROR_GeneralError : $_WD_ERROR_Success, $_WD_HTTPRESULT, $sResponse)
998964
EndFunc ;==>_WD_ExecuteScript
999965

1000966

@@ -1737,8 +1703,6 @@ Func __WD_TranslateQuotes($sData)
17371703
Return SetError($_WD_ERROR_Success, 0, $sResult)
17381704
EndFunc
17391705

1740-
1741-
17421706
; #INTERNAL_USE_ONLY# ===========================================================================================================
17431707
; Name ..........: __WD_DetectError
17441708
; Description ...: Evaluate results from webdriver to identify errors

0 commit comments

Comments
 (0)