Commit 41b9c02f authored by Robert Poienar's avatar Robert Poienar

Change coordinate where to create stars in tests

parent 64b9e251
......@@ -281,12 +281,13 @@ class PythonTests(unittest.TestCase):
stars = self.altdriver.find_elements_where_name_contains("Star","Player2")
self.assertEqual(1, len(stars))
player = self.altdriver.find_elements_where_name_contains("Player","Player2")
self.altdriver.move_mouse(int(stars[0].x),int(stars[0].y)+100, 1)
self.altdriver.move_mouse(int(stars[0].x),int(player[0].y)+500, 1)
time.sleep(1.5)
self.altdriver.press_key('Mouse0', 1,0)
self.altdriver.move_mouse_and_wait(int(stars[0].x),int(stars[0].y)-100, 1)
self.altdriver.move_mouse_and_wait(int(stars[0].x),int(player[0].y)-500, 1)
self.altdriver.press_key('Mouse0', 1,0)
stars = self.altdriver.find_elements_where_name_contains("Star")
......
......@@ -69,13 +69,15 @@ public class TestScene5
var stars = AltUnityDriver.FindElementsWhereNameContains("Star","Player2");
Assert.AreEqual(1, stars.Count);
var player = AltUnityDriver.FindElementsWhereNameContains("Player", "Player2");
AltUnityDriver.MoveMouse(new UnityEngine.Vector2(stars[0].x,stars[0].y+100), 1);
AltUnityDriver.MoveMouse(new UnityEngine.Vector2(stars[0].x, player[0].y+500), 1);
UnityEngine.Debug.Log(stars[0].x+" "+stars[0].y);
Thread.Sleep(1500);
AltUnityDriver.PressKey(UnityEngine.KeyCode.Mouse0,1, 0);
AltUnityDriver.MoveMouseAndWait(new UnityEngine.Vector2(stars[0].x, stars[0].y-100), 1);
AltUnityDriver.MoveMouseAndWait(new UnityEngine.Vector2(stars[0].x, player[0].y-500), 1);
Thread.Sleep(1500);
AltUnityDriver.PressKeyAndWait(UnityEngine.KeyCode.Mouse0,1, 1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment