Ejemplo n.º 1
0
        private static void BuildError(Dictionary <Task <bool>, Func <int, bool> > invokeMethodByTask, IEnumerable <Task <bool> > failedTasks)
        {
            var errorMessage = new StringBuilder();

            foreach (var notCompletedTask in failedTasks)
            {
                var uiObject = invokeMethodByTask[notCompletedTask].Target as UiObject;
                if (uiObject != null)
                {
                    errorMessage.Append($"{WithErrorMessageBuilder.BuildWithErrorMessage(uiObject.Withs).Replace("Could not find node where", "Node where")} \r\n");
                }
            }

            throw new UiNodeNotFoundException("These nodes where not as expected (visible or hidden): \r\n \r\n" + errorMessage);
        }
Ejemplo n.º 2
0
 public UiNodeNotFoundException(IList <With> withs)
     : base(WithErrorMessageBuilder.BuildWithErrorMessage(withs))
 {
 }