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]); }
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"))); }
public void LogOutAndCreateNewDriver(sequenceUsers user) { Logout(); CreateDriver(); driver.Url = GetLoginUrl(user); }