类 WebValidator


  • public class WebValidator
    extends Object
    作者:
    Yun
    • 方法概要

      所有方法 静态方法 具体方法 
      修饰符和类型 方法 说明
      static boolean isAlertPresent​(org.openqa.selenium.WebDriver driver)
      Check target Alert is existing?
      static boolean isCssValuePresent​(org.openqa.selenium.WebElement element, String cssProperty, String expectedValue)  
      static boolean isElementEnabled​(org.openqa.selenium.WebDriver driver, org.openqa.selenium.By by)
      Check if the target element is enable?
      static boolean isElementEnabledByAttribute​(org.openqa.selenium.WebDriver driver, org.openqa.selenium.By by)
      Check target element is enabled by element's attribute value?
      static boolean isElementEnabledByAttribute​(org.openqa.selenium.WebElement e)
      Check target element is enabled by element's attribute value?
      static boolean isElementExisted​(org.openqa.selenium.WebDriver driver, org.openqa.selenium.By by)
      Check if the target element is existing?
      static boolean isElementSelected​(org.openqa.selenium.WebDriver driver, org.openqa.selenium.By by)
      Check if the target element is selected ?
      static boolean isElementVisible​(org.openqa.selenium.WebDriver driver, org.openqa.selenium.By by)
      Check target element is Visible?
      static boolean isElementVisible​(org.openqa.selenium.WebElement e)
      Check target element is Visible?
      static boolean isPageReady​(org.openqa.selenium.WebDriver driver)
      Wait for page loading ready by checking dom.readyState and jQuery.active
      Return true if ready
      static boolean isPageTitleReady​(org.openqa.selenium.WebDriver driver, String expectedTitle)
      Wait for page title ready
    • 构造器详细资料

      • WebValidator

        public WebValidator()
    • 方法详细资料

      • isPageReady

        public static boolean isPageReady​(org.openqa.selenium.WebDriver driver)
        Wait for page loading ready by checking dom.readyState and jQuery.active
        Return true if ready
      • isPageTitleReady

        public static boolean isPageTitleReady​(org.openqa.selenium.WebDriver driver,
                                               String expectedTitle)
        Wait for page title ready
      • isAlertPresent

        public static boolean isAlertPresent​(org.openqa.selenium.WebDriver driver)
        Check target Alert is existing?
      • isElementExisted

        public static boolean isElementExisted​(org.openqa.selenium.WebDriver driver,
                                               org.openqa.selenium.By by)
        Check if the target element is existing?
      • isElementEnabled

        public static boolean isElementEnabled​(org.openqa.selenium.WebDriver driver,
                                               org.openqa.selenium.By by)
        Check if the target element is enable?
      • isElementSelected

        public static boolean isElementSelected​(org.openqa.selenium.WebDriver driver,
                                                org.openqa.selenium.By by)
        Check if the target element is selected ?
      • isElementVisible

        public static boolean isElementVisible​(org.openqa.selenium.WebElement e)
        Check target element is Visible?
      • isElementVisible

        public static boolean isElementVisible​(org.openqa.selenium.WebDriver driver,
                                               org.openqa.selenium.By by)
        Check target element is Visible?
      • isElementEnabledByAttribute

        public static boolean isElementEnabledByAttribute​(org.openqa.selenium.WebDriver driver,
                                                          org.openqa.selenium.By by)
        Check target element is enabled by element's attribute value?
      • isElementEnabledByAttribute

        public static boolean isElementEnabledByAttribute​(org.openqa.selenium.WebElement e)
        Check target element is enabled by element's attribute value?
      • isCssValuePresent

        public static boolean isCssValuePresent​(org.openqa.selenium.WebElement element,
                                                String cssProperty,
                                                String expectedValue)