Skip to content

Commit be61a73

Browse files
p0dejejimevans
authored andcommitted
Add failing test for a sequence of drag and drop by offset and element
The test would fail on IE11 + Win 10: Failed : OpenQA.Selenium.Interactions.DragAndDropTest.DragAndDropRelativeAndToElement Expected: {X=8,Y=8} But was: {X=8,Y=26} Signed-off-by: Jim Evans <james.h.evans.jr@gmail.com>
1 parent aa8e066 commit be61a73

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

dotnet/test/common/Interactions/DragAndDropTest.cs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,22 @@ public void DragAndDropToElement()
5656
Assert.AreEqual(img1.Location, img2.Location);
5757
}
5858

59+
[Test]
60+
[Category("Javascript")]
61+
[IgnoreBrowser(Browser.HtmlUnit)]
62+
[IgnoreBrowser(Browser.Android, "Mobile browser does not support drag-and-drop")]
63+
[IgnoreBrowser(Browser.IPhone, "Mobile browser does not support drag-and-drop")]
64+
[IgnoreBrowser(Browser.Safari, "Advanced User Interactions not implmented on Safari")]
65+
public void DragAndDropRelativeAndToElement()
66+
{
67+
driver.Url = dragAndDropPage;
68+
IWebElement img1 = driver.FindElement(By.Id("test1"));
69+
IWebElement img2 = driver.FindElement(By.Id("test2"));
70+
Actions actionProvider = new Actions(driver);
71+
actionProvider.DragAndDropToOffset(img1, 100, 100).DragAndDrop(img2, img1).Perform();
72+
Assert.AreEqual(img1.Location, img2.Location);
73+
}
74+
5975
[Test]
6076
[Category("Javascript")]
6177
[IgnoreBrowser(Browser.Safari, "Advanced User Interactions not implmented on Safari")]

0 commit comments

Comments
 (0)