How can I create a dynamic element? I have a dropdown that has many different years in it so I want to be able to find 2022, 2021, 2020, etc. with one element.
I want to do something like this:
[MobileFindsByAll(Android = true)]
[FindsByAndroidUIAutomator(XPath = “//android.widget.TextView[@text=‘2021’]”)]
public IWebElement YearDropdownElement;
but instead of 2021 every time, I want to be able to pass in different years. How do I do that? I tried passing it in via the constructor, but no luck with that.