Open attilagyoriid opened 1 day ago
hey @attilagyoriid per my best knowledge, the I actor is not designed to be injected in custom helper. https://codecept.io/helpers/#extending-codeceptjs-with-custom-helpers
perhaps @DavertMik could explain it better than myself.
Dear @kobenguyent thanks for the pretty fast reply
So If I understand correctly, custom helper classes are designed to implement those activities can not be achieved using I actor?
Other question being important: In case of Page Object Model, can it be achieved to inject the same actor I instance being used during step context?
Thanks for your answer
Best Regards
Attila
As far as my experience, with PO, the I object is possible, please check a sample report here https://github.com/kobenguyent/amazon-ui-tests/blob/master/pages/ResultPage.js
Or official guidelines https://codecept.io/pageobjects/#stepobjects
Hope that helps
What are you trying to achieve?
to inject the same "I" instance as being used in step runtime context in custom helper
What do you get instead?
undefined or different "I" instance
Details
The question: Is there a way to get a hold of the same "I" instance being used during step exec and inject it into custom helper classes?
Thanks for your help and answer
Best Regards
Attila