I am using Selenium\'s python library to scrape data from a html page in Firefox.
I have had to update from Selenium 2.0 to 2.21 because the server has updated Firef
You need to use a CssSelector in the format ".nameA.nameB.nameC" you can have as many as you'd like, just add the "."
Alternatively you can match the whole attribute (you can also do this with xpath): "[class='exact class name here']" XPath - "//[@class='exact class name here']"
There are ways to do starts with or ends with or contains too (in both CSS and xpath) which helps if the classes are generated dynamically.
Selenium hasn't supported compound class names for a very long time I thought.
Needless to say, try via XPath or CSS selector or by the class name of "grid-cell-inner" then filtering to see what elements have the class of "grid-cell-inner grid-col-name".
The problem about WebDriver is that it still evolves. A lot. I personally don't know about a version that supported searching by many classes in one command, so it must have been a fairly old one :).
Searching by a CSS selector should work, however:
find_element_by_css_selector(".grid-cell-inner.grid-col-name");
I don't recommend using XPath for this particular thing, because these two following expressions are a different thing:
//*[class='grid-cell-inner grid-col-name']
//*[class='grid-col-name grid-cell-inner']
also try:
elements = bot.execute_script("""return document.getElementsByClassName('grid-cell-inner grid-col-name')""")