Class WebCapability
- java.lang.Object
-
- core.uiCore.driverProperties.capabilities.WebCapability
-
public class WebCapability extends Object
-
-
Field Summary
Fields Modifier and Type Field Description org.openqa.selenium.remote.DesiredCapabilitiescapabilitiesDriverOptionoptions
-
Constructor Summary
Constructors Constructor Description WebCapability()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddisableLogs()static browserType.BrowserTypegetBrowser()set browser through maven using -D command eg.static StringgetBrowserName()org.openqa.selenium.remote.DesiredCapabilitiesgetCapability()DriverOptiongetDriverOption()StringgetDriverVersion()StringgetUrl(String app, String defaultUrl)set url through maven using -D command eg.driverType.DriverTypegetWebDriverType()set driver through maven using -D command eg.static booleanisChrome()static booleanisFirefox()static booleanisInternetExplorer()static booleanisMicrosoftEdge()static booleanisSafari()static booleanprintWebDriverVersionHelp(Exception e)catch errors where browser version is not detected properlyvoidsetWebCapabilties()set capabilties with prefix android.capabilties.WebCapabilitywithBrowserOption()sets capability for web based apps
-
-
-
Field Detail
-
capabilities
public org.openqa.selenium.remote.DesiredCapabilities capabilities
-
options
public DriverOption options
-
-
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()
-
getDriverOption
public DriverOption getDriverOption()
-
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:
-
-