public void MultipleDragAndDropWait() { var altElement1 = altUnityDriver.FindElement("Drag Image1"); var altElement2 = altUnityDriver.FindElement("Drop Box1"); altUnityDriver.SwipeAndWait(new Vector2(altElement1.x, altElement1.y), new Vector2(altElement2.x, altElement2.y), 1); altElement1 = altUnityDriver.FindElement("Drag Image2"); altElement2 = altUnityDriver.FindElement("Drop Box2"); altUnityDriver.SwipeAndWait(new Vector2(altElement1.x, altElement1.y), new Vector2(altElement2.x, altElement2.y), 1); altElement1 = altUnityDriver.FindElement("Drag Image3"); altElement2 = altUnityDriver.FindElement("Drop Box1"); altUnityDriver.SwipeAndWait(new Vector2(altElement1.x, altElement1.y), new Vector2(altElement2.x, altElement2.y), 1); altElement1 = altUnityDriver.FindElement("Drag Image1"); altElement2 = altUnityDriver.FindElement("Drop Box1"); altUnityDriver.SwipeAndWait(new Vector2(altElement1.x, altElement1.y), new Vector2(altElement2.x, altElement2.y), 1); var imageSource = altUnityDriver.FindElement("Drag Image1").GetComponentProperty("UnityEngine.UI.Image", "sprite"); var imageSourceDropZone = altUnityDriver.FindElement("Drop Image").GetComponentProperty("UnityEngine.UI.Image", "sprite"); Assert.AreNotEqual(imageSource, imageSourceDropZone); imageSource = altUnityDriver.FindElement("Drag Image2").GetComponentProperty("UnityEngine.UI.Image", "sprite"); imageSourceDropZone = altUnityDriver.FindElement("Drop").GetComponentProperty("UnityEngine.UI.Image", "sprite"); Assert.AreNotEqual(imageSource, imageSourceDropZone); }
public void ResizePanel() { var altElement = altUnityDriver.FindElement("Resize Zone"); var position = new Vector2(altElement.x, altElement.y); altUnityDriver.SwipeAndWait(altElement.getScreenPosition(), new Vector2(altElement.x - 200, altElement.y - 200), 2); Thread.Sleep(2000); altElement = altUnityDriver.FindElement("Resize Zone"); var position2 = new Vector2(altElement.x, altElement.y); Assert.AreNotEqual(position, position2); }