Class WebCapability


  • public class WebCapability
    extends Object
    • Field Detail

      • capabilities

        public org.openqa.selenium.remote.DesiredCapabilities capabilities
    • Constructor Detail

      • WebCapability

        public WebCapability()
    • Method Detail

      • withBrowserOption

        public WebCapability withBrowserOption()
        sets capability for web based apps
        Returns:
        Throws:
        IOException
      • disableLogs

        public void disableLogs()
      • setWebCapabilties

        public void setWebCapabilties()
        set capabilties with prefix android.capabilties. eg. android.capabilties.fullReset="false iterates through all property values with such prefix And adds them to android desired capabilities
      • getCapability

        public org.openqa.selenium.remote.DesiredCapabilities getCapability()
      • getUrl

        public String getUrl​(String app,
                             String defaultUrl)
        set url through maven using -D command eg. mvn test -DcraigslistSite = "www.test.com" priority: 1) maven 2) properties 3) default
        Returns:
      • getBrowser

        public static browserType.BrowserType getBrowser()
        set browser through maven using -D command eg. mvn test -DbrowserType = "chrome" priority: 1) maven 2) properties 3) default
        Returns:
      • getBrowserName

        public static String getBrowserName()
      • isChrome

        public static boolean isChrome()
      • isFirefox

        public static boolean isFirefox()
      • isInternetExplorer

        public static boolean isInternetExplorer()
      • isSafari

        public static boolean isSafari()
      • isMicrosoftEdge

        public static boolean isMicrosoftEdge()
      • getDriverVersion

        public String getDriverVersion()
      • getWebDriverType

        public driverType.DriverType getWebDriverType()
        set driver through maven using -D command eg. mvn test -DdriverType = "local webdriver" priority: 1) maven 2) properties 3) default
        Returns:
      • printWebDriverVersionHelp

        public static boolean printWebDriverVersionHelp​(Exception e)
        catch errors where browser version is not detected properly
        Parameters:
        e -
        Returns: