Enter code here...public void dragElements(IWebDriver driver, By by, testPracticeDM.MoveDirection direction, Point point)
{
OpenQA.Selenium.Interactions.Actions builder = new OpenQA.Selenium.Interactions.Actions(driver);
IWebElement element = null;
if (WaitUntilElementIsPresent(driver, by, 30))
{
element = driver.FindElement(by);
switch (direction)
{
case testPracticeDM.MoveDirection.Right:
builder.DragAndDropToOffset(element, element.Location.X + point.X, element.Location.Y).Release().Build().Perform(); //.KeyUp(global::OpenQA.Selenium.Keys.Control).Release();
builder.Release();
break;
case testPracticeDM.MoveDirection.Left:
builder.DragAndDropToOffset(element, element.Location.X - point.X, element.Location.Y).Release().Build().Perform(); //KeyUp(global::OpenQA.Selenium.Keys.Control).Release();
builder.Release();
break;
case testPracticeDM.MoveDirection.Up:
break;
case testPracticeDM.MoveDirection.Down:
break;
}
}