예제 #1
0
        public static void ClickPixels(int x, int y)
        {
            GameObject go = UITestUtils.FindObjectByPixels(x, y);

            if (go == null)
            {
                Assert.Fail("Cannot click to pixels [" + x + ";" + y + "], couse there are no objects.");
            }
            Interact.Click(go);
        }
예제 #2
0
        public IEnumerator TestMakeScreenshotDontFail()
        {
            string expectedWarning = "Screenshot comparing fail was ignored: " +
                                     "can't find reference screen shot with path: ReferenceScreenshots/resolution_750_1334/TestMakeScreenshotDontFail/reference to compare it with screen shot: test";
            var waiter = AsyncWait.StartWaitingForLog(expectedWarning,
                                                      LogType.Warning);

            yield return(Interact.MakeScreenshotAndCompare("test", "reference", 0.9f,
                                                           true));

            yield return(waiter);

            string expectedError = "Screenshot equals failed: \n" +
                                   "can't find reference screen shot with path: ReferenceScreenshots/resolution_750_1334/TestMakeScreenshotDontFail/reference to compare it with screen shot: test";

            PermittedErrors.Add(expectedError);
            waiter = AsyncWait.StartWaitingForLog(expectedError, LogType.Error);
            Interact.FailIfScreenShotsNotEquals();
            yield return(waiter);
        }
예제 #3
0
        public IEnumerator TestMakeScreenShotAndCompare()
        {
            yield return(Interact.MakeScreenShotReference("reference"));

            yield return(Interact.MakeScreenshotAndCompare("test", "reference"));
        }
예제 #4
0
 public IEnumerator TestMakeScreenShotReference()
 {
     yield return(Interact.MakeScreenShotReference("reference"));
 }
예제 #5
0
 public IEnumerator TestMakeScreenShot()
 {
     yield return(Interact.MakeScreenShot("test_screen"));
 }