Search in sources :

Example 16 with AutomationContext

use of org.wso2.carbon.automation.engine.context.AutomationContext in project product-iots by wso2.

the class SampleInstallationTest method setup.

@BeforeClass(alwaysRun = true)
public void setup() throws XPathExpressionException, XMLStreamException, IOException, AutomationFrameworkException, LoginAuthenticationExceptionException {
    super.init();
    logViewerClient = new LogViewerClient(getBackendURL(), getSessionCookie(automationContext));
}
Also used : LogViewerClient(org.wso2.carbon.integration.common.admin.client.LogViewerClient) BeforeClass(org.testng.annotations.BeforeClass)

Example 17 with AutomationContext

use of org.wso2.carbon.automation.engine.context.AutomationContext in project product-iots by wso2.

the class SampleFunctionalityTest method setUp.

@BeforeClass(alwaysRun = true)
public void setUp() throws XPathExpressionException, XMLStreamException, IOException {
    super.init();
    driverDevice = BrowserManager.getWebDriver();
    driverServer = BrowserManager.getWebDriver();
    LoginUtils.login(driverServer, automationContext, getWebAppURL());
    driverServer.get(getWebAppURL() + Constants.IOT_DEVICES_URL);
    DevicesPage devicesPage = new DevicesPage(driverServer);
    deviceViewPage = devicesPage.viewDevice(Constants.IOT_CONNECTED_CUP_NAME);
    // Opens the connected cup device interface in the browser.
    driverDevice.get(deviceViewPage.getDeviceLink());
    sampleViewPage = new ConnectedCupDeviceInterface(driverDevice);
}
Also used : DevicesPage(org.wso2.iot.integration.ui.pages.devices.DevicesPage) ConnectedCupDeviceInterface(org.wso2.iot.integration.ui.pages.samples.ConnectedCupDeviceInterface) BeforeClass(org.testng.annotations.BeforeClass)

Aggregations

AutomationContext (org.wso2.carbon.automation.engine.context.AutomationContext)8 XPathExpressionException (javax.xml.xpath.XPathExpressionException)7 BeforeClass (org.testng.annotations.BeforeClass)7 IOTAdminDashboard (org.wso2.iot.integration.ui.pages.home.IOTAdminDashboard)4 DevicesPage (org.wso2.iot.integration.ui.pages.devices.DevicesPage)2 MalformedURLException (java.net.MalformedURLException)1 RemoteException (java.rmi.RemoteException)1 Test (org.testng.annotations.Test)1 User (org.wso2.carbon.automation.engine.context.beans.User)1 LogViewerClient (org.wso2.carbon.integration.common.admin.client.LogViewerClient)1 AutomationUtilException (org.wso2.carbon.integration.common.utils.exceptions.AutomationUtilException)1 ServerConfigurationManager (org.wso2.carbon.integration.common.utils.mgt.ServerConfigurationManager)1 LogViewerLogViewerException (org.wso2.carbon.logging.view.stub.LogViewerLogViewerException)1 EnrollDevicePage (org.wso2.iot.integration.ui.pages.devices.EnrollDevicePage)1 LoginPage (org.wso2.iot.integration.ui.pages.login.LoginPage)1 ConnectedCupDeviceInterface (org.wso2.iot.integration.ui.pages.samples.ConnectedCupDeviceInterface)1