mardi 27 février 2018

Any way to pass data object from Java Cucumber TestRunner to step definition class other than using singleton?

I'm looking for an idea for how I can pass a data object (e.g. WebDriver) from the Java test runner class to a step definition class. Any suggestions?

I've seen one example where a static singleton class was employed, but I'd prefer something else.

My goal is to create the Web driver service in the test runner class, and somehow pass that to the step definition class.

Any ideas?




Aucun commentaire:

Enregistrer un commentaire