s = """<root>
    <element>A</element>
    <element>B</element>
</root>"""
e = etree.fromstring(s)
if sys.version_info < (2, 7):
    found = [element for element in e.getiterator() if element.text == 'A']
else:
    found = [element for element in e.iter() if element.text == 'A']
print(found[0].text)
Find element by text with XPath in ElementTree