| 93 | } |
| 94 | |
| 95 | int Alert::Dismiss() { |
| 96 | LOG(TRACE) << "Entering Alert::Dismiss"; |
| 97 | DialogButtonInfo button_info = this->GetDialogButton(CANCEL); |
| 98 | if (!button_info.button_exists) { |
| 99 | if (!this->is_standard_control_alert_) { |
| 100 | // If this is not a standard control alert (i.e., has the |
| 101 | // "do not create any more dialogs check box"), the use of |
| 102 | // dialog control IDs won't work, so we have to look explicitly |
| 103 | // for the OK button. |
| 104 | button_info = this->GetDialogButton(OK); |
| 105 | } |
| 106 | } |
| 107 | |
| 108 | if (!button_info.button_exists) { |
| 109 | LOG(WARN) << "Cancel button does not exist on alert"; |
| 110 | return EUNHANDLEDERROR; |
| 111 | } |
| 112 | |
| 113 | // TODO(JimEvans): Check return code and return an appropriate |
| 114 | // error if the alert didn't get closed properly. |
| 115 | LOG(DEBUG) << "Closing alert using SendMessage"; |
| 116 | int status_code = this->ClickAlertButton(button_info); |
| 117 | return WD_SUCCESS; |
| 118 | } |
| 119 | |
| 120 | int Alert::SendKeys(const std::string& keys) { |
| 121 | LOG(TRACE) << "Entering Alert::SendKeys"; |
no test coverage detected