@@ -29,6 +29,8 @@ public interface PerformsTouchActions extends ExecutesMethod {
2929 * https://dvcs.w3.org/hg/webdriver/raw-file/default/webdriver-spec.html
3030 * It's more convenient to call the perform() method of the TouchAction
3131 * object itself.
32+ * All the existing touch action parameters will be wiped out after this method
33+ * is called.
3234 *
3335 * @param touchAction A TouchAction object, which contains a list of individual
3436 * touch actions to perform
@@ -37,7 +39,7 @@ public interface PerformsTouchActions extends ExecutesMethod {
3739 default TouchAction performTouchAction (TouchAction touchAction ) {
3840 ImmutableMap <String , ImmutableList <Object >> parameters = touchAction .getParameters ();
3941 execute (PERFORM_TOUCH_ACTION , parameters );
40- return touchAction ;
42+ return touchAction . clearParameters () ;
4143 }
4244
4345 /**
@@ -46,11 +48,14 @@ default TouchAction performTouchAction(TouchAction touchAction) {
4648 * https://dvcs.w3.org/hg/webdriver/raw-file/default/webdriver-spec.html
4749 * It's more convenient to call the perform() method of the MultiTouchAction
4850 * object.
51+ * All the existing multi touch actions will be wiped out after this method
52+ * is called.
4953 *
5054 * @param multiAction the MultiTouchAction object to perform.
5155 */
5256 default void performMultiTouchAction (MultiTouchAction multiAction ) {
5357 ImmutableMap <String , ImmutableList <Object >> parameters = multiAction .getParameters ();
5458 execute (PERFORM_MULTI_TOUCH , parameters );
59+ multiAction .clearActions ();
5560 }
5661}
0 commit comments