You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
The same "I" instance being used in step runtime context cant be injected in custom helper #4520
Activity
kobenguyent commentedon Oct 21, 2024
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.
attilagyoriid commentedon Oct 22, 2024
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
kobenguyent commentedon Oct 22, 2024
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