i have some cucumber scenarios, and i need to create generic methods for each business area. I have some page objects, so question is how can i pass page object as parameter to Step Definition file?Is there any way instead of reflection?
Yes with the help of dependency injection like cucumber picocontainer, you can easily use the page objects in your step definition file.
Please find the reference link below. As it is a tutorial, I can't share everything over here in the single comment.