Reputation: 1
OpenTest (Selenium code)
How Can I include a GEO location in order to get a different test according with the country?
The page has three option in a country filed, that the test most read option1 if the Country is 1 and option 2 when the country is 2 then just read "Locator" if the user is not in option 1 or 2.
Upvotes: 0
Views: 32
Reputation: 12327
I'm not sure I completely understand your scenario, but it sounds like you could use the execution environments feature of OpenTest (more information here). Just create two different environments for the two countries and store the country code in an environment-specific data file, something like this:
test-repo/data-env/us/config.yaml
countryCode: US
Then, you can use the expression $data("config").countryCode
to read the country code and perform conditional logic based on that in your tests.
Upvotes: 0