Skip to content

Instantly share code, notes, and snippets.

@YevgeniyShunevych
Created March 24, 2020 13:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save YevgeniyShunevych/5a18671337d0b4c653b33482fed439f4 to your computer and use it in GitHub Desktop.
Save YevgeniyShunevych/5a18671337d0b4c653b33482fed439f4 to your computer and use it in GitHub Desktop.
Atata component for Angular Material radio button
namespace Atata.Angular.Material
{
[ControlDefinition("input[@type='radio']", ContainingClass = "mat-radio-input", ComponentTypeName = "radio button", Visibility = Visibility.Any, IgnoreNameEndings = "RadioButton,Radio,Button,Option")]
[TermFindSettings(TargetAttributeType = typeof(FindByLabelAttribute), Format = "\u00A0{0}")]
public class MatRadioButton<TOwner> : RadioButton<TOwner>
where TOwner : PageObject<TOwner>
{
[FindFirst(OuterXPath = "ancestor::")]
[TraceLog]
public Label<TOwner> WrapperLabel { get; private set; }
protected override void OnClick()
{
WrapperLabel.Click();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment