Class AbstractUITestHelper
java.lang.Object
org.uitnet.testing.smartfwk.ui.core.AbstractUITestHelper
- Direct Known Subclasses:
DefaultUITestHelper
public abstract class AbstractUITestHelper extends Object
- Author:
- Madhav Krishna
-
Field Summary
Fields Modifier and Type Field Description protected StringactiveUserProfileNameprotected AppConfiginitAppConfigprotected StringinitAppNameprotected UserProfileinitUserProfileprotected StringinitUserProfileNameprotected static WebBrowserinitWebBrowserprotected StringinitWebBrowserIdprotected WebPageinitWebPageprotected org.slf4j.Loggerloggerprotected booleanlogonTestprotected TestConfigManagertestConfigManager -
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractUITestHelper() -
Method Summary
Modifier and Type Method Description voidcaptureScreenshot(io.cucumber.java.Scenario scenario)voidcaptureScreenshot(io.cucumber.java.Scenario scenario, String status)voidcaptureScreenshot(String fileNameHint)voidcheckLogoutAndLoginAgain(String userProfileName)protected LoginPageValidatorcreateNewLoginPageValidator(WebBrowser browser)protected LoginSuccessPageValidatorcreateNewLoginSuccessPageValidator(WebBrowser browser)StringgetActiveUserProfileName()AppConfiggetAppConfig(String appName)OrmDatabaseQueryHandlergetDatabaseQueryHandler(String appName, String dbProfileName)StringgetInitAppName()StringgetInitUserProfileName()WebBrowsergetInitWebBrowser()WebPagegetInitWebPage()Returns the base web page associated with the test class.TestConfigManagergetTestConfigManager()voidinit(String appName, String webBrowserId, WebPage webPage, String userProfileName)voidlogoutAndNoQuit()Logout and does not close browser but the child windows/browsers will get closed.voidlogoutAndQuit()Logout and closes the browser and the child windows/browsers.voidrelogin()voidscenarioSetup()Opens the new browser if it is not opened by the web driver associated to it.voidscenarioTearDown()voidsetActiveUserProfileName(String userProfileName)
-
Field Details
-
logger
protected org.slf4j.Logger logger -
logonTest
protected boolean logonTest -
testConfigManager
-
initAppName
-
initUserProfileName
-
initWebBrowserId
-
initWebBrowser
-
initWebPage
-
initAppConfig
-
initUserProfile
-
activeUserProfileName
-
-
Constructor Details
-
AbstractUITestHelper
protected AbstractUITestHelper()
-
-
Method Details
-
init
-
scenarioSetup
public void scenarioSetup()Opens the new browser if it is not opened by the web driver associated to it. As soon as the browser is opened, this will login to the system automatically. -
scenarioTearDown
public void scenarioTearDown() -
getInitAppName
-
getInitUserProfileName
-
createNewLoginPageValidator
-
createNewLoginSuccessPageValidator
-
checkLogoutAndLoginAgain
-
getTestConfigManager
-
getAppConfig
-
getActiveUserProfileName
-
setActiveUserProfileName
-
relogin
public void relogin() -
logoutAndNoQuit
public void logoutAndNoQuit()Logout and does not close browser but the child windows/browsers will get closed. -
logoutAndQuit
public void logoutAndQuit()Logout and closes the browser and the child windows/browsers. NOTE: To execute further testcases, new browser will be opened. -
getInitWebBrowser
-
getInitWebPage
Returns the base web page associated with the test class.- Returns:
-
getDatabaseQueryHandler
-
captureScreenshot
public void captureScreenshot(io.cucumber.java.Scenario scenario) -
captureScreenshot
-
captureScreenshot
-