add get_rendered_contents helper function

M Pacer 8 years ago
parent d9dd5d8f1c
commit 33ca649b0b

@ -13,6 +13,15 @@ def notebook(authenticated_browser):
return Notebook.new_notebook(authenticated_browser)
def get_rendered_contents(nb):
cl = ["text_cell", "render"]
rendered_cells = [cell.find_element_by_class_name("text_cell_render")
for cell in nb.cells
if all([c in cell.get_attribute("class") for c in cl])]
return [x.get_attribute('innerHTML').strip()
for x in rendered_cells
if x is not None]
def test_markdown_cell(notebook):
nb = notebook
nb[:] = ["# Foo"]

Loading…
Cancel
Save