当我尝试声明拖放结果(偏移x和y)时,我看到以下错误消息:
我的代码:
var sourceStartLocation = sourceStart.Location;
IWebElement target = driver.FindElement(By.Id("droppablerevert"));
Actions builder = new Actions(driver);
string classBefore = target.GetAttribute("class");
builder.DragAndDrop(sourceStart, target).Perform();
IWebElement fullTarget = driver.FindElement(By.Id("droppablerevert"));
string classAfter = fullTarget.GetAttribute("class");
driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(10);
IWebElement sourceEnd = driver.FindElement(By.Id("draggablerevert"));
var sourceEndLocation = sourceEnd.Location;
Assert.AreNotEqual(classBefore, classAfter);
Assert.AreEqual(sourceStartLocation, sourceEndLocation);