Package core.support.objects
Class DriverObject
- java.lang.Object
-
- core.support.objects.DriverObject
-
public class DriverObject extends Object
- Author:
- CAEHMAT driverList driver testId isAvailable ... A 1 false B 2 false C 1 true
-
-
Field Summary
Fields Modifier and Type Field Description StringappbrowserType.BrowserTypebrowserTypeorg.openqa.selenium.remote.DesiredCapabilitiescapabilitiesMap<String,Object>configstatic Map<org.openqa.selenium.WebDriver,DriverObject>driverListdriverType.DriverTypedriverTypeStringdriverVersionStringinitialURLBooleanisAvailableLoginObjectloginDriverOptionoptionsList<String>testIdListList<org.openqa.selenium.WebDriver>webdriver
-
Constructor Summary
Constructors Constructor Description DriverObject()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description org.openqa.selenium.remote.DesiredCapabilitiesgetCapabilties()static DriverObjectgetCurrentDriverObject()static StringgetCurrentTestId()static org.openqa.selenium.WebDrivergetFirstAvailableDriver()keeps track of all the drivers and selects the first available driver used when single sign in is usedURLgetInitURL()DriverOptiongetOptions()static StringgetPreviousTestId()returns the previous test id of the test ran on the driverstatic voidinitializeDriverList(DriverObject driver, String testId)add driver to driver list with test infostatic booleanisDriverSet()static voidquitAllDrivers()static voidquitTestDrivers()quite all drivers associated with a teststatic voidquitWebDriver(org.openqa.selenium.WebDriver driver)quits webdriver if it's runningstatic voidsetDriverAvailabiltity(org.openqa.selenium.WebDriver driver, boolean isAvailable)static voidshutDownDriver(boolean isTestPass)DriverObjectwithAndroidDriver(String app, String device)DriverObjectwithApiDriver(String app)DriverObjectwithApp(String app)DriverObjectwithBrowserType(browserType.BrowserType browserType)DriverObjectwithCapabilities(org.openqa.selenium.remote.DesiredCapabilities capabilities)DriverObjectwithDriverOptions(DriverOption driverOption)DriverObjectwithDriverType(driverType.DriverType driverType)DriverObjectwithDriverVersion(String driverVersion)DriverObjectwithGenericDriver(String app)DriverObjectwithiOSDriver(String app, String device)DriverObjectwithIsAvailable(Boolean isAvailable)DriverObjectwithTestId(String testId)DriverObjectwithUrl(String initialURL)DriverObjectwithWebDriver(String URL)DriverObjectwithWebDriver(String App, String URL)DriverObjectwithWinDriver(String app)
-
-
-
Field Detail
-
webdriver
public List<org.openqa.selenium.WebDriver> webdriver
-
isAvailable
public Boolean isAvailable
-
initialURL
public String initialURL
-
app
public String app
-
driverType
public driverType.DriverType driverType
-
browserType
public browserType.BrowserType browserType
-
driverVersion
public String driverVersion
-
login
public LoginObject login
-
capabilities
public org.openqa.selenium.remote.DesiredCapabilities capabilities
-
options
public DriverOption options
-
driverList
public static Map<org.openqa.selenium.WebDriver,DriverObject> driverList
-
-
Method Detail
-
getFirstAvailableDriver
public static org.openqa.selenium.WebDriver getFirstAvailableDriver()
keeps track of all the drivers and selects the first available driver used when single sign in is used- Returns:
-
quitTestDrivers
public static void quitTestDrivers()
quite all drivers associated with a test
-
quitWebDriver
public static void quitWebDriver(org.openqa.selenium.WebDriver driver)
quits webdriver if it's running
-
shutDownDriver
public static void shutDownDriver(boolean isTestPass)
-
quitAllDrivers
public static void quitAllDrivers()
-
initializeDriverList
public static void initializeDriverList(DriverObject driver, String testId)
add driver to driver list with test info- Parameters:
driver-testId-
-
setDriverAvailabiltity
public static void setDriverAvailabiltity(org.openqa.selenium.WebDriver driver, boolean isAvailable)
-
withTestId
public DriverObject withTestId(String testId)
-
getCurrentTestId
public static String getCurrentTestId()
-
getPreviousTestId
public static String getPreviousTestId()
returns the previous test id of the test ran on the driver- Returns:
-
withApp
public DriverObject withApp(String app)
-
withIsAvailable
public DriverObject withIsAvailable(Boolean isAvailable)
-
withUrl
public DriverObject withUrl(String initialURL)
-
withBrowserType
public DriverObject withBrowserType(browserType.BrowserType browserType)
-
withDriverVersion
public DriverObject withDriverVersion(String driverVersion)
-
withDriverType
public DriverObject withDriverType(driverType.DriverType driverType)
-
withDriverOptions
public DriverObject withDriverOptions(DriverOption driverOption)
-
withCapabilities
public DriverObject withCapabilities(org.openqa.selenium.remote.DesiredCapabilities capabilities)
-
getCapabilties
public org.openqa.selenium.remote.DesiredCapabilities getCapabilties()
-
getOptions
public DriverOption getOptions()
-
getCurrentDriverObject
public static DriverObject getCurrentDriverObject()
-
isDriverSet
public static boolean isDriverSet()
-
withWebDriver
public DriverObject withWebDriver(String App, String URL)
-
withWebDriver
public DriverObject withWebDriver(String URL)
-
withiOSDriver
public DriverObject withiOSDriver(String app, String device)
-
withAndroidDriver
public DriverObject withAndroidDriver(String app, String device)
-
withWinDriver
public DriverObject withWinDriver(String app)
-
withApiDriver
public DriverObject withApiDriver(String app)
-
withGenericDriver
public DriverObject withGenericDriver(String app)
-
getInitURL
public URL getInitURL()
-
-