I'm trying to use Selenium with Python to store the contents of a table. My script is as follows:
import sys
import selenium
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
driver = webdriver.Firefox()
driver.get("http://testsite.com")
value = selenium.getTable("table_id_10")
print value
driver.close()
This opens up the webpage I am interested in, and then should save the contents of the table that I want. I've seen the syntax in this question which uses browser.get_table(), but the beginning of that program begins with browser=Selenium(...) which I did not understand. I'm not sure what syntax I should be using as selenium.getTable("table_id_10") is incorrect.
EDIT:
I included a html snippet of the table that I am using:
<table class="datatable" cellspacing="0" rules="all" border="1" id="table_id_10" style="width:70%;border-collapse:collapse;">
<caption>
<span class="captioninformation right"><a href="Services.aspx" class="functionlink">Return to Services</a></span>Data
</caption><tr>
<th scope="col">Read Date</th><th class="numericdataheader" scope="col">Days</th><th class="numericdataheader" scope="col">Values</th>
</tr><tr>
<td>10/15/2011</td><td class="numericdata">92</td><td class="numericdata">37</td>
</tr><tr class="alternaterows">
<td>7/15/2011</td><td class="numericdata">91</td><td class="numericdata">27</td>
</tr><tr>
<td>4/15/2011</td><td class="numericdata">90</td><td class="numericdata">25</td>
</table>