@@ -25,13 +25,13 @@ public void DragAndDropRelative()
25
25
{
26
26
driver . Url = dragAndDropPage ;
27
27
IWebElement img = driver . FindElement ( By . Id ( "test1" ) ) ;
28
- Point expectedLocation = drag ( img , img . Location , 150 , 200 ) ;
28
+ Point expectedLocation = Drag ( img , img . Location , 150 , 200 ) ;
29
29
Assert . AreEqual ( expectedLocation , img . Location ) ;
30
- expectedLocation = drag ( img , img . Location , - 50 , - 25 ) ;
30
+ expectedLocation = Drag ( img , img . Location , - 50 , - 25 ) ;
31
31
Assert . AreEqual ( expectedLocation , img . Location ) ;
32
- expectedLocation = drag ( img , img . Location , 0 , 0 ) ;
32
+ expectedLocation = Drag ( img , img . Location , 0 , 0 ) ;
33
33
Assert . AreEqual ( expectedLocation , img . Location ) ;
34
- expectedLocation = drag ( img , img . Location , 1 , - 1 ) ;
34
+ expectedLocation = Drag ( img , img . Location , 1 , - 1 ) ;
35
35
Assert . AreEqual ( expectedLocation , img . Location ) ;
36
36
}
37
37
@@ -117,7 +117,7 @@ public void ElementInDiv()
117
117
driver . Url = dragAndDropPage ;
118
118
IWebElement img = driver . FindElement ( By . Id ( "test3" ) ) ;
119
119
Point startLocation = img . Location ;
120
- Point expectedLocation = drag ( img , startLocation , 100 , 100 ) ;
120
+ Point expectedLocation = Drag ( img , startLocation , 100 , 100 ) ;
121
121
Point endLocation = img . Location ;
122
122
Assert . AreEqual ( expectedLocation , endLocation ) ;
123
123
}
@@ -153,7 +153,7 @@ public void ShouldAllowUsersToDragAndDropToElementsOffTheCurrentViewPort()
153
153
{
154
154
driver . Url = dragAndDropPage ;
155
155
IWebElement img = driver . FindElement ( By . Id ( "test3" ) ) ;
156
- Point expectedLocation = drag ( img , img . Location , 100 , 100 ) ;
156
+ Point expectedLocation = Drag ( img , img . Location , 100 , 100 ) ;
157
157
Assert . AreEqual ( expectedLocation , img . Location ) ;
158
158
}
159
159
finally
@@ -230,11 +230,13 @@ public void DragAndDropRelativeAndToElement()
230
230
IWebElement img1 = driver . FindElement ( By . Id ( "test1" ) ) ;
231
231
IWebElement img2 = driver . FindElement ( By . Id ( "test2" ) ) ;
232
232
Actions actionProvider = new Actions ( driver ) ;
233
- actionProvider . DragAndDropToOffset ( img1 , 100 , 100 ) . DragAndDrop ( img2 , img1 ) . Perform ( ) ;
233
+ actionProvider . DragAndDropToOffset ( img1 , 100 , 100 ) . Perform ( ) ;
234
+ actionProvider . Reset ( ) ;
235
+ actionProvider . DragAndDrop ( img2 , img1 ) . Perform ( ) ;
234
236
Assert . AreEqual ( img1 . Location , img2 . Location ) ;
235
237
}
236
238
237
- private Point drag ( IWebElement elem , Point initialLocation , int moveRightBy , int moveDownBy )
239
+ private Point Drag ( IWebElement elem , Point initialLocation , int moveRightBy , int moveDownBy )
238
240
{
239
241
Point expectedLocation = new Point ( initialLocation . X , initialLocation . Y ) ;
240
242
expectedLocation . Offset ( moveRightBy , moveDownBy ) ;
0 commit comments