|
|
@ -78,7 +78,6 @@ public class ConnectedCupDeviceViewPage {
|
|
|
|
return new ConnectedCupDeviceInterface(driverDevice);
|
|
|
|
return new ConnectedCupDeviceInterface(driverDevice);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Gets the connected cup device web app URL.
|
|
|
|
* Gets the connected cup device web app URL.
|
|
|
|
* @return : Link of the connected cup device web app.
|
|
|
|
* @return : Link of the connected cup device web app.
|
|
|
@ -91,7 +90,6 @@ public class ConnectedCupDeviceViewPage {
|
|
|
|
uiElementMapper.getElement("iot.sample.connectedcup.gotodevice.xpath"))).getAttribute("href");
|
|
|
|
uiElementMapper.getElement("iot.sample.connectedcup.gotodevice.xpath"))).getAttribute("href");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* This method checks whether there are expected number of graphs are available in the UI.
|
|
|
|
* This method checks whether there are expected number of graphs are available in the UI.
|
|
|
|
* @param count : Number of graphs expected.
|
|
|
|
* @param count : Number of graphs expected.
|
|
|
@ -101,7 +99,6 @@ public class ConnectedCupDeviceViewPage {
|
|
|
|
return handler.getGraphCount() == count;
|
|
|
|
return handler.getGraphCount() == count;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Checks whether the selected graph axes represent the given values.
|
|
|
|
* Checks whether the selected graph axes represent the given values.
|
|
|
|
* @param axis : Graph axis. X or Y
|
|
|
|
* @param axis : Graph axis. X or Y
|
|
|
@ -119,6 +116,7 @@ public class ConnectedCupDeviceViewPage {
|
|
|
|
return graphMap.get(graphId).getyAxis().contains(axisName);
|
|
|
|
return graphMap.get(graphId).getyAxis().contains(axisName);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
log.error("There are no graphs found.");
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -131,12 +129,13 @@ public class ConnectedCupDeviceViewPage {
|
|
|
|
public boolean graphLegendName(String graphId, String legend) {
|
|
|
|
public boolean graphLegendName(String graphId, String legend) {
|
|
|
|
log.info(graphMap.toString());
|
|
|
|
log.info(graphMap.toString());
|
|
|
|
if (graphMap.size() != 0) {
|
|
|
|
if (graphMap.size() != 0) {
|
|
|
|
try {
|
|
|
|
if (graphMap.get(graphId) != null){
|
|
|
|
return graphMap.get(graphId).getLegend().contains(legend);
|
|
|
|
return graphMap.get(graphId).getLegend().contains(legend);
|
|
|
|
} catch (NullPointerException e) {
|
|
|
|
|
|
|
|
log.info("Null Pointer" + e.getMessage());
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
log.error(String.format("Graph for %s is not found.", graphId));
|
|
|
|
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
log.error("There are no graphs found.");
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|