0
votes

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.

1
It's expected that you make an honest effort at trying to figure this out and then show what you've attempted here for input on that. - Adam Winter
hey @AdamWinter did you try to find code for Opentest? - Fabricio Vargas

1 Answers

0
votes

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.