2

Specflow:

Then i verify the available fruits
   | fruits |
   | Apple  |
   | Orange |

Xpath://div[@class='fru_cl']/span - this will return the collection of elements

inside my step definition:

converted table values into String List.

How can i get the values during runtime and have to compare and say which is not available! (Preferable Assertion to fail it)

2
  • 1
    Your post if very unclear in my opinion, do you want to get list of fruits that appears on the website, and compare it with your expected list? Commented Nov 26, 2018 at 14:00
  • Can you post the code you have so far in your step definition? Commented Dec 7, 2018 at 15:51

1 Answer 1

1

You can get your input from specflow as a table:

public void MyTestMethod(Table table)
{
   IEnumerable<string> fruits = table.CreateSet<string>();

   //Assert Something
}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.