I tried many ways to drag and drop an horizontal slide bar to another element but it didn’t work.
To make sure, the element path is correct or not, I used javascript to hightlight the element border and it worked.
Slidebar is the highlighted horizontal bar at the bottom and i want to drag this element to another element highlighted at top (i.e Priced).
I tried C# DragAndDrop methods, Actions methods, Javascript method. Code is executing successfully but it is not getting dragged.
Actions code is as follows:
// Locate the elements
IWebElement sourceElement = driver.FindElement(By.Id("sourceElementId"));
IWebElement targetElement = driver.FindElement(By.Id("targetElementId"));
// Create an Actions object
Actions actions = new Actions(driver);
actions.MoveToElement(bar.Element, 50, 0);
actions.ClickAndHold();
actions.MoveToElement(lblPricingHeader.GetDisplayedElement().Element);
actions.MoveByOffset(0, 100);
actions.Release();
actions.build();
actions.Perform();
Can anyone help me on resolving this issue