From 6efa0a4dae5f62db0f396e8d21756774cf0035d0 Mon Sep 17 00:00:00 2001 From: Jonathan Frederic Date: Tue, 11 Mar 2014 12:30:10 -0700 Subject: [PATCH] Added get_cell_text --- IPython/html/tests/util.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/IPython/html/tests/util.js b/IPython/html/tests/util.js index 8c49dd240..63f4ada53 100644 --- a/IPython/html/tests/util.js +++ b/IPython/html/tests/util.js @@ -153,6 +153,14 @@ casper.set_cell_text = function(index, text){ }, index, text); }; +// Get the text content of a cell. +casper.get_cell_text = function(index){ + return this.evaluate(function (index) { + var cell = IPython.notebook.get_cell(index); + return cell.get_text(); + }, index); +}; + // Inserts a cell at the bottom of the notebook // Returns the new cell's index. casper.insert_cell_at_bottom = function(cell_type){