phone number it's an element i need to get inner text
<a href="tel:895**49****" class="button-text action-link" title="Телефон продавца" rel="nofollow">
"8 9** **9-99-**"
</a>
when i use
phone = driver.find_element_by_class_name('button-text')
print phone.text
it returns empty string, because phone number in "" it is an text() node
and when i try this
print driver.find_element_by_xpath('/html/body/section/article/section[2]/ul/li[1]/a/text()')
or this
print driver.find_element_by_xpath('/html/body/section/article/section[2]/ul/li[1]/a/text()').text
it returns error InvalidSelectorException: Message: u'Error Message => \'The result of the xpath expression "/html/body/section/article/section[2]/ul/li[1]/a/text()" is: [object Text]. It should be an element.