Skip to content

Commit e736359

Browse files
authored
add alert test case (#579)
* add alert test case * add comment
1 parent 230bac6 commit e736359

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

ios_tests/lib/ios/specs/ios/xcuitest_gestures.rb

+2
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ def open_alert_custom
8989
alert action: 'dismiss'
9090

9191
open_alert_custom
92+
list = alert action: 'getButtons'
93+
list.must_equal %w(Button1 Button2)
9294
alert action: 'accept', button_label: 'Button1'
9395
end
9496

lib/appium_lib/ios/xcuitest_gestures.rb

+2-1
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,8 @@ def select_picker_wheel(element:, order:, offset: nil)
146146
# @param action [String] The following actions are supported: accept, dismiss and getButtons. Mandatory parameter
147147
# @param button_label [String] The label text of an existing alert button to click on.
148148
# This is an optional parameter and is only valid in combination with accept and dismiss actions.
149-
# @return nil or Selenium::WebDriver::Error::NoSuchAlertError if no action sheet or alert
149+
# @return {} or Selenium::WebDriver::Error::NoSuchAlertError if no action sheet or alert
150+
# or button labels if action is equal to getButtons.
150151
#
151152
# ```ruby
152153
# alert action: "accept"

0 commit comments

Comments
 (0)