Пример #1
0
 public static void ValidateTextIs <T>(this T control, string value, int?timeout = null, int?sleepInterval = null)
     where T : IElementText, IElement
 {
     WaitUntil(() => control.GetText().Equals(value), $"The control's text should be '{value}' but was '{control.GetText()}'.", timeout, sleepInterval);
     ValidatedTextIsEvent?.Invoke(control, new ElementActionEventArgs(control, value));
 }
 public static void ValidateTextIs <TComponent>(this TComponent control, string value, int?timeout = null, int?sleepInterval = null)
     where TComponent : IComponentText, IComponent <IOSElement>
 {
     ValidateControlWaitService.WaitUntil <IOSDriver <IOSElement>, IOSElement>(() => control.GetText().Equals(value), $"The control's text should be '{value}' but was '{control.GetText()}'.", timeout, sleepInterval);
     ValidatedTextIsEvent?.Invoke(control, new ComponentActionEventArgs <IOSElement>(control, value));
 }