protected Map<String, List<Object>> getParameters() { ImmutableList<TouchAction> touchActions = actions.build(); return ImmutableMap.of("actions", touchActions.stream().map(touchAction -> touchAction.getParameters().get("actions")).collect(toList())); }
/** * Performs a chain of touch actions, which together can be considered an * entire gesture. See the Webriver 3 spec * https://dvcs.w3.org/hg/webdriver/raw-file/default/webdriver-spec.html * It's more convenient to call the perform() method of the TouchAction * object itself. * All the existing touch action parameters will be wiped out after this method * is called. * * @param touchAction A TouchAction object, which contains a list of individual * touch actions to perform * @return the same touch action object */ default TouchAction performTouchAction(TouchAction touchAction) { Map<String, List<Object>> parameters = touchAction.getParameters(); execute(PERFORM_TOUCH_ACTION, parameters); return touchAction.clearParameters(); }
protected Map<String, List<Object>> getParameters() { ImmutableList<TouchAction> touchActions = actions.build(); return ImmutableMap.of("actions", touchActions.stream().map(touchAction -> touchAction.getParameters().get("actions")).collect(toList())); }
/** * Performs a chain of touch actions, which together can be considered an * entire gesture. See the Webriver 3 spec * https://dvcs.w3.org/hg/webdriver/raw-file/default/webdriver-spec.html * It's more convenient to call the perform() method of the TouchAction * object itself. * All the existing touch action parameters will be wiped out after this method * is called. * * @param touchAction A TouchAction object, which contains a list of individual * touch actions to perform * @return the same touch action object */ default TouchAction performTouchAction(TouchAction touchAction) { Map<String, List<Object>> parameters = touchAction.getParameters(); execute(PERFORM_TOUCH_ACTION, parameters); return touchAction.clearParameters(); }