@@ -202,6 +202,12 @@ def generate_gherkin(srt_actions):
202
202
sb_actions .append ("Set content to default" )
203
203
elif action [0 ] == "sleep" :
204
204
sb_actions .append ("Sleep for %s seconds" % action [1 ])
205
+ elif action [0 ] == "wf_el" :
206
+ method = "Wait for element"
207
+ if '"' not in action [1 ]:
208
+ sb_actions .append ('%s "%s"' % (method , action [1 ]))
209
+ else :
210
+ sb_actions .append ("%s '%s'" % (method , action [1 ]))
205
211
elif action [0 ] == "as_el" :
206
212
method = "Assert element"
207
213
if '"' not in action [1 ]:
@@ -275,13 +281,22 @@ def generate_gherkin(srt_actions):
275
281
'In \' %s\' assert attribute "%s"'
276
282
% (action [1 ][0 ], action [1 ][1 ])
277
283
)
278
- elif action [0 ] == "as_te" or action [0 ] == "as_et" :
284
+ elif (
285
+ action [0 ] == "as_te"
286
+ or action [0 ] == "as_et"
287
+ or action [0 ] == "da_te"
288
+ or action [0 ] == "da_et"
289
+ ):
279
290
import unicodedata
280
291
281
292
action [1 ][0 ] = unicodedata .normalize ("NFKC" , action [1 ][0 ])
282
293
method = "Assert text"
283
294
if action [0 ] == "as_et" :
284
295
method = "Assert exact text"
296
+ elif action [0 ] == "da_te" :
297
+ method = "Deferred assert text"
298
+ elif action [0 ] == "da_et" :
299
+ method = "Deferred assert exact text"
285
300
if action [1 ][1 ] != "html" :
286
301
if '"' not in action [1 ][0 ] and '"' not in action [1 ][1 ]:
287
302
sb_actions .append (
@@ -312,10 +327,24 @@ def generate_gherkin(srt_actions):
312
327
sb_actions .append (
313
328
"%s '%s'" % (method , action [1 ][0 ])
314
329
)
330
+ elif action [0 ] == "da_el" :
331
+ method = "Deferred assert element"
332
+ if '"' not in action [1 ]:
333
+ sb_actions .append ('%s "%s"' % (method , action [1 ]))
334
+ else :
335
+ sb_actions .append ("%s '%s'" % (method , action [1 ]))
336
+ elif action [0 ] == "da_ep" :
337
+ method = "Deferred assert element present"
338
+ if '"' not in action [1 ]:
339
+ sb_actions .append ('%s "%s"' % (method , action [1 ]))
340
+ else :
341
+ sb_actions .append ("%s '%s'" % (method , action [1 ]))
315
342
elif action [0 ] == "ss_tl" :
316
343
sb_actions .append ("Save screenshot to logs" )
317
344
elif action [0 ] == "sh_fc" :
318
345
sb_actions .append ("Show file choosers" )
346
+ elif action [0 ] == "pr_da" :
347
+ sb_actions .append ("Process deferred asserts" )
319
348
elif action [0 ] == "c_l_s" :
320
349
sb_actions .append ("Clear Local Storage" )
321
350
elif action [0 ] == "c_s_s" :
0 commit comments