Skip to content

Commit

Permalink
add wait_for_selector to the cells property and to_command_mode
Browse files Browse the repository at this point in the history
  • Loading branch information
mpacer committed Mar 22, 2018
1 parent 78254f0 commit 1889e56
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions notebook/tests/selenium/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ def body(self):

@property
def cells(self):
"""Gets all cells once they are visible.
"""
wait_for_selector(self.browser, ".cell")
return self.browser.find_elements_by_class_name("cell")


Expand All @@ -48,7 +52,9 @@ def remove_safety_check(self):

def to_command_mode(self):
"""Changes us into command mode on currently focused cell
"""
wait_for_selector(self.browser, ".cell")
self.browser.switch_to.active_element.send_keys(Keys.ESCAPE)
self.browser.execute_script("return Jupyter.notebook.handle_command_mode("
"Jupyter.notebook.get_cell("
Expand Down

0 comments on commit 1889e56

Please sign in to comment.