added new next and previous methods with clicking count
fixed java doc
@@ -61,7 +61,23 @@ class CarouselPageObject extends PageObject {
}
/**
- * Clicks on the previous button to show the next chart.
+ * Clicks multiple times on the next button to show the next chart.
+ *
+ * @param count
+ * clicks this many times
+ *
+ * @return the active chart
+ */
+ public JSONObject next(final int count) {
+ JSONObject result = new JSONObject();
+ for (int i = 0; i < count; i++) {
+ result = select(nextButton);
+ }
+ return result;
+ }
+
+ /**
+ * Clicks on the previous button to show the previous chart.
*
* @return the active chart
*/
@@ -69,6 +85,22 @@ class CarouselPageObject extends PageObject {
return select(previousButton);
}
+ /**
+ * Clicks multiple times on the previous button to show the previous chart.
+ *
+ * @param count
+ * clicks this many times
+ *
+ * @return the active chart
+ */
+ public JSONObject previous(final int count) {
+ JSONObject result = new JSONObject();
+ for (int i = 0; i < count; i++) {
+ result = select(previousButton);
+ }
+ return result;
+ }
+
private JSONObject select(final HtmlAnchor anchor) {
clickOnElement(anchor);
waitForAjaxCall(activeId);
