@@ -1827,6 +1827,16 @@ def hover_and_click(
1827
1827
self .scroll_to (hover_selector , by = hover_by )
1828
1828
pre_action_url = self .driver .current_url
1829
1829
pre_window_count = len (self .driver .window_handles )
1830
+ if self .recorder_mode :
1831
+ url = self .get_current_url ()
1832
+ if url and len (url ) > 0 :
1833
+ if ("http:" ) in url or ("https:" ) in url or ("file:" ) in url :
1834
+ if self .get_session_storage_item ("pause_recorder" ) == "no" :
1835
+ time_stamp = self .execute_script ("return Date.now();" )
1836
+ origin = self .get_origin ()
1837
+ the_selectors = [hover_selector , click_selector ]
1838
+ action = ["ho_cl" , the_selectors , origin , time_stamp ]
1839
+ self .__extra_actions .append (action )
1830
1840
outdated_driver = False
1831
1841
element = None
1832
1842
try :
@@ -3276,6 +3286,17 @@ def __process_recorded_actions(self):
3276
3286
origin = origin [0 :- 1 ]
3277
3287
if origin not in origins :
3278
3288
origins .append (origin )
3289
+ for n in range (len (srt_actions )):
3290
+ if (
3291
+ srt_actions [n ][0 ] == "click"
3292
+ and n > 0
3293
+ and srt_actions [n - 1 ][0 ] == "ho_cl"
3294
+ and srt_actions [n - 1 ][2 ] in origins
3295
+ ):
3296
+ srt_actions [n - 1 ][0 ] = "_skip"
3297
+ srt_actions [n ][0 ] = "h_clk"
3298
+ srt_actions [n ][1 ] = srt_actions [n - 1 ][1 ][0 ]
3299
+ srt_actions [n ][2 ] = srt_actions [n - 1 ][1 ][1 ]
3279
3300
ext_actions = []
3280
3301
ext_actions .append ("js_cl" )
3281
3302
ext_actions .append ("as_el" )
0 commit comments