I want to get text that is stored on an element. Text is not a property instead when I expand Element (in chrome's inspection [DevTools]) it has two sub-properties, span and text. it looks something like this: I want to find only the text property not span.
I've used several way like:
elem = driver.find_element_by_xpath("/HTML/Body/li/a") text = elem.text
But this returns:
Copying the xpath for the property, copies "html\body\li\a.text()" and finding this by xpath method throws error, obviously.
To the point: I just want to get text child property of element not span. But it returns both. Any help will be appreciated...