public void LoginIntoN11(string username, string password) { SignInButton.Click(); EmailTextBox.SendKeys(username); PasswordBox.SendKeys(password); LoginButton.Click(); }
public IWebElement Login(string name, string password) { WaitForElement(By.Id("UserName")); UserBox.Clear(); UserBox.SendKeys(name); WaitForElement(By.Id("Password")); PasswordBox.Clear(); PasswordBox.SendKeys(password); WaitForElement(By.Id("Login")); LoginButton.Click(); WaitForElement(By.Id("Home")); return(HomeElement); }
public IWebElement Register(string name, string password) { WaitForElement(By.Id("UserName")); UserBox.Clear(); UserBox.SendKeys(name); WaitForElement(By.Id("Password")); PasswordBox.Clear(); PasswordBox.SendKeys(password); WaitForElement(By.Id("PasswordRepeat")); PasswordRepeatBox.Clear(); PasswordRepeatBox.SendKeys(password); WaitForElement(By.Id("Register")); RegisterButton.Click(); //wait for result page - Send the User back to the login page WaitForElement(By.Id("Login")); return(LoginElement); }
public void EnterUserDetails(IWebDriver driver, string preferredTitle, string firstName, string lastName, string mobileNumber, string password, string confirmPassword) { // Select Title from dropdown list var title = driver.FindElement(By.Id("title")); var selectElement = new SelectElement(title); selectElement.SelectByValue(preferredTitle); // Enter First Name FirstNameBox.SendKeys(firstName); // Select Last Name LastNameBox.SendKeys(lastName); // Enter mobile number MobileNumberBox.SendKeys(mobileNumber); // Enter password PasswordBox.SendKeys(password); // Confirm password ConfirmPasswordBox.SendKeys(confirmPassword); }