/// <summary> /// Gets the property of type <see cref="Button" /> with attribute <see cref="FilteringButtonActionAttribute" /> /// </summary> /// <param name="value">The page object.</param> /// <param name="filteringButtonFlag">The FilteringButtonFlag.</param> /// <returns>The found button element.</returns> public Button GetFilteringButton(object value, FilteringButtonFlag filteringButtonFlag) { return (value.GetPropertyValuesWithFilteredAttribute <Button, FilteringButtonActionAttribute>( x => x.FilteringButtonFlag.Equals(filteringButtonFlag)).First()); }
/// <summary> /// Initializes a new instance of the <see cref="FilteringButtonActionAttribute" /> class. /// </summary> /// <param name="filteringButtonFlag">The filtering button flag.</param> public FilteringButtonActionAttribute(FilteringButtonFlag filteringButtonFlag) { FilteringButtonFlag = filteringButtonFlag; }
/// <summary> /// Clicks the button on Invoice list for filtering invoices by age. /// </summary> /// <typeparam name="TPageObject">The type of the T page object.</typeparam> /// <param name="pageObject">The page object.</param> /// <param name="filteringButtonFlag">The button flag.</param> public void ClickFilteringButton <TPageObject>(TPageObject pageObject, FilteringButtonFlag filteringButtonFlag) where TPageObject : class { GetFilteringButton(pageObject, filteringButtonFlag).ClickAndWaitAjax(); }