Skip to content

Commit

Permalink
#307 Add ImageInput<TOwner> control
Browse files Browse the repository at this point in the history
  • Loading branch information
YevgeniyShunevych committed Sep 16, 2019
1 parent f4ed7c0 commit f33fc68
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/Atata/Components/ImageInput`1.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
namespace Atata
{
/// <summary>
/// Represents the image input control (<c>&lt;input type="image"&gt;</c>).
/// Default search is performed by <c>alt</c> attribute using <see cref="FindByAltAttribute"/>.
/// </summary>
/// <typeparam name="TOwner">The type of the owner page object.</typeparam>
[ControlDefinition("input[@type='image']", ComponentTypeName = "image input")]
[ControlFinding(FindTermBy.Alt)]
public class ImageInput<TOwner> : Control<TOwner>
where TOwner : PageObject<TOwner>
{
/// <summary>
/// Gets the <see cref="DataProvider{TData, TOwner}"/> instance for the <c>src</c> attribute.
/// </summary>
public DataProvider<string, TOwner> Source => Attributes.Src;

/// <summary>
/// Gets the <see cref="DataProvider{TData, TOwner}"/> instance for the <c>alt</c> attribute.
/// </summary>
public DataProvider<string, TOwner> Alt => Attributes.Alt;
}
}

0 comments on commit f33fc68

Please sign in to comment.