verifyTextPresent in Python Selenium 2 Webdriver

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

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

Code Contributor: Alexander

One thought on “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

Leave a Reply

Your email address will not be published. Required fields are marked *