I\'m using the Python bindings to run Selenium WebDriver:
from selenium import webdriver
wd = webdriver.Firefox()
I know I can grab a webel
Using the attribute method is, in fact, easier and more straight forward.
Using Ruby with the Selenium and PageObject gems, to get the class associated with a certain element, the line would be element.attribute(Class)
.
The same concept applies if you wanted to get other attributes tied to the element. For example, if I wanted the String of an element, element.attribute(String)
.
If you are interested in a solution for Remote Control in Python, here is how to get innerHTML:
innerHTML = sel.get_eval("window.document.getElementById('prodid').innerHTML")