Resolve notebook len duplicate method

Luis Rodriguez 7 years ago
parent 849b7def18
commit fccc7d7420

@ -76,6 +76,6 @@ def test_dualmode_execute(notebook):
#Notebook will now have 8 cells, the index of the last cell will be 7
assert notebook.get_cells_length() == 8 #Cells where added
assert len(notebook) == 8 #Cells where added
notebook.focus_cell(7)
validate_notebook_state(notebook, 'command', 7)

@ -226,10 +226,6 @@ class Notebook:
JS = 'return Jupyter.notebook.get_cells().map(function(c) {return c.mode;})'
return self.browser.execute_script(JS)
def get_cells_length(self):
JS = 'return IPython.notebook.get_cells().length;'
return self.browser.execute_script(JS)
def get_cell_type(self, index=0):
JS = 'return Jupyter.notebook.get_cell({}).cell_type'.format(index)
return self.browser.execute_script(JS)

Loading…
Cancel
Save