Hi I am using selenium to automate test on web pages. I am using selenium 2 and python and would like to have answers in this framework only. SO how do I check whether some text
You can use driver.page_source and a simple regular expression to check if the text exists:
driver.page_source
import re src = driver.page_source text_found = re.search(r'text_to_search', src) self.assertNotEqual(text_found, None)