Skip to content

Commit 5e818f4

Browse files
committed
Set the initial URL with the start_page command-line option
1 parent 5c15469 commit 5e818f4

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

seleniumbase/fixtures/base_case.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2787,6 +2787,13 @@ def get_new_driver(self, browser=None, headless=None,
27872787
self.wait_for_ready_state_complete()
27882788
except Exception:
27892789
pass # Keep existing browser resolution
2790+
if self.start_page and len(self.start_page) >= 4:
2791+
if page_utils.is_valid_url(self.start_page):
2792+
self.open(self.start_page)
2793+
else:
2794+
new_start_page = "http://" + self.start_page
2795+
if page_utils.is_valid_url(new_start_page):
2796+
self.open(new_start_page)
27902797
return new_driver
27912798

27922799
def switch_to_driver(self, driver):

0 commit comments

Comments
 (0)