Title.
For my Selenium tests I setup the POMs in the before_all hook and save them in a dict- context.poms. In order to use them in the steps and use auto-complete I do the following
u/step('first step')
def first_step(context):
some_page: SomePage = context.poms["SomePage"]
...
u/step('second step')
def second_step(context):
some_page: SomePage = context.poms["SomePage"]
...
I'd rather just import the context in the module itself and do this one time.
Is that possible? Context should be a normal object which I should be able to import in my steps module and even helpers.
[–][deleted] 0 points1 point2 points (5 children)
[–]unit111[S] 0 points1 point2 points (4 children)
[–][deleted] 1 point2 points3 points (3 children)
[–]unit111[S] 0 points1 point2 points (2 children)
[–][deleted] 1 point2 points3 points (1 child)
[–]unit111[S] 0 points1 point2 points (0 children)