I want to extract the text contained in the red and green rectangles as shown on the screenshot below, N.B : the text is not contained in an opening and closing tag
http://temperate.theferns.info/plant/Acacia+omalophylla
for example, for the text of the green rectangle, I tested this xpath query and the following code(python/selenium) :
greenrec_xpath = "//*[preceding::h3[contains(text(), 'General Information')] and following::h3[contains(text(), 'Known Hazards')]]"
driver.find_elements_by_xpath(greenrec_xpath)
but did not have the results expected
any ideas !