Closed chbndrhnns closed 5 years ago
@chbndrhnns , can you elaborate on the purpose of @browser_helper
?
My issue was not understanding Ruby enough. I just wanted to have access to modules I included in my env.rb via the world command (like World(My helper))) fromage objects. I found it is possible via MyWorld.method(), for example.
I am new to page-object, cucumber, and watir so I might be missing something that is not related to page-object. Here is my qustion:
How do I make the
BrowserHelper
class instance available for myBasePage
class during runtime?I have these page objects:
Part of my
env.rb
:In my
env.rb
, I have assign the driver instance to@browser
and my helper class instance to@browser_helper
. I would like this@browser_helper
to be available in my page objects. Can I achieve this somehow? Or should I optimize my design?