Specflow -Part5(Specflow Sharing Data Between Steps)
While automating applications you may come across scenarios where you may need to share data between steps, we will talk about how one can do so in this lecture Let's say you are automating google search functionality and scenario is user types search string on the google search page and hits search and this takes him to the google result page where he asserts if the results match the search string. You can have a single step definition file for all these steps or you can have a separate one for each page. Ideally, you should have a separate step definition file for each page. We can share the data between steps using below ways Instance variables (Steps are in same file) Context Instance variables We will create a feature file for the above example and then we can talk over it Feature : SpecFlowFeature4 To demo how one can share data between steps Scenario : Verify user can share data bet...