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 }}
This repository has been archived by the owner on Apr 20, 2021. It is now read-only.
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?
The text was updated successfully, but these errors were encountered:
Instead of overwriting iWaitUntilSee you can create a new function likes I wait until I see the site title (who uses iWaitUntilSee internaly) and take from configuration the site title.
The problem is that I already feel I have too much almost the same functions or steps. And for the non-programmer-testers who write gherkin scenarios too sometimes it's getting even more difficult...
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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?
The text was updated successfully, but these errors were encountered: