@@ -3766,6 +3766,7 @@ def __process_recorded_actions(self):
3766
3766
ext_actions.append("do_fi")
3767
3767
ext_actions.append("as_at")
3768
3768
ext_actions.append("as_te")
3769
+ ext_actions.append("astnv")
3769
3770
ext_actions.append("as_et")
3770
3771
ext_actions.append("wf_el")
3771
3772
ext_actions.append("sw_fr")
@@ -4116,6 +4117,7 @@ def __process_recorded_actions(self):
4116
4117
elif (
4117
4118
action[0] == "as_te"
4118
4119
or action[0] == "as_et"
4120
+ or action[0] == "astnv"
4119
4121
or action[0] == "da_te"
4120
4122
or action[0] == "da_et"
4121
4123
):
@@ -4125,6 +4127,8 @@ def __process_recorded_actions(self):
4125
4127
method = "assert_text"
4126
4128
if action[0] == "as_et":
4127
4129
method = "assert_exact_text"
4130
+ elif action[0] == "astnv":
4131
+ method = "assert_text_not_visible"
4128
4132
elif action[0] == "da_te":
4129
4133
method = "deferred_assert_text"
4130
4134
elif action[0] == "da_et":
@@ -10303,16 +10307,12 @@ def assert_element_not_visible(
10303
10307
timeout = settings.SMALL_TIMEOUT
10304
10308
if self.timeout_multiplier and timeout == settings.SMALL_TIMEOUT:
10305
10309
timeout = self.__get_new_timeout(timeout)
10306
- original_selector = selector
10307
- selector, by = self.__recalculate_selector(selector, by)
10308
10310
self.wait_for_element_not_visible(selector, by=by, timeout=timeout)
10309
10311
if self.recorder_mode:
10310
10312
url = self.get_current_url()
10311
10313
if url and len(url) > 0:
10312
10314
if ("http:") in url or ("https:") in url or ("file:") in url:
10313
10315
if self.get_session_storage_item("pause_recorder") == "no":
10314
- if by == By.XPATH:
10315
- selector = original_selector
10316
10316
time_stamp = self.execute_script("return Date.now();")
10317
10317
origin = self.get_origin()
10318
10318
action = ["asenv", selector, origin, time_stamp]
@@ -10345,9 +10345,20 @@ def assert_text_not_visible(
10345
10345
timeout = settings.SMALL_TIMEOUT
10346
10346
if self.timeout_multiplier and timeout == settings.SMALL_TIMEOUT:
10347
10347
timeout = self.__get_new_timeout(timeout)
10348
- return self.wait_for_text_not_visible(
10348
+ self.wait_for_text_not_visible(
10349
10349
text, selector, by=by, timeout=timeout
10350
10350
)
10351
+ if self.recorder_mode:
10352
+ url = self.get_current_url()
10353
+ if url and len(url) > 0:
10354
+ if ("http:") in url or ("https:") in url or ("file:") in url:
10355
+ if self.get_session_storage_item("pause_recorder") == "no":
10356
+ time_stamp = self.execute_script("return Date.now();")
10357
+ origin = self.get_origin()
10358
+ text_selector = [text, selector]
10359
+ action = ["astnv", text_selector, origin, time_stamp]
10360
+ self.__extra_actions.append(action)
10361
+ return True
10351
10362
10352
10363
############
10353
10364
0 commit comments