public IEnumerator WaitForObjectDisabledByComponent()
        {
            var exceptionMessage = "Exception: Operation timed out: Wait failed, reason: WaitObjectDisabled<PlayQ.UITestTools.Tests.TestObject>";

            PermittedErrors.Add(exceptionMessage);
            var waiter = AsyncWait.StartWaitingForLog(exceptionMessage, LogType.Exception);

            yield return(Wait.ObjectDisabled <TestObject>());

            yield return(waiter);
        }
        public IEnumerator WaitForObjectDisabledByName()
        {
            var exceptionMessage = "Exception: Operation timed out: Wait failed, reason: WaitObjectDisabled path: Object_enabled_at_start";

            PermittedErrors.Add(exceptionMessage);
            var waiter = AsyncWait.StartWaitingForLog(exceptionMessage, LogType.Exception);

            yield return(Wait.ObjectDisabled("Object_enabled_at_start"));

            yield return(waiter);
        }
        public IEnumerator WaitForObjectDestractionByName()
        {
            var exceptionMessage = "Exception: Operation timed out: Wait failed, reason: WaitForDestroy path: container";

            PermittedErrors.Add(exceptionMessage);
            var waiter = AsyncWait.StartWaitingForLog(exceptionMessage, LogType.Exception);

            yield return(Wait.ObjectDestroyed("container"));

            yield return(waiter);
        }
        public IEnumerator WaitForButtonAccesible()
        {
            var exceptionMessage = "Exception: Operation timed out: Wait failed, reason: ButtonAccessible UnityEngine.GameObject";

            PermittedErrors.Add(exceptionMessage);
            var waiter = AsyncWait.StartWaitingForLog(exceptionMessage, LogType.Exception);

            var button = UITestUtils.FindAnyGameObject("container");

            yield return(Wait.ButtonAccessible(button));

            yield return(waiter);
        }
        public IEnumerator WaitForObjectDestractionByInstance()
        {
            var objectInstance = UITestUtils.FindAnyGameObject <TestObject>().gameObject;

            var exceptionMessage = "Exception: Operation timed out: Wait failed, reason: WaitForDestroy UnityEngine.GameObject";

            PermittedErrors.Add(exceptionMessage);
            var waiter = AsyncWait.StartWaitingForLog(exceptionMessage, LogType.Exception);

            yield return(Wait.ObjectDestroyed(objectInstance));

            yield return(waiter);
        }
        public IEnumerator WaitForObjectByComponentAndName()
        {
            var testObject = UITestUtils.FindAnyGameObject <TestObject>().gameObject;

            Object.DestroyImmediate(testObject);

            var exceptionMessage = "Exception: Operation timed out: Wait failed, reason: WaitForObject<PlayQ.UITestTools.Tests.TestObject>";

            PermittedErrors.Add(exceptionMessage);
            var waiter = AsyncWait.StartWaitingForLog(exceptionMessage, LogType.Exception);

            yield return(Wait.ObjectInstantiated <TestObject>("container"));

            yield return(waiter);
        }
        public IEnumerator WaitForObjectEnabledByComponent()
        {
            var exceptionMessage = "Exception: Operation timed out: Wait failed, reason: WaitObjectEnabled<PlayQ.UITestTools.Tests.TestObject>";

            PermittedErrors.Add(exceptionMessage);
            var waiter = AsyncWait.StartWaitingForLog(exceptionMessage, LogType.Exception);

            var testObject = UITestUtils.FindAnyGameObject <TestObject>().gameObject;

            testObject.SetActive(false);
            //check for enabled by component type
            yield return(Wait.ObjectEnabled <TestObject>());

            yield return(waiter);
        }
        public IEnumerator WaitForObjectEnabledByName()
        {
            var exceptionMessage = "Exception: Operation timed out: Wait failed, reason: WaitObjectEnabled path: container";

            PermittedErrors.Add(exceptionMessage);
            var waiter = AsyncWait.StartWaitingForLog(exceptionMessage, LogType.Exception);

            var testObject = UITestUtils.FindAnyGameObject <TestObject>().gameObject;

            testObject.SetActive(false);

            //check for enabled by path in hierarchy
            yield return(Wait.ObjectEnabled("container"));

            yield return(waiter);
        }