use of org.wso2.iot.integration.ui.pages.samples.ConnectedCupDeviceTypeViewPage in project product-iots by wso2.
the class EnrollDevicePage method gotoConnectedCupDeviceTypeViewPage.
/**
* Method to perform the navigation to Device type view page of the Connected cup.
* @return : The corresponding Device type view page. Null, if the element is not visible.
*/
public ConnectedCupDeviceTypeViewPage gotoConnectedCupDeviceTypeViewPage() throws IOException {
boolean check = UIUtils.isElementPresent(log, driver, By.xpath(uiElementMapper.getElement("iot.sample.connectedcup.xpath")));
if (check) {
WebElement deviceDiv = driver.findElement(By.xpath(uiElementMapper.getElement("iot.sample.connectedcup.xpath")));
WebElement tryBtn = deviceDiv.findElement(By.tagName("button"));
tryBtn.click();
return new ConnectedCupDeviceTypeViewPage(driver);
} else {
log.error("Element not found!");
return null;
}
}
use of org.wso2.iot.integration.ui.pages.samples.ConnectedCupDeviceTypeViewPage in project product-iots by wso2.
the class SampleEnrollmentTest method setup.
@BeforeClass(alwaysRun = true)
public void setup() throws XPathExpressionException, XMLStreamException, IOException {
super.init();
driver = BrowserManager.getWebDriver();
LoginUtils.login(driver, automationContext, getWebAppURL());
IOTAdminDashboard adminDashboard = new IOTAdminDashboard(driver);
EnrollDevicePage enrollDevicePage = adminDashboard.enrollNewDevice();
connectedCupDeviceTypeViewPage = enrollDevicePage.gotoConnectedCupDeviceTypeViewPage();
}
Aggregations