PSS Automation

The desire to create this blog to share my knowledge to others.

Wednesday, December 11, 2013

Confirm text is displayed in webpage

public boolean isTextPresent(String text) {
    List<WebElement> foundElements = driver.findElements(By.xpath 
("//*[contains(text(), '" + text + "')]"));
    return foundElements.size() > 0;
}
Posted by Syam.. at 6:10 AM
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

PSS Search Engine

Selenium Concepts

  • ►  2025 (2)
    • ►  Apr (1)
    • ►  Mar (1)
  • ►  2022 (9)
    • ►  Aug (2)
    • ►  Jul (1)
    • ►  Mar (4)
    • ►  Feb (1)
    • ►  Jan (1)
  • ►  2021 (5)
    • ►  Aug (2)
    • ►  Feb (2)
    • ►  Jan (1)
  • ►  2017 (1)
    • ►  Mar (1)
  • ►  2016 (24)
    • ►  Dec (1)
    • ►  Nov (1)
    • ►  Sep (1)
    • ►  Aug (3)
    • ►  Jul (3)
    • ►  Jun (1)
    • ►  May (3)
    • ►  Apr (2)
    • ►  Mar (3)
    • ►  Feb (1)
    • ►  Jan (5)
  • ►  2015 (12)
    • ►  Dec (2)
    • ►  Oct (1)
    • ►  Sep (2)
    • ►  Aug (4)
    • ►  May (1)
    • ►  Feb (1)
    • ►  Jan (1)
  • ►  2014 (11)
    • ►  Dec (2)
    • ►  Oct (1)
    • ►  Sep (1)
    • ►  Aug (1)
    • ►  Apr (3)
    • ►  Mar (1)
    • ►  Feb (1)
    • ►  Jan (1)
  • ▼  2013 (19)
    • ▼  Dec (2)
      • Confirm text is displayed in webpage
      • Handling Web Popup dialog boxes and Windows Authen...
    • ►  Aug (17)
  • ►  2011 (1)
    • ►  Dec (1)

About Me

Syam..
My Name is Syam working as a QA Lead.
View my complete profile

Lables

  • Selenium WebDriver
Watermark theme. Powered by Blogger.