I have a method annotated with @Before and what I do in that method is manipulate the web driver. Some of our feature scenarios interact with a browser and some do not and only via REST APIs. I do not want the browser to open for scenarios that do not require it so I thought if I could get access to the tags of a scenario and I define a reusable scenario called NO_BROWSER then for those scenarios I will not open a browser.
I have a method annotated with @Before and what I do in that method is manipulate the web driver. Some of our feature scenarios interact with a browser and some do not and only via REST APIs. I do not want the browser to open for scenarios that do not require it so I thought if I could get access to the tags of a scenario and I define a reusable scenario called NO_BROWSER then for those scenarios I will not open a browser.
I looked at https://github.com/serenity-bdd/serenity-cucumber/issues/199 but the base listener is not set during a Before method.
Any ideas?