Skip to content

Commit a951a8c

Browse files
committed
java: Adding a method toList that allows converting CompositeAction to JSON
1 parent fd2b856 commit a951a8c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Diff for: java/client/src/org/openqa/selenium/interactions/CompositeAction.java

+6
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717

1818
package org.openqa.selenium.interactions;
1919

20+
import com.google.common.collect.ImmutableList;
21+
2022
import java.util.ArrayList;
2123
import java.util.List;
2224

@@ -41,4 +43,8 @@ public CompositeAction addAction(Action action) {
4143
public int getNumberOfActions() {
4244
return actionsList.size();
4345
}
46+
47+
public List<Action> asList() {
48+
return ImmutableList.copyOf(actionsList);
49+
}
4450
}

0 commit comments

Comments
 (0)