public static void ValidateTextIsNotSet <TComponent>(this TComponent control, int?timeout = null, int?sleepInterval = null)
     where TComponent : IComponentText, IComponent <IOSElement>
 {
     ValidateControlWaitService.WaitUntil <IOSDriver <IOSElement>, IOSElement>(() => string.IsNullOrEmpty(control.GetText()), $"The control's text should be null but was '{control.GetText()}'.", timeout, sleepInterval);
     ValidatedTextIsNotSetEvent?.Invoke(control, new ComponentActionEventArgs <IOSElement>(control));
 }
 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));
 }
示例#3
0
 public static void ValidateIsNotSelected <T>(this T control, int?timeout = null, int?sleepInterval = null)
     where T : IElementSelected, IElement <AndroidElement>
 {
     ValidateControlWaitService.WaitUntil <AndroidDriver <AndroidElement>, AndroidElement>(() => control.IsSelected.Equals(false), "The control should be not selected but it WAS.", timeout, sleepInterval);
     ValidatedIsNotSelectedEvent?.Invoke(control, new ElementActionEventArgs <AndroidElement>(control));
 }
示例#4
0
 public static void ValidateDateIs <T>(this T control, string value, int?timeout = null, int?sleepInterval = null)
     where T : IElementDate, IElement <AndroidElement>
 {
     ValidateControlWaitService.WaitUntil <AndroidDriver <AndroidElement>, AndroidElement>(() => control.GetDate().Equals(value), $"The control's date should be '{value}' but was '{control.GetDate()}'.", timeout, sleepInterval);
     ValidatedDateIsEvent?.Invoke(control, new ElementActionEventArgs <AndroidElement>(control, value));
 }
 public static void ValidateIsSelected <T>(this T control, int?timeout = null, int?sleepInterval = null)
     where T : IComponentSelected, IComponent <IOSElement>
 {
     ValidateControlWaitService.WaitUntil <IOSDriver <IOSElement>, IOSElement>(() => control.IsSelected.Equals(true), "The control should be selected but was NOT.", timeout, sleepInterval);
     ValidatedIsSelectedEvent?.Invoke(control, new ComponentActionEventArgs <IOSElement>(control));
 }
 public static void ValidateIsNotDisabled <T>(this T control, int?timeout = null, int?sleepInterval = null)
     where T : IComponentDisabled, IComponent <AndroidElement>
 {
     ValidateControlWaitService.WaitUntil <AndroidDriver <AndroidElement>, AndroidElement>(() => !control.IsDisabled.Equals(true), "The control should NOT be disabled but it was.", timeout, sleepInterval);
     ValidatedIsNotDisabledEvent?.Invoke(control, new ComponentActionEventArgs <AndroidElement>(control));
 }
示例#7
0
 public static void ValidateIsNotVisible <T>(this T control, int?timeout = null, int?sleepInterval = null)
     where T : IElementVisible, IElement <IOSElement>
 {
     ValidateControlWaitService.WaitUntil <IOSDriver <IOSElement>, IOSElement>(() => !control.IsVisible.Equals(true), "The control should be NOT visible but was NOT.", timeout, sleepInterval);
     ValidatedIsNotVisibleEvent?.Invoke(control, new ElementActionEventArgs <IOSElement>(control));
 }
示例#8
0
 public static void ValidateNumberIs <T>(this T control, int value, int?timeout = null, int?sleepInterval = null)
     where T : IComponentNumber, IComponent <AndroidElement>
 {
     ValidateControlWaitService.WaitUntil <AndroidDriver <AndroidElement>, AndroidElement>(() => control.GetNumber().Equals(value), $"The control's number should be '{value}' but was '{control.GetNumber()}'.", timeout, sleepInterval);
     ValidatedNumberIsEvent?.Invoke(control, new ComponentActionEventArgs <AndroidElement>(control, value.ToString()));
 }
示例#9
0
 public static void ValidateIsOff <T>(this T control, int?timeout = null, int?sleepInterval = null)
     where T : IComponentOn, IComponent <IOSElement>
 {
     ValidateControlWaitService.WaitUntil <IOSDriver <IOSElement>, IOSElement>(() => control.IsOn.Equals(false), "The control should be OFF but it was ON.", timeout, sleepInterval);
     ValidatedIsOffEvent?.Invoke(control, new ComponentActionEventArgs <IOSElement>(control));
 }
示例#10
0
 public static void ValidateIsVisible <T>(this T control, int?timeout = null, int?sleepInterval = null)
     where T : IComponentVisible, IComponent <AndroidElement>
 {
     ValidateControlWaitService.WaitUntil <AndroidDriver <AndroidElement>, AndroidElement>(() => control.IsVisible.Equals(true), "The control should be visible but was NOT.", timeout, sleepInterval);
     ValidatedIsVisibleEvent?.Invoke(control, new ComponentActionEventArgs <AndroidElement>(control));
 }
示例#11
0
 public static void ValidateIsOn <T>(this T control, int?timeout = null, int?sleepInterval = null)
     where T : IElementOn, IElement <AndroidElement>
 {
     ValidateControlWaitService.WaitUntil <AndroidDriver <AndroidElement>, AndroidElement>(() => control.IsOn.Equals(true), "The control should be ON but was OFF.", timeout, sleepInterval);
     ValidatedIsOnEvent?.Invoke(control, new ElementActionEventArgs <AndroidElement>(control));
 }