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
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 Details
-
capabilities
public org.openqa.selenium.remote.DesiredCapabilities capabilities -
options
-
-
Constructor Details
-
WebCapability
public WebCapability()
-
-
Method Details
-
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
-
getUrl
set url through maven using -D command eg. mvn test -DcraigslistSite = "www.test.com" priority: 1) maven 2) properties 3) default- Returns:
-
getBrowser
set browser through maven using -D command eg. mvn test -DbrowserType = "chrome" priority: 1) maven 2) properties 3) default- Returns:
-
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
-
getWebDriverType
set driver through maven using -D command eg. mvn test -DdriverType = "local webdriver" priority: 1) maven 2) properties 3) default- Returns:
-
printWebDriverVersionHelp
catch errors where browser version is not detected properly- Parameters:
e-- Returns:
-