Consider I am having three scenarios in my feature file. I want an authorization token that I get from an API response in the first scenario to be used in the other scenarios.
I declare the variable in "Background:" section. How to use the variable across scenarios?
Any variable declared in the Background:
will be available for use in all Scenario:
s in the same feature.
Refer to this answer for more: https://stackoverflow.com/a/46080568/143475