I'm very new to using C#/Specflow
to write tests. I have a test, that ends like this:
Then the Details page should display the rating zip code
And the Details page should display the ID
And the Details page should display the Eligible Employee count
And the code behind looks like this:
[Then(@"the Details page should display the rating zip code")]
public void ThenTheDetailsPageShouldDisplayTheRatingZipCode()
{
string actualvalue = Driver.Instance.FindElement(By.CssSelector("div.GroupInfoRow:nth-child(3) > label:nth-child(2)")).Text;
Assert.IsTrue(actualvalue.Equals(actualvalue));
}
[Then(@"the Details page should display the ID")]
public void ThenTheDetailsPageShouldDisplayTheID()
{
string actualvalue = Driver.Instance.FindElement(By.CssSelector("div.GroupInfoRow:nth-child(1) > label:nth-child(2)")).Text;
Assert.IsTrue(actualvalue.Equals(actualvalue));
}
[Then(@"the Details page should display the Eligible Employee count")]
public void ThenTheDetailsPageShouldDisplayTheEligibleEmployeeCount()
{
string actualvalue = Driver.Instance.FindElement(By.CssSelector("div.GroupInfoRow:nth-child(4) > label:nth-child(2)")).Text;
Assert.IsTrue(actualvalue.Equals(actualvalue));
}
I would rather it be displayed in a table format, but I'm not sure how to do it.