I want to use variable “iso3166TwoLetterCode”‘s value from this class, Geolocation error with IP address 127.0.0.1
In my new test class, how do I use it? Can I even use it? If yes, how? I need this variable to use it in the if statement to check country code and based on the country code, the master page is to be changed.
I would recommend you extracting this functionality into some utility class that you could reuse from both PageA and PageB:
And then in your page:
Now you could reuse the
Countryclass from another page. Depending on your requirements you could even further customize it by passing additional parameters to the function and the return type.