I'm using Xunit to run some Selenium tests. I want to parametrize some tests but having some difficulties.
I have a class that has the locaters for elements stored as properties "IssuesLogUtils"
public class IssuesLogUtils
{
// Page Heading
public By page_heading { get; set; } = By.Id("ctl00_lblPageTitle");
public By issue_title { get; set; } = By.Id("ctl00_ContentPlaceHolder1_txtNonComplianceName");
I then have my Xunit tests in another TestClass file. I want to just use the properties from IssuesLogUtils as params in my tests.
e.g.
[Theory]
[InlineData(issues_log_utils.ifco_radial)]
[InlineData(issues_log_utils.issue_title)]
I have found some articles online that point at really convoluted ways of doing this. Is there any straight forward way? I don't want to have to create a list of params which then the list gets passed in.