|
1 | 1 | /*************************************************************************************************** |
2 | 2 | * |
3 | | - * Copyright (c) 2024 - 2025 Open Universiteit - www.ou.nl |
4 | | - * Copyright (c) 2024 - 2025 Universitat Politecnica de Valencia - www.upv.es |
| 3 | + * Copyright (c) 2024 - 2026 Open Universiteit - www.ou.nl |
| 4 | + * Copyright (c) 2024 - 2026 Universitat Politecnica de Valencia - www.upv.es |
5 | 5 | * |
6 | 6 | * Redistribution and use in source and binary forms, with or without |
7 | 7 | * modification, are permitted provided that the following conditions are met: |
|
40 | 40 | import org.testar.monkey.alayer.actions.CompoundAction; |
41 | 41 | import org.testar.monkey.alayer.actions.PasteText; |
42 | 42 | import org.testar.monkey.alayer.actions.Type; |
| 43 | +import org.testar.monkey.alayer.actions.WdRemoteTypeAction; |
43 | 44 | import org.testar.monkey.alayer.actions.WdSelectListAction; |
44 | 45 |
|
45 | 46 | import java.util.ArrayList; |
@@ -122,11 +123,15 @@ public String toString() { |
122 | 123 | switch(type) { |
123 | 124 | case "ClickTypeInto": |
124 | 125 | case "PasteTextInto": |
| 126 | + case "RemoteType": |
| 127 | + case "RemoteScrollType": |
125 | 128 | String input = getCompoundActionInputText(action); |
126 | 129 | // TODO: Differentiate between types of input fields (numeric, password, etc.) |
127 | 130 | builder.append(String.format("%s: Typed '%s' in TextField '%s'", actionId, input, description)); |
128 | 131 | break; |
129 | 132 | case "LeftClickAt": |
| 133 | + case "RemoteClick": |
| 134 | + case "RemoteScrollClick": |
130 | 135 | builder.append(String.format("%s: Clicked on '%s'", actionId, description)); |
131 | 136 | break; |
132 | 137 | case "HistoryBackScript": |
@@ -176,6 +181,11 @@ private String getCompoundActionInputText(Action action) { |
176 | 181 | } |
177 | 182 | } |
178 | 183 |
|
| 184 | + if(action instanceof WdRemoteTypeAction) { |
| 185 | + CharSequence input = ((WdRemoteTypeAction) action).getKeys(); |
| 186 | + return input == null ? "Unknown Action Input" : input.toString(); |
| 187 | + } |
| 188 | + |
179 | 189 | return action.get(Tags.InputText, "Unknown Action Input"); |
180 | 190 | } |
181 | 191 | } |
0 commit comments