diff --git a/notebook/tests/selenium/quick_selenium.py b/notebook/tests/selenium/quick_selenium.py index 489002597..10e46e1f3 100644 --- a/notebook/tests/selenium/quick_selenium.py +++ b/notebook/tests/selenium/quick_selenium.py @@ -1,3 +1,8 @@ +"""Utilities for driving Selenium interactively to develop tests. + +These are not used in the tests themselves - rather, the developer writing tests +can use them to experiment with Selenium. +""" from selenium.webdriver import Firefox from notebook.tests.selenium.utils import Notebook diff --git a/notebook/tests/selenium/utils.py b/notebook/tests/selenium/utils.py index 31d75b7d4..b2e331d3b 100644 --- a/notebook/tests/selenium/utils.py +++ b/notebook/tests/selenium/utils.py @@ -36,7 +36,7 @@ class Notebook: def __init__(self, browser): self.browser = browser - self.remove_safety_check() + self.disable_autosave_and_onbeforeunload() def __len__(self): return len(self.cells) @@ -76,7 +76,7 @@ class Notebook: def index(self, cell): return self.cells.index(cell) - def remove_safety_check(self): + def disable_autosave_and_onbeforeunload(self): """Disable request to save before closing window and autosave. This is most easily done by using js directly. @@ -208,7 +208,7 @@ def new_window(browser, selector=None): """Contextmanager for switching to & waiting for a window created. This context manager gives you the ability to create a new window inside - the created context and it will switch you to that new window.abs + the created context and it will switch you to that new window. If you know a CSS selector that can be expected to appear on the window, then this utility can wait on that selector appearing on the page before