/// <summary> /// The sign up. /// </summary> /// <param name="newUserName"> /// The new user name. /// </param> /// <param name="password"> /// The password. /// </param> /// <returns> /// The <see cref="bool"/>. /// </returns> public bool SignUp(string newUserName, string password) { WebAdapter.ButtonClickById("nav_login"); WebAdapter.TextboxSetTextById("input_newuser", newUserName); WebAdapter.TextboxSetTextById("input_newPW", password); WebAdapter.TextboxSetTextById("input_email", newUserName + "@mitsite.org"); WebAdapter.CheckBoxSetValueById("check_cond", true); WebAdapter.ButtonClickById("OpretProfilKnap"); // when debugging, we probably want to get to the signed up user StfLogger.LogKeyValue("SignUpUserName", newUserName, "SignUpUserName"); StfLogger.LogKeyValue("SignUpPassword", password, "SignUpPassword"); // Check If still on LOGIN page <h1>Login</h1> - if so then the signup failed var loginHeader = WebAdapter.FindElement(By.XPath("//h1[text='Login']"), 2); var retVal = loginHeader == null || CheckSignUpValidationMessages(); ChooseEnglish(); return(retVal); }