Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

public static class Host - is there a way to parametrizes this class to pass different site urls? #258

Open
sirj77 opened this issue Mar 23, 2017 · 0 comments

Comments

@sirj77
Copy link

sirj77 commented Mar 23, 2017

Hi guys,

I haven't found any solution to parametrizes this class to use different site urls? Example:

public static class Host
    {
        public static readonly SelenoHost Instance = new SelenoHost();

        static Host()
        {
            Instance.Run(configure => configure
                .WithWebServer(new InternetWebServer("http://www.test.com/")));

            Instance.Application.Browser.Manage().Window.Maximize();
        }
    }

and I use this in my tests like:

_generalPage = Host.Instance.NavigateToInitialPage<GeneralPage>("/products/mobile");

I'd like to have only one Host class, but have an access to the pages for a different locales, for example:
http://www.test.ca/
http://www.test.com.de/
http://www.test.dk/
http://www.it.test.com/
and so on...

So, how I can change the Host class to go to the page: http://www.test.com.de/products/mobile ?
I don't like the idea of creating a separate class for a separate locale (for example: public static class HostDe and call it like: _generalPage = HostDe.Instance.NavigateToInitialPage("/products/mobile");)

Thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant