+ def get_inner_html(self, locator):
+ """Returns inner HTML of element identified by `locator`.
+
+ See `introduction` for details about locating elements.
+
+ New in SeleniumLibrary 2.9.
+ """
+ js = "this.browserbot.findElement('%s').innerHTML" % locator
+ return self.execute_javascript(js).strip()
+
def focus(self, locator):
"""Sets focus to element identified by `locator`.
=======================================
--- /test/acceptance/keywords/elements.txt Fri Apr 29 04:21:24 2011
+++ /test/acceptance/keywords/elements.txt Fri May 4 04:59:16 2012
@@ -33,3 +33,6 @@
Should Be True ${pos} > ${0}
Run Keyword And Expect Error Could not determine position
for 'non-existent' Get Horizontal Position non-existent
+Get Inner HTML
+ ${inner}= Get Inner HTML foo
+ Should Be Equal ${inner} <img src="robot.png"> Text and
image