示例#1
0
        public string GetLoginUrl(sequenceUsers user)
        {
            Dictionary <sequenceUsers, string> userLoginDetails;

            userLoginDetails = new Dictionary <sequenceUsers, string>();

            userLoginDetails.Add(sequenceUsers.wsd, "http://*****:*****@wsddev2.swwater.co.uk/");
            userLoginDetails.Add(sequenceUsers.developerServices, "http://*****:*****@wsddev2.swwater.co.uk/");
            userLoginDetails.Add(sequenceUsers.metering, "http://*****:*****@wsddev2.swwater.co.uk/");
            userLoginDetails.Add(sequenceUsers.retailer, externalUrl);

            return(userLoginDetails[user]);
        }
示例#2
0
        public void LoginUser(sequenceUsers user)
        {
            var url = GetLoginUrl(user);

            Driver.Url = url;
            if (url == externalUrl)
            {
                _privateNetwork.Click();
                _username.SendKeys("squsrrt11");
                _password.SendKeys("Qwerty04");
                _tsandcs.Click();
                System.Threading.Thread.Sleep(100);
                driver.FindElementById("SubmitCreds").Click();
            }

            Wait = new WebDriverWait(Driver, TimeSpan.FromSeconds(40));
            Wait.Until(ExpectedConditions.ElementToBeClickable(By.Id("processes_a")));
        }
示例#3
0
 public void LogOutAndCreateNewDriver(sequenceUsers user)
 {
     Logout();
     CreateDriver();
     driver.Url = GetLoginUrl(user);
 }