com.atlassian.webdriver.utils
Class Check

java.lang.Object
  extended by com.atlassian.webdriver.utils.Check

public final class Check
extends Object

Utilities for doing simple checks on a page.

Since:
2.0

Method Summary
static boolean elementExists(org.openqa.selenium.By by, org.openqa.selenium.SearchContext el)
          Checks that an element that matches the by param exists within another element.
static boolean elementIsVisible(org.openqa.selenium.By by, org.openqa.selenium.SearchContext context)
           
static boolean elementsAreVisible(org.openqa.selenium.By by, org.openqa.selenium.SearchContext context)
           
static boolean hasClass(String className, org.openqa.selenium.WebElement element)
          Checks to see if a specified element contains a specific class of not.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

elementExists

public static boolean elementExists(org.openqa.selenium.By by,
                                    org.openqa.selenium.SearchContext el)
Checks that an element that matches the by param exists within another element.


elementIsVisible

public static boolean elementIsVisible(org.openqa.selenium.By by,
                                       org.openqa.selenium.SearchContext context)

elementsAreVisible

public static boolean elementsAreVisible(org.openqa.selenium.By by,
                                         org.openqa.selenium.SearchContext context)

hasClass

public static boolean hasClass(String className,
                               org.openqa.selenium.WebElement element)
Checks to see if a specified element contains a specific class of not. The check is case-insensitive.

Parameters:
className - CSS class name to check for
element - element to check
Returns:
true, if element has CSS class with given className


Copyright © 2014 Atlassian. All rights reserved.