You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Tries to apply the given action to the currently visible alert.
46
+
*
47
+
* @param {AlertAction} action - The actual action to apply.
48
+
* @param {string} [buttonLabel] - The name of the button used to perform the chosen alert action. Only makes sense if the action is `accept` or `dismiss`.
49
+
* @returns {Promise<string[]|void>} If `action` is `getButtons`, a list of alert button labelsp; otherwise nothing.
50
+
* @remarks This should really be separate commands.
* Tries to apply the given action to the currently visible alert.
55
-
*
56
-
* @param {AlertAction} action - The actual action to apply.
57
-
* @param {string} [buttonLabel] - The name of the button used to perform the chosen alert action. Only makes sense if the action is `accept` or `dismiss`.
58
-
* @returns {Promise<string[]|void>} If `action` is `getButtons`, a list of alert button labelsp; otherwise nothing.
59
-
* @remarks This should really be separate commands.
60
-
* @this {XCUITestDriver}
61
-
*/
62
-
asyncmobileHandleAlert(action,buttonLabel){
63
-
switch(action){
64
-
case'accept':
65
-
returnawaitthis.postAcceptAlert({buttonLabel});
66
-
case'dismiss':
67
-
returnawaitthis.postDismissAlert({buttonLabel});
68
-
case'getButtons':
69
-
returnawaitthis.getAlertButtons();
70
-
default:
71
-
thrownewError(
72
-
`The 'action' value should be either 'accept', 'dismiss' or 'getButtons'. `+
0 commit comments