File tree Expand file tree Collapse file tree 1 file changed +13
-14
lines changed Expand file tree Collapse file tree 1 file changed +13
-14
lines changed Original file line number Diff line number Diff line change @@ -139,18 +139,22 @@ def __jq_confirm_dialog(self, question):
139
139
title: '%s',
140
140
content: '',
141
141
buttons: {
142
- fail_button: {
143
- btnClass: 'btn-red',
144
- text: 'NO / FAIL',
145
- action: function(){
146
- $jqc_status = "Failure!"
147
- }
148
- },
149
142
pass_button: {
150
143
btnClass: 'btn-green',
151
144
text: 'YES / PASS',
145
+ keys: ['y', 'p', '1'],
152
146
action: function(){
153
- $jqc_status = "Success!"
147
+ $jqc_status = "Success!";
148
+ jconfirm.lastButtonText = "Success!";
149
+ }
150
+ },
151
+ fail_button: {
152
+ btnClass: 'btn-red',
153
+ text: 'NO / FAIL',
154
+ keys: ['n', 'f', '2'],
155
+ action: function(){
156
+ $jqc_status = "Failure!";
157
+ jconfirm.lastButtonText = "Failure!";
154
158
}
155
159
}
156
160
}
@@ -210,12 +214,7 @@ def __manual_page_check(self, *args):
210
214
try :
211
215
status = self .execute_script ("return $jqc_status" )
212
216
except Exception :
213
- status = "Failure!"
214
- pre_status = self .execute_script (
215
- "return jconfirm.lastClicked.hasClass('btn-green')"
216
- )
217
- if pre_status :
218
- status = "Success!"
217
+ status = self .execute_script ("return jconfirm.lastButtonText" )
219
218
else :
220
219
# Fallback to plain js confirm dialogs if can't load jquery_confirm
221
220
if self .browser == "ie" :
You can’t perform that action at this time.
0 commit comments