Is there any method for me to get the text "ABCD" as below HTML? I just know get the emement , but have no idea about to get its text.
element1= find_element_by_xpath("//caption/em")
Then how can I get "ABCD", is there any method like gettext()?
<table class='1'>
<caption>
<em> ABCD </em>
</caption>
</table>