We can extract text of an element with a selenium webdriver. This is done with the help of a text method. It fetches the text in an element which can be later validated.
getText() method returns string as a result
#gettext #webelement #attribute