예제 #1
0
        public static void Login(string user)
        {
            string userRoleURL = null;

            switch (user)
            {
            case "Advanced":
                userRoleURL = SignInThroughUrl.UsersUrl(LoginUsers.Advanced);
                break;

            case "Basic":
                userRoleURL = SignInThroughUrl.UsersUrl(LoginUsers.Basic);
                break;

            case "InternalAdmin":
                userRoleURL = SignInThroughUrl.UsersUrl(LoginUsers.InternalAdmin);
                break;

            case "Standard":
                userRoleURL = SignInThroughUrl.UsersUrl(LoginUsers.Standard);
                break;

            default:
                throw new ECO3TestException(message: "invalid user");
            }
            Logger.Info("Navigating to internal site");
            NavigationHelper.NavigateToUrl(userRoleURL);
        }
예제 #2
0
        public static void NavigateToInternalUrlAndLogin()
        {
            BrowserHelper.RunBrowser();
            Logger.Info("Navigating to internal site");
            string userLoginLink = SignInThroughUrl.UsersUrl(LoginUsers.Advanced);

            NavigationHelper.NavigateToUrl(userLoginLink);
            Logger.Info("Waiting for page to load properly");
            GenericHelper.WaitForPageToLoad();
        }
예제 #3
0
 public void InternalUserAction()
 {
     NavigationHelper.NavigateToUrl(SignInThroughUrl.UsersUrl(LoginUsers.Standard));
     Logger.Info("Navigating to internal site");
     NavigationHelper.NavigateToUrl(URL);
     Logger.Info("Waiting for page to load properly");
     GenericHelper.WaitForPageToLoad();
     Logger.Info("Initiating Logging page instance");
     loginPage = new LoginPage(driver);
     Logger.Info("Retrieving logging page title");
     pageTitle = loginPage.GetPageTitle();
     Logger.Info("Ensuring on right logging page");
     Assert.AreEqual("ECO Internal", pageTitle);
 }