Search in sources :

Example 1 with NewUserRegisterPage

use of org.wso2.iot.integration.ui.pages.uesr.NewUserRegisterPage 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());
}
Also used : NewUserRegisterPage(org.wso2.iot.integration.ui.pages.uesr.NewUserRegisterPage) LoginPage(org.wso2.iot.integration.ui.pages.login.LoginPage) IOTHomePage(org.wso2.iot.integration.ui.pages.home.IOTHomePage) Test(org.testng.annotations.Test)

Example 2 with NewUserRegisterPage

use of org.wso2.iot.integration.ui.pages.uesr.NewUserRegisterPage in project product-iots by wso2.

the class RegistrationFormValidationTest method setup.

@BeforeClass(alwaysRun = true)
public void setup() throws XPathExpressionException, XMLStreamException, IOException {
    super.init();
    driver = BrowserManager.getWebDriver();
    driver.get(getWebAppURL() + Constants.IOT_USER_REGISTER_URL);
    registerPage = new NewUserRegisterPage(driver);
    uiElementMapper = UIElementMapper.getInstance();
}
Also used : NewUserRegisterPage(org.wso2.iot.integration.ui.pages.uesr.NewUserRegisterPage) BeforeClass(org.testng.annotations.BeforeClass)

Example 3 with NewUserRegisterPage

use of org.wso2.iot.integration.ui.pages.uesr.NewUserRegisterPage in project product-iots by wso2.

the class LoginPage method registerNewUser.

/**
 * Method for new user registration.
 * @return After clicking the Register link, it will navigate to the User Registration page.
 * @throws IOException
 */
public NewUserRegisterPage registerNewUser() throws IOException {
    WebElement registerLink = driver.findElement(By.xpath(uiElementMapper.getElement("iot.user.register.link.xpath")));
    registerLink.click();
    return new NewUserRegisterPage(driver);
}
Also used : NewUserRegisterPage(org.wso2.iot.integration.ui.pages.uesr.NewUserRegisterPage) WebElement(org.openqa.selenium.WebElement)

Aggregations

NewUserRegisterPage (org.wso2.iot.integration.ui.pages.uesr.NewUserRegisterPage)3 WebElement (org.openqa.selenium.WebElement)1 BeforeClass (org.testng.annotations.BeforeClass)1 Test (org.testng.annotations.Test)1 IOTHomePage (org.wso2.iot.integration.ui.pages.home.IOTHomePage)1 LoginPage (org.wso2.iot.integration.ui.pages.login.LoginPage)1