20
20
import com .google .common .collect .ImmutableMap ;
21
21
22
22
import org .openqa .selenium .WebElement ;
23
- import org .openqa .selenium .remote . RemoteWebElement ;
23
+ import org .openqa .selenium .internal . HasIdentity ;
24
24
25
25
26
26
/**
@@ -50,7 +50,7 @@ public TouchAction(MobileDriver driver) {
50
50
* @return this TouchAction, for chaining.
51
51
*/
52
52
public TouchAction press (WebElement el ) {
53
- ActionParameter action = new ActionParameter ("press" , (RemoteWebElement ) el );
53
+ ActionParameter action = new ActionParameter ("press" , (HasIdentity ) el );
54
54
parameterBuilder .add (action );
55
55
return this ;
56
56
}
@@ -79,7 +79,7 @@ public TouchAction press(int x, int y) {
79
79
* @return this TouchAction, for chaining.
80
80
*/
81
81
public TouchAction press (WebElement el , int x , int y ) {
82
- ActionParameter action = new ActionParameter ("press" , (RemoteWebElement ) el );
82
+ ActionParameter action = new ActionParameter ("press" , (HasIdentity ) el );
83
83
action .addParameter ("x" , x );
84
84
action .addParameter ("y" , y );
85
85
parameterBuilder .add (action );
@@ -104,7 +104,7 @@ public TouchAction release() {
104
104
* @return this TouchAction, for chaining.
105
105
*/
106
106
public TouchAction moveTo (WebElement el ) {
107
- ActionParameter action = new ActionParameter ("moveTo" , (RemoteWebElement ) el );
107
+ ActionParameter action = new ActionParameter ("moveTo" , (HasIdentity ) el );
108
108
parameterBuilder .add (action );
109
109
return this ;
110
110
}
@@ -135,7 +135,7 @@ public TouchAction moveTo(int x, int y) {
135
135
* @return this TouchAction, for chaining.
136
136
*/
137
137
public TouchAction moveTo (WebElement el , int x , int y ) {
138
- ActionParameter action = new ActionParameter ("moveTo" , (RemoteWebElement ) el );
138
+ ActionParameter action = new ActionParameter ("moveTo" , (HasIdentity ) el );
139
139
action .addParameter ("x" , x );
140
140
action .addParameter ("y" , y );
141
141
parameterBuilder .add (action );
@@ -149,7 +149,7 @@ public TouchAction moveTo(WebElement el, int x, int y) {
149
149
* @return this TouchAction, for chaining.
150
150
*/
151
151
public TouchAction tap (WebElement el ) {
152
- ActionParameter action = new ActionParameter ("tap" , (RemoteWebElement ) el );
152
+ ActionParameter action = new ActionParameter ("tap" , (HasIdentity ) el );
153
153
parameterBuilder .add (action );
154
154
return this ;
155
155
}
@@ -178,7 +178,7 @@ public TouchAction tap(int x, int y) {
178
178
* @return this TouchAction, for chaining.
179
179
*/
180
180
public TouchAction tap (WebElement el , int x , int y ) {
181
- ActionParameter action = new ActionParameter ("tap" , (RemoteWebElement ) el );
181
+ ActionParameter action = new ActionParameter ("tap" , (HasIdentity ) el );
182
182
action .addParameter ("x" , x );
183
183
action .addParameter ("y" , y );
184
184
parameterBuilder .add (action );
@@ -216,7 +216,7 @@ public TouchAction waitAction(int ms) {
216
216
* @return this TouchAction, for chaining.
217
217
*/
218
218
public TouchAction longPress (WebElement el ) {
219
- ActionParameter action = new ActionParameter ("longPress" , (RemoteWebElement ) el );
219
+ ActionParameter action = new ActionParameter ("longPress" , (HasIdentity ) el );
220
220
parameterBuilder .add (action );
221
221
return this ;
222
222
}
@@ -229,7 +229,7 @@ public TouchAction longPress(WebElement el) {
229
229
* @return this TouchAction, for chaining.
230
230
*/
231
231
public TouchAction longPress (WebElement el , int duration ) {
232
- ActionParameter action = new ActionParameter ("longPress" , (RemoteWebElement ) el );
232
+ ActionParameter action = new ActionParameter ("longPress" , (HasIdentity ) el );
233
233
action .addParameter ("duration" , duration );
234
234
parameterBuilder .add (action );
235
235
return this ;
@@ -279,7 +279,7 @@ public TouchAction longPress(int x, int y, int duration) {
279
279
* @return this TouchAction, for chaining.
280
280
*/
281
281
public TouchAction longPress (WebElement el , int x , int y ) {
282
- ActionParameter action = new ActionParameter ("longPress" , (RemoteWebElement ) el );
282
+ ActionParameter action = new ActionParameter ("longPress" , (HasIdentity ) el );
283
283
action .addParameter ("x" , x );
284
284
action .addParameter ("y" , y );
285
285
parameterBuilder .add (action );
@@ -297,7 +297,7 @@ public TouchAction longPress(WebElement el, int x, int y) {
297
297
* @return this TouchAction, for chaining.
298
298
*/
299
299
public TouchAction longPress (WebElement el , int x , int y , int duration ) {
300
- ActionParameter action = new ActionParameter ("longPress" , (RemoteWebElement ) el );
300
+ ActionParameter action = new ActionParameter ("longPress" , (HasIdentity ) el );
301
301
action .addParameter ("x" , x );
302
302
action .addParameter ("y" , y );
303
303
action .addParameter ("duration" , duration );
@@ -355,7 +355,7 @@ public ActionParameter(String actionName) {
355
355
optionsBuilder = ImmutableMap .builder ();
356
356
}
357
357
358
- public ActionParameter (String actionName , RemoteWebElement el ) {
358
+ public ActionParameter (String actionName , HasIdentity el ) {
359
359
this .actionName = actionName ;
360
360
optionsBuilder = ImmutableMap .builder ();
361
361
addParameter ("element" , el .getId ());
0 commit comments