use of org.wso2.iot.integration.ui.pages.login.LoginPage in project product-iots by wso2.
the class IOTAdminDashboard method logout.
/**
* Performs the logout action.
* @return : The IOT login page
*/
public LoginPage logout() throws IOException {
driver.findElement(By.xpath(uiElementMapper.getElement("iot.user.registered.name"))).click();
WebElement logout = driver.findElement(By.xpath(uiElementMapper.getElement("iot.user.logout.link.xpath")));
logout.click();
return new LoginPage(driver);
}
use of org.wso2.iot.integration.ui.pages.login.LoginPage in project product-iots by wso2.
the class NewUserRegistrationTest method userRegisterTest.
@Test(description = "Verify new User registration")
public void userRegisterTest() throws IOException {
LoginPage login = new LoginPage(driver);
NewUserRegisterPage registerTest = login.registerNewUser();
LoginPage loginPage = registerTest.registerUser(Constants.User.Register.FIRST_NAME, Constants.User.Register.LAST_NAME, Constants.User.Register.EMAIL, Constants.User.Register.USER_NAME, Constants.User.Register.PASSWORD, Constants.User.Register.CONFIRM_PASSWORD);
IOTHomePage homePage = loginPage.loginAsUser(Constants.User.Register.USER_NAME, Constants.User.Register.PASSWORD);
Assert.assertTrue(homePage.checkUserName());
}
use of org.wso2.iot.integration.ui.pages.login.LoginPage in project product-iots by wso2.
the class LoginUtils method login.
/**
* This method is used to login as admin.
*
* @param driver The selenium web driver
* @param automationContext Test Automation context
* @param webAppURL The server url
*/
public static void login(WebDriver driver, AutomationContext automationContext, String webAppURL) throws IOException, XPathExpressionException {
driver.get(webAppURL + Constants.IOT_LOGIN_PATH);
LoginPage test = new LoginPage(driver);
test.loginAsAdmin(automationContext.getSuperTenant().getTenantAdmin().getUserName(), automationContext.getSuperTenant().getTenantAdmin().getPassword());
}
Aggregations