SpecFlow StepArgumentTransformation -


i have gherkin steps defined like:

when select '<currentuser>' 

in stepdefinitions, capture parameter , replace 1 session. use

stepargumenttransformation 

here

what regex expression can use capture between < , >

thanks

if understand requirement correctly don't think can want. reason there no transformation 1 type another, string in string out, won't able step argument transformation. think have couple of options. 1 use lookup the value session in each step. other create class can used in transform. this:

public class sessionvariable {     ...stuff }   [stepargumenttransformation] public sessionvaraible transformtosessionvariable(string input) {     ..create session variable input } 

then make step methods accept variable of type sessionvaraible

[when("i select '(.*)'")] public void wheniselect(sessionvaraible sessionvariable) {     ...whatever } 

Comments

Popular posts from this blog

php - Using grpc in Laravel, "Class 'Grpc\ChannelCredentials' not found." -

django - (fields.E300) Field defines a relation with model 'AbstractEmailUser' which is either not installed, or is abstract -

scikit learn - python sklearn KDTree with haversine distance -