Class SmartAppDriver
- java.lang.Object
-
- org.uitnet.testing.smartfwk.ui.core.appdriver.SmartAppDriver
-
public class SmartAppDriver extends Object
- Author:
- Madhav Krishna
-
-
Constructor Summary
Constructors Constructor Description SmartAppDriver(String appName, ApplicationType appType, PlatformType testPlatformType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcloseApp()Closes all the windows associated with this app and the app itself.voidcloseChildWindows()voidcloseCurrentWindow()Closes current window, if it is a last window then close the app.AppConfiggetAppConfig()intgetAppId()StringgetAppName()ApplicationTypegetAppType()StringgetOriginalWindowHandle()StringgetOSName()ScrollElementToViewportHandlergetScrollElementToViewportHandler()org.sikuli.script.ScreengetSikuliScreen()PlatformTypegetTestPlatformType()org.openqa.selenium.WebDrivergetWebDriver()booleanisOpened()org.openqa.selenium.WebDriveropenAppIfNotOpened(String userProfileName)voidopenDefaultURL()voidopenURL(String url)voidoverrideDriverProps(com.jayway.jsonpath.DocumentContext jsonProps)Must be called before calling the set active user profile else these properties will not get overridden.voidrefresh()Refreshes the web browser.voidsetFocus()This method is used to bring the window to front to perform the operation.voidsetScrollElementToViewportHandler(ScrollElementToViewportHandler handler)voidwaitForMilliSeconds(long milliSeconds)voidwaitForSeconds(int seconds)
-
-
-
Constructor Detail
-
SmartAppDriver
public SmartAppDriver(String appName, ApplicationType appType, PlatformType testPlatformType)
-
-
Method Detail
-
setScrollElementToViewportHandler
public void setScrollElementToViewportHandler(ScrollElementToViewportHandler handler)
-
getScrollElementToViewportHandler
public ScrollElementToViewportHandler getScrollElementToViewportHandler()
-
overrideDriverProps
public void overrideDriverProps(com.jayway.jsonpath.DocumentContext jsonProps)
Must be called before calling the set active user profile else these properties will not get overridden.- Parameters:
jsonProps-
-
openAppIfNotOpened
public org.openqa.selenium.WebDriver openAppIfNotOpened(String userProfileName)
-
closeCurrentWindow
public void closeCurrentWindow()
Closes current window, if it is a last window then close the app.
-
closeApp
public void closeApp()
Closes all the windows associated with this app and the app itself.
-
closeChildWindows
public void closeChildWindows()
-
getAppId
public int getAppId()
-
getAppName
public String getAppName()
-
getAppType
public ApplicationType getAppType()
-
getTestPlatformType
public PlatformType getTestPlatformType()
-
getWebDriver
public org.openqa.selenium.WebDriver getWebDriver()
-
getAppConfig
public AppConfig getAppConfig()
-
isOpened
public boolean isOpened()
-
getOSName
public String getOSName()
-
getSikuliScreen
public org.sikuli.script.Screen getSikuliScreen()
-
getOriginalWindowHandle
public String getOriginalWindowHandle()
-
openURL
public void openURL(String url)
-
openDefaultURL
public void openDefaultURL()
-
waitForMilliSeconds
public void waitForMilliSeconds(long milliSeconds)
-
waitForSeconds
public void waitForSeconds(int seconds)
-
refresh
public void refresh()
Refreshes the web browser.
-
setFocus
public void setFocus()
This method is used to bring the window to front to perform the operation.
-
-