Changing method name in .NET test
@@ -25,13 +25,13 @@ public void DragAndDropRelative()
{
driver.Url = dragAndDropPage;
IWebElement img = driver.FindElement(By.Id("test1"));
- Point expectedLocation = drag(img, img.Location, 150, 200);
+ Point expectedLocation = Drag(img, img.Location, 150, 200);
Assert.AreEqual(expectedLocation, img.Location);
- expectedLocation = drag(img, img.Location, -50, -25);
+ expectedLocation = Drag(img, img.Location, -50, -25);
Assert.AreEqual(expectedLocation, img.Location);
- expectedLocation = drag(img, img.Location, 0, 0);
+ expectedLocation = Drag(img, img.Location, 0, 0);
Assert.AreEqual(expectedLocation, img.Location);
- expectedLocation = drag(img, img.Location, 1, -1);
+ expectedLocation = Drag(img, img.Location, 1, -1);
Assert.AreEqual(expectedLocation, img.Location);
}
@@ -117,7 +117,7 @@ public void ElementInDiv()
driver.Url = dragAndDropPage;
IWebElement img = driver.FindElement(By.Id("test3"));
Point startLocation = img.Location;
- Point expectedLocation = drag(img, startLocation, 100, 100);
+ Point expectedLocation = Drag(img, startLocation, 100, 100);
Point endLocation = img.Location;
Assert.AreEqual(expectedLocation, endLocation);
}
@@ -153,7 +153,7 @@ public void ShouldAllowUsersToDragAndDropToElementsOffTheCurrentViewPort()
{
driver.Url = dragAndDropPage;
IWebElement img = driver.FindElement(By.Id("test3"));
- Point expectedLocation = drag(img, img.Location, 100, 100);
+ Point expectedLocation = Drag(img, img.Location, 100, 100);
Assert.AreEqual(expectedLocation, img.Location);
}
finally
@@ -230,11 +230,13 @@ public void DragAndDropRelativeAndToElement()
IWebElement img1 = driver.FindElement(By.Id("test1"));
IWebElement img2 = driver.FindElement(By.Id("test2"));
Actions actionProvider = new Actions(driver);
- actionProvider.DragAndDropToOffset(img1, 100, 100).DragAndDrop(img2, img1).Perform();
+ actionProvider.DragAndDropToOffset(img1, 100, 100).Perform();
+ actionProvider.Reset();
+ actionProvider.DragAndDrop(img2, img1).Perform();
Assert.AreEqual(img1.Location, img2.Location);
}
- private Point drag(IWebElement elem, Point initialLocation, int moveRightBy, int moveDownBy)
+ private Point Drag(IWebElement elem, Point initialLocation, int moveRightBy, int moveDownBy)
{
Point expectedLocation = new Point(initialLocation.X, initialLocation.Y);
expectedLocation.Offset(moveRightBy, moveDownBy);
