public abstract class DSUIIntegrationTest extends DSIntegrationTest
| Modifier and Type | Field and Description |
|---|---|
protected String |
resourcePath |
userMode| Constructor and Description |
|---|
DSUIIntegrationTest()
Constructor for the DSUIIntegrationTest
|
DSUIIntegrationTest(org.wso2.carbon.automation.engine.context.TestUserMode userMode)
Constructor for the DSUIIntegrationTest
|
| Modifier and Type | Method and Description |
|---|---|
void |
addDashBoard(String dashBoardTitle,
String description)
Add dashboard to DashboardServer
|
void |
addPageToDashboard()
Add a page to the dashboard
|
void |
addRole(String roleName)
Add dashboard to DashboardServer
|
void |
addUser(String username,
String password,
String retypePassword)
Add dashboard to DashboardServer
|
void |
assignRoleToUser(String[] userNames)
Assign roles for users
|
void |
dsUITestTearDown()
final method for each test classes
|
String |
generateAddGadgetScript(String[][] mappings)
Get JS script to simulate adding gadgets to the page
|
DSWebDriver |
getDriver()
This method returns the web driver instance
|
org.openqa.selenium.support.ui.WebDriverWait |
getWebDriverWait()
This method returns the we driver wait instance
|
boolean |
isResourceExist(String resourcePath)
This method will check the resource is exist or not in registry
|
void |
login(String userName,
String pwd)
To login to Dashboard server
|
void |
loginToAdminConsole(String userName,
String pwd)
To login to admin console DashBoard server
|
void |
logout()
To logout from Dashboard server
|
void |
logoutFromAdminConsole()
To logout from admin console dashboard server
|
void |
modifyTimeOut(int seconds)
Modify the timeout as to the given value
|
void |
popWindow()
Switch to the parent window (while is remembered previously) from a child window
|
void |
pushWindow()
Switch to a child window while remembering the parent window
|
void |
redirectToLocation(String domain,
String location)
Redirect user to given location
|
void |
resetTimeOut()
Reset the timeout of selenium back to default
|
void |
selectLayout(String layout)
Select the given layout
|
void |
switchPage(String pageID)
Switch to the given page
|
getBackEndUrl, getBaseUrl, getCurrentPassword, getCurrentTenantInfo, getCurrentUserInfo, getCurrentUsername, getMaxWaitTime, getResourceLocation, getServiceUrlHttp, getServiceUrlHttps, isTenantprotected String resourcePath
public DSUIIntegrationTest()
public DSUIIntegrationTest(org.wso2.carbon.automation.engine.context.TestUserMode userMode)
userMode - user mode to initiate the classpublic String generateAddGadgetScript(String[][] mappings)
mappings - array of gadget mappings in { gadget id, target id} formatpublic void pushWindow()
throws MalformedURLException,
XPathExpressionException
public void popWindow()
throws MalformedURLException,
XPathExpressionException
public void login(String userName, String pwd) throws Exception
userName - user namepwd - passwordjavax.xml.xpath.XPathExpressionException,InterruptedExceptionExceptionpublic void logout()
throws Exception
XPathExpressionExceptionExceptionpublic void loginToAdminConsole(String userName, String pwd) throws Exception
userName - user namepwd - passwordXPathExpressionExceptionExceptionpublic void logoutFromAdminConsole()
throws Exception
Exceptionpublic void addDashBoard(String dashBoardTitle, String description) throws Exception
dashBoardTitle - the title of a dashboarddescription - the description about dashboardExceptionpublic void selectLayout(String layout) throws Exception
layout - name of the layout to be selectedExceptionpublic void redirectToLocation(String domain, String location) throws Exception
domain - name of the domain where user wants to direct in tolocation - name of the location to be directed toExceptionpublic void modifyTimeOut(int seconds)
throws Exception
seconds - Time to replace the default timeout of seleniumExceptionpublic void resetTimeOut()
throws Exception
Exceptionpublic void addPageToDashboard()
throws Exception
Exceptionpublic void switchPage(String pageID) throws Exception
pageID - ID of the page to be switched toExceptionpublic void addUser(String username, String password, String retypePassword) throws Exception
username - username of userpassword - password of userretypePassword - retype password of userExceptionpublic void addRole(String roleName) throws Exception
roleName - name of roleExceptionpublic void assignRoleToUser(String[] userNames) throws Exception
userNames - array fo userNamesExceptionpublic DSWebDriver getDriver() throws MalformedURLException, XPathExpressionException
MalformedURLExceptionXPathExpressionExceptionpublic org.openqa.selenium.support.ui.WebDriverWait getWebDriverWait()
throws MalformedURLException,
XPathExpressionException
MalformedURLExceptionXPathExpressionExceptionpublic void dsUITestTearDown()
throws Exception
Exceptionpublic boolean isResourceExist(String resourcePath)
resourcePath - - the path of resourceCopyright © 2015 WSO2 Inc. All rights reserved.