public void Registration(bool isPhone) { Driver.Browser.Url = TestDataResource.MainPageURL; HeaderButtons header = new HeaderButtons(); header.RegistrationButton.Click(); if (isPhone) { PhoneTabReg.Click(); InputRandomPhoneUa(); PasswordRegTextBox.SendKeys(TestDataResource.Password); RegistrationAgreeCheckBox.Click(); RegistrationSubmitButton.Click(); } else { InputRandomEmail(); PasswordRegTextBox.SendKeys(TestDataResource.Password); RegistrationAgreeCheckBox.Click(); RegistrationSubmitButton.Click(); } try { //WelcomePage welcome = new WelcomePage(); //welcome.CancelButton.Click(); ProfilePage profile = new ProfilePage(); // profile.EnterNewPassOkButton.Click(); } catch { } }
public void Auth(string login, bool isPhone) { Driver.Browser.Url = TestDataResource.MainPageURL; HeaderButtons header = new HeaderButtons(); header.LoginButton.Click(); if (isPhone) { PhoneTabLogin.Click(); LoginPhoneTextBox.Click(); LoginPhoneTextBox.SendKeys(login); PasswordLoginTextBox.Click(); PasswordLoginTextBox.SendKeys(TestDataResource.Password); LoginSubmitButton.Click(); } else { LoginEmailTextBox.Click(); LoginEmailTextBox.SendKeys(login); PasswordLoginTextBox.SendKeys(TestDataResource.Password); LoginSubmitButton.Click(); } WelcomePage welcome = new WelcomePage(); try { if (welcome.WelcomeText.Text.Contains("Ваш подарок")) { welcome.CancelButton.Click(); } } catch { } }
public void Registration_ByPhone_Positive() { Random rnd = new Random(); VuePopup vue = new VuePopup(); HeaderButtons hdr = new HeaderButtons(); vue.Registration(true); StringAssert.AreEqualIgnoringCase("Профиль", hdr.ProfileLink.Text); }
public void Authorization_RestorePassEmail_Positive() { VuePopup vue = new VuePopup(); HeaderButtons header = new HeaderButtons(); header.LoginButton.Click(); vue.LoginEmailTextBox.Clear(); vue.LoginEmailTextBox.SendKeys(TestDataResource.TestRestoreUserEmail); vue.RestorePassButton.Click(); ///TODO добавить проверку почты }
public void Authorization_RestorePass_Negative() { HeaderButtons header = new HeaderButtons(); VuePopup vue = new VuePopup(); header.LoginButton.Click(); vue.PhoneTabLogin.Click(); vue.RestorePassButton.Click(); vue.LoginSubmitButton.Click(); StringAssert.AreEqualIgnoringCase("Поле Телефон обязательно для заполнения.", vue.LoginEmailErrorText.Text); }
public void Authorization_FacebookLogin_Positive() { HeaderButtons header = new HeaderButtons(); VuePopup vue = new VuePopup(); header.LoginButton.Click(); vue.FacebookLoginButton.Click(); SocialNetworkPages facebook = new SocialNetworkPages(); facebook.FaceBookLoginTextBox.SendKeys(TestDataResource.FacebookLogin); facebook.FaceBookPassTextBox.SendKeys(TestDataResource.FacebookPass); facebook.FaceBookLoginButton.Click(); ProfilePage profile = new ProfilePage(); StringAssert.Contains("ПРОФИЛЬ", profile.ProfileHeaderText.Text); }
public void Authorization_Twitter_Positive() { VuePopup vue = new VuePopup(); HeaderButtons header = new HeaderButtons(); header.LoginButton.Click(); vue.TwitterLoginButton.Click(); SocialNetworkPages twitter = new SocialNetworkPages(); twitter.TwitterLoginTextBox.SendKeys(TestDataResource.TwitterLogin); twitter.TwitterPassTextBox.SendKeys(TestDataResource.TwitterPass); twitter.TwitterLoginButton.Click(); ProfilePage profile = new ProfilePage(); StringAssert.Contains("ПРОФИЛЬ", profile.ProfileHeaderText.Text); }