Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
text使用属性访问文本:
text
>>> element1.text u'ABCD'
element1= find_element_by_xpath("//caption/em") element1.get_attribute('innerHTML')
而且我发现 Beautiful Soup 会更好地获取文本。