Skip to content

Commit 6739cc3

Browse files
committed
Optimize Recorder-exported files
1 parent 8a55f65 commit 6739cc3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

seleniumbase/fixtures/base_case.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3598,6 +3598,7 @@ def __process_recorded_actions(self):
35983598
or srt_actions[n - 1][0] == "js_ca"
35993599
)
36003600
):
3601+
sel1 = srt_actions[n - 1][1]
36013602
url1 = srt_actions[n - 1][2]
36023603
if (
36033604
srt_actions[n - 1][0] == "js_cl"
@@ -3616,6 +3617,8 @@ def __process_recorded_actions(self):
36163617
if (
36173618
url1 == url2
36183619
or url1 == url2.replace("www.", "")
3620+
or url1 == url2.replace("https://", "http://")
3621+
or sel1.split(" ")[-1].startswith("a[href=")
36193622
or (len(url1) > 0
36203623
and (url2.startswith(url1) or "?search" in url1)
36213624
and (int(srt_actions[n][3]) - int(
@@ -3643,6 +3646,8 @@ def __process_recorded_actions(self):
36433646
url2 = url2[:-1]
36443647
if url1.replace("www.", "") == url2.replace("www.", ""):
36453648
srt_actions[n - 1][0] = "_skip"
3649+
elif url1.replace("http://", "https://") == url2:
3650+
srt_actions[n - 1][0] = "_skip"
36463651
elif url2.startswith(url1):
36473652
srt_actions[n][0] = "f_url"
36483653
for n in range(len(srt_actions)):

0 commit comments

Comments
 (0)