List of usage examples for org.openqa.selenium.support.ui ExpectedConditions titleContains
public static ExpectedCondition<Boolean> titleContains(final String title)
From source file:org.wso2.iot.integration.ui.pages.groups.DeviceAddGroupPage.java
License:Open Source License
public DeviceAddGroupPage(WebDriver driver) throws IOException { this.driver = driver; this.uiElementMapper = UIElementMapper.getInstance(); WebDriverWait webDriverWait = new WebDriverWait(driver, UIUtils.webDriverTimeOut); if (!webDriverWait .until(ExpectedConditions.titleContains(uiElementMapper.getElement("cdmf.groups.page")))) { throw new IllegalStateException("This is not the Add Group page"); }// ww w. ja v a2s . c o m }
From source file:org.wso2.iot.integration.ui.pages.groups.DeviceGroupsPage.java
License:Open Source License
public DeviceGroupsPage(WebDriver driver) throws IOException { this.driver = driver; this.uiElementMapper = UIElementMapper.getInstance(); WebDriverWait webDriverWait = new WebDriverWait(driver, UIUtils.webDriverTimeOut); if (!webDriverWait .until(ExpectedConditions.titleContains(uiElementMapper.getElement("cdmf.groups.page")))) { throw new IllegalStateException("This is not the Groups page"); }//from w w w . j av a 2 s . c o m }
From source file:org.wso2.iot.integration.ui.pages.login.LoginPage.java
License:Open Source License
public LoginPage(WebDriver driver) throws IOException { this.driver = driver; this.uiElementMapper = UIElementMapper.getInstance(); WebDriverWait webDriverWait = new WebDriverWait(driver, UIUtils.webDriverTimeOut); if (!webDriverWait.until(ExpectedConditions.titleContains(uiElementMapper.getElement("cdmf.login.page")))) { throw new IllegalStateException("This is not the Login page"); }// w w w . j a v a 2 s .com userNameField = driver .findElement(By.xpath(uiElementMapper.getElement("iot.user.login.input.username.xpath"))); passwordField = driver .findElement(By.xpath(uiElementMapper.getElement("iot.user.login.input.password.xpath"))); loginButton = driver.findElement(By.xpath(uiElementMapper.getElement("iot.user.login.button.xpath"))); }
From source file:org.wso2.iot.integration.ui.pages.policy.PolicyAddPage.java
License:Open Source License
public PolicyAddPage(WebDriver driver) throws IOException { this.driver = driver; this.uiElementMapper = UIElementMapper.getInstance(); WebDriverWait webDriverWait = new WebDriverWait(driver, UIUtils.webDriverTimeOut); if (!webDriverWait .until(ExpectedConditions.titleContains(uiElementMapper.getElement("cdmf.policy.add.page")))) { throw new IllegalStateException("This is not the Add Group page"); }/* ww w.j a v a 2s .c om*/ }
From source file:org.wso2.iot.integration.ui.pages.policy.PolicyPage.java
License:Open Source License
public PolicyPage(WebDriver driver) throws IOException { this.driver = driver; this.uiElementMapper = UIElementMapper.getInstance(); WebDriverWait webDriverWait = new WebDriverWait(driver, UIUtils.webDriverTimeOut); if (!webDriverWait .until(ExpectedConditions.titleContains(uiElementMapper.getElement("cdmf.policy.page")))) { throw new IllegalStateException("This is not the Policy page"); }/*from ww w . ja v a 2 s .c o m*/ }
From source file:org.wso2.iot.integration.ui.pages.policy.PolicyViewPage.java
License:Open Source License
public PolicyViewPage(WebDriver driver) throws IOException { this.driver = driver; this.uiElementMapper = UIElementMapper.getInstance(); WebDriverWait webDriverWait = new WebDriverWait(driver, UIUtils.webDriverTimeOut); if (!webDriverWait .until(ExpectedConditions.titleContains(uiElementMapper.getElement("cdmf.policy.view.page")))) { throw new IllegalStateException("This is not the Add Group page"); }//from w ww . j ava2s. c o m }
From source file:org.wso2.iot.integration.ui.pages.samples.ConnectedCupDeviceInterface.java
License:Open Source License
public ConnectedCupDeviceInterface(WebDriver driver) throws IOException { this.driver = driver; this.uiElementMapper = UIElementMapper.getInstance(); WebDriverWait webDriverWait = new WebDriverWait(driver, UIUtils.webDriverTimeOut); if (!webDriverWait.until(ExpectedConditions.titleContains("Connected Coffee Cup"))) { throw new IllegalStateException("This is not the Connected cup device page"); }/* w w w. j a v a 2 s . c o m*/ }
From source file:org.wso2.iot.integration.ui.pages.uesr.AddUserPage.java
License:Open Source License
public AddUserPage(WebDriver driver) throws IOException { this.driver = driver; this.uiElementMapper = UIElementMapper.getInstance(); WebDriverWait webDriverWait = new WebDriverWait(driver, UIUtils.webDriverTimeOut); if (!webDriverWait .until(ExpectedConditions.titleContains(uiElementMapper.getElement("cdmf.user.add.page")))) { throw new IllegalStateException("This is not the Add User page"); }/* ww w . j a v a 2s. c o m*/ }
From source file:org.wso2.iot.integration.ui.pages.uesr.EditUserPage.java
License:Open Source License
public EditUserPage(WebDriver driver) throws Exception { this.driver = driver; this.uiElementMapper = UIElementMapper.getInstance(); WebDriverWait webDriverWait = new WebDriverWait(driver, UIUtils.webDriverTimeOut); if (!webDriverWait.until(ExpectedConditions.titleContains("User Management | IoT Server"))) { throw new IllegalStateException("This is not the Edit User page"); }//from w w w . j a v a 2 s .c o m }
From source file:org.wso2.iot.integration.ui.pages.uesr.NewUserRegisterPage.java
License:Open Source License
public NewUserRegisterPage(WebDriver driver) throws IOException { this.driver = driver; UIElementMapper uiElementMapper = UIElementMapper.getInstance(); // Check that we're on the right page. WebDriverWait webDriverWait = new WebDriverWait(driver, UIUtils.webDriverTimeOut); if (!webDriverWait .until(ExpectedConditions.titleContains(uiElementMapper.getElement("cdmf.register.page")))) { throw new IllegalStateException("This is not the Register page"); }//w ww . j a va 2 s . c om firstNameField = driver .findElement(By.xpath(uiElementMapper.getElement("iot.user.add.input.firstname.xpath"))); lastNameField = driver .findElement(By.xpath(uiElementMapper.getElement("iot.user.add.input.lastname.xpath"))); emailField = driver.findElement(By.xpath(uiElementMapper.getElement("iot.user.add.input.email.xpath"))); userNameField = driver .findElement(By.xpath(uiElementMapper.getElement("iot.user.add.input.username.xpath"))); passwordField = driver .findElement(By.xpath(uiElementMapper.getElement("iot.user.add.input.password.xpath"))); passwordConfirmationField = driver .findElement(By.xpath(uiElementMapper.getElement("iot.user.add.input.confirmpassword.xpath"))); registerButton = driver .findElement(By.xpath(uiElementMapper.getElement("iot.user.add.register.button.xpath"))); }