I'm able to run testng scripts upon integrating with cucumber. I've followed the exact steps defined in http://automatictester.co.uk/2015/06/11/basic-cucumberjvm-selenium-webdriver-test-automation-framework/ link.
Now I’ve one more requirement. can you explain me how to read values from parameters tag of testng.xml. See below example:
<test name="ascentis.LoginDemo.Firefox">
<parameter name="BrowserName" value="Firefox" />
<parameter name="Environment" value="local" />
<packages>
<package name="runnerFiles.*"/>
</packages>
</test>
I’ve to read BrowserName and Environment values from parameters tag. I’ve tried to use @parameters for @Before method of cucumber but it didn’t work out and gave exception that @Before hook only accepts one parameter that too of type scenario. can you explain me how to read values from parameters tag to access in stepDefinations of cucumber.