Skip to content
This repository was archived by the owner on Apr 20, 2021. It is now read-only.
This repository was archived by the owner on Apr 20, 2021. It is now read-only.

Way to easy adjust lots of wait for 'element' #250

@Trogie

Description

@Trogie

Hello,

I am using the behatch browser context a lot. Thanks for the great work!

But because I got lots of different production/staging/dev websites with different languages and/or texts for elements.

So when I want to use the same scenarios for different sites it's sometimes pretty hard to maintain.

For example on site A I wait for a "text a", on site B the text is "text b"

I usually have my application contexts in the behat configuration default suites defined. The different sites on profile level in behat.yml

so quick write:
suites: default: projectA: paths: - ... contexts: - behatch:context:browser projectB: ... siteA: base_url: siteA.com ... siteB: base_url: siteB.org
When I start behat I precify the suite and profile to be able to run my scenarios/suites against diffent sites/profiles.

But then I need to find a good way to 'translate' the texts of forexample iWaitUntilISee():
SiteA: Then I wait until I see "text A"
SiteB: Then I wait until I see "text B"

I am not the big OO programmer so If I am wrong correct me please: I thought on extending the browsercontext and overwriting iWaitUntilISee function so it checks for a certain parameter/text value in the profile section, uses that to wait for, or else use it's parent function?
Would that be the right way?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions