Skip to content

Commit aaa7682

Browse files
committed
Use "about:blank" instead of "data:," for blank pages
1 parent 688dcb9 commit aaa7682

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

seleniumbase/fixtures/base_case.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -838,7 +838,7 @@ def open_start_page(self):
838838
"""Navigates the current browser window to the start_page.
839839
You can set the start_page on the command-line in three ways:
840840
'--start_page=URL', '--start-page=URL', or '--url=URL'.
841-
If the start_page is not set, then "data:," will be used."""
841+
If the start_page is not set, then "about:blank" will be used."""
842842
self.__check_scope()
843843
start_page = self.start_page
844844
if type(start_page) is str:
@@ -854,9 +854,11 @@ def open_start_page(self):
854854
self.__dont_record_open = False
855855
else:
856856
logging.info('Invalid URL: "%s"!' % start_page)
857-
self.open("data:,")
857+
if self.get_current_url() != "about:blank":
858+
self.open("about:blank")
858859
else:
859-
self.open("data:,")
860+
if self.get_current_url() != "about:blank":
861+
self.open("about:blank")
860862

861863
def open_if_not_url(self, url):
862864
"""Opens the url in the browser if it's not the current url."""
@@ -11721,9 +11723,9 @@ def setUp(self, masterqa_mode=False):
1172111723
self.open(new_start_page)
1172211724
self.__dont_record_open = False
1172311725
if self.recorder_ext or (self._crumbs and not good_start_page):
11724-
if self.get_current_url() != "data:,":
11726+
if self.get_current_url() != "about:blank":
1172511727
self.__new_window_on_rec_open = False
11726-
self.open("data:,")
11728+
self.open("about:blank")
1172711729
self.__new_window_on_rec_open = True
1172811730
if self.recorder_ext:
1172911731
self.__js_start_time = int(time.time() * 1000.0)

0 commit comments

Comments
 (0)