I want to select certain text that comes after an hr node with selenium and xpath. But I keep getting a WebDriverException
Here is the html code I want to extract the text from: html snippet
The text I want to get is: Introduction to financial ... business decisions
I used this code:
e = c.find_element_by_xpath("//div[@class='ajaxcourseindentfix']/hr/following-sibling::text()")
The problem is that I keep getting this exception
selenium.common.exceptions.WebDriverException: Message: TypeError: Expected an element or WindowProxy, got: [object Text] {}
What should I do?