I am using Specflow 3 with Selenium for Page Object Model pattern. Below is the code:
FeatureFile
When I want to edit the profile
| Hats | Shoes |
| 98 | 99 |
Page class-
public IWebElement TxtHat => _driver.FindElement(By.Id("Hat"));
public IWebElement TxtShoe => _driver.FindElement(By.Id("Shoe"));
public void FillDetails (string hat, string shoe)
{
TxtHat.SendKeys(hat);
TxtShoe.SendKeys(shoe);
}
StepDefinition -
[When(@"I want to edit the profile")]
public void WhenIWantToEditTheProfile(Table table)
{
profile.ClearDetails();
dynamic var = table.CreateDynamicInstance();
profile.FillDetails(var.Hats, var.Shoes);
}
Error
Message: Microsoft.CSharp.RuntimeBinder.RuntimeBinderException : The best overloaded method match for 'RefreshESS.Pages.UpdateProfilePage.FillDetails(string, string)' has some invalid arguments
Thank you for help in advance!