Skip to content

Commit 5af9e02

Browse files
committed
Fix link-checking methods
1 parent 495da7e commit 5af9e02

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

seleniumbase/fixtures/page_utils.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,11 +252,18 @@ def _get_unique_links(page_url, soup):
252252
link = prefix + link
253253
elif link.startswith("/"):
254254
link = full_base_url + link
255+
elif link == "./":
256+
link = page_url
255257
elif link.startswith("./"):
256258
f_b_url = full_base_url
257259
if len(simple_url.split("/")) > 1:
258260
f_b_url = full_base_url + "/" + simple_url.split("/")[1]
259261
link = f_b_url + link[1:]
262+
elif link.startswith("../"):
263+
if page_url.endswith("/"):
264+
link = page_url + link
265+
else:
266+
link = page_url + "/" + link
260267
elif link.startswith("#"):
261268
link = full_base_url + link
262269
elif "//" not in link:

0 commit comments

Comments
 (0)