Skip to content

Instantly share code, notes, and snippets.

@YevgeniyShunevych
Created July 2, 2019 12:18
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/a1bbfd9cf42b39abb6cae9158b2fdc61 to your computer and use it in GitHub Desktop.
Save YevgeniyShunevych/a1bbfd9cf42b39abb6cae9158b2fdc61 to your computer and use it in GitHub Desktop.
How to get Atata control by attribute using variable
using Atata;
namespace SomeApp.UITests
{
using _ = SamplePage;
public class SamplePage : Page<_>
{
public Control<_> GetSomeControl(string attributeValue)
{
return Controls.Create<Control<_>>(attributeValue, new FindByAttributeAttribute("data-value", attributeValue));
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment