I am using helium to scrape a webpage.
result = start_firefox(
"https://www.medtronic.com/covidien/en-us/products/brain-monitoring/bis-monitoring-system.html",
)
result.find_element_by_class_name("js-open-table-overlay").click()
After the click action i am presented with a table and i need to scrape the contents of the table but How do i select the table after the click ?
You would need to use
find_elements_...to get all<table>, and usefor-loop to work with every table separatelly amd use (nested)for-loop to get<tr>(row) and<th>(header) in table, and use (nested)for-loop to get<td>(cell) in row. And you would have to add elements to correct (nested) lists.But this page uses normal
<table>and this table is all time in HTML (not added by javaScript) so it can be simpler to usepandas.read_html()to get all<table>Result