verifyTextPresent in Python Selenium 2 Webdriver 

Here is an example for Python.
function:
def is_text_present (self, string):
if str(string) in self.driver.page_source: return True
else: return False

verifyTextPresent:
try: self.assertTrue(self.is_text_present (“some string”))
except AssertionError as e: self.verificationErrors.append(str(e))

Code Contributor: Alexander


Google Webdriver Forum -The Online Community for Google Webdriver and Selenium RC Users and Professionals
1 response to “verifyTextPresent in Python Selenium 2 Webdriver”
  1. Reena says:

    Hi pavan ,

    Could you share your mailid , so that I can mail my query ?
    have a question in regard to python function
    Regards
    Reena

Leave a Reply