Skip to content

_WD_Alert 'status' return success on False #372

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 9, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions wd_core.au3
Original file line number Diff line number Diff line change
Expand Up @@ -868,12 +868,11 @@ EndFunc ;==>_WD_ExecuteScript
; |SENDTEXT - Set the text field of the current user prompt to the given value
; |STATUS - Return logical value indicating the presence or absence of an alert
; $sOption - [optional] a string value. Default is ""
; Return values .: Success - Requested data returned by web driver.
; Return values .: Success - True/False or requested data returned by web driver.
; Failure - "" (empty string) and sets @error to one of the following values:
; - $_WD_ERROR_NoAlert
; - $_WD_ERROR_InvalidDataType
; Author ........: Danp2
; Modified ......:
; Modified ......: mLipok
; Remarks .......:
; Related .......: _WD_LastHTTPResult
; Link ..........: https://www.w3.org/TR/webdriver#user-prompts
Expand Down Expand Up @@ -913,6 +912,7 @@ Func _WD_Alert($sSession, $sCommand, $sOption = Default)
$iErr = @error

$sResult = ($iErr = $_WD_ERROR_NoAlert) ? False : True
If $iErr = $_WD_ERROR_NoAlert Then $iErr = $_WD_ERROR_Success

Case Else
Return SetError(__WD_Error($sFuncName, $_WD_ERROR_InvalidDataType, "(Accept|Dismiss|GetText|SendText|Status) $sCommand=>" & $sCommand), 0, "")
Expand Down