Skip to content

Commit 1889e56

Browse files
committed
add wait_for_selector to the cells property and to_command_mode
1 parent 78254f0 commit 1889e56

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

notebook/tests/selenium/utils.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ def body(self):
3232

3333
@property
3434
def cells(self):
35+
"""Gets all cells once they are visible.
36+
37+
"""
38+
wait_for_selector(self.browser, ".cell")
3539
return self.browser.find_elements_by_class_name("cell")
3640

3741

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

4953
def to_command_mode(self):
5054
"""Changes us into command mode on currently focused cell
55+
5156
"""
57+
wait_for_selector(self.browser, ".cell")
5258
self.browser.switch_to.active_element.send_keys(Keys.ESCAPE)
5359
self.browser.execute_script("return Jupyter.notebook.handle_command_mode("
5460
"Jupyter.notebook.get_cell("

0 commit comments

Comments
 (0)