Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 20th, 2012  |  syntax: None  |  size: 0.25 KB  |  hits: 10  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. How to check if some text is present on a web page using selenium 2?
  2. assertEquals(driver.getPageSource().contains("email"), true);
  3.        
  4. from selenium.webdriver.common.by import By
  5. elem = driver.find_element_by_xpath("//body[contains(text(), 'email')]")