EDIT
Classes have been added which expose:
ScenarioStepContext.StepInfo.Text
and ScenarioStepContext.StepInfo.StepDefinitionType
Which should give you what you want.
Original answer
This is not currently possible, although I have just (yesterday) submitted a pull request which adds this functionality. If you are happy with building specflow yourself then you can clone my fork of the specflow repo and switch to the ScenarioStepContext
branch, then open the TechTalk.Specflow_VS2013.sln
and build the project yourself.
First you need to give specflow a new version number for the nuget package. Open the SpecFlow.nuspec
file and edit the version to be something higher than the current version (I used 1.9.3.4), then build the solution (you need to installed the VS2013 SDK, and other VS SDKs if you want to build those versions).
Once the solution is built, you will need to install the vsix from
\SpecFlow\IdeIntegration\Vs2013Integration\bin\Debug\TechTalk.SpecFlow.Vs2013Integration.vsix
and then add the nuget package from
\SpecFlow\Installer\NuGetPackages\bin\SpecFlow.1.9.3.4.nupkg
.
Once you have done this you will be able to access ScenarioStepContext.StepInfo.Text
and ScenarioStepContext.StepInfo.StepDefinitionType
to be able to tag the elements you want with the current step details.
We are currently using this, but please raise any issues on the PR at the main Specflow github page and I'll fix them if I can.