void ReleaseDesignerOutlets() { if (AddFullButton != null) { AddFullButton.Dispose(); AddFullButton = null; } if (AddModalButton != null) { AddModalButton.Dispose(); AddModalButton = null; } if (AddSlideupButton != null) { AddSlideupButton.Dispose(); AddSlideupButton = null; } if (ChangeUserButton != null) { ChangeUserButton.Dispose(); ChangeUserButton = null; } if (ChangeUserLabel != null) { ChangeUserLabel.Dispose(); ChangeUserLabel = null; } if (EventsAndPurchasesButton != null) { EventsAndPurchasesButton.Dispose(); EventsAndPurchasesButton = null; } if (NewsFeedButton != null) { NewsFeedButton.Dispose(); NewsFeedButton = null; } if (SubmitFeedbackButton1 != null) { SubmitFeedbackButton1.Dispose(); SubmitFeedbackButton1 = null; } if (UserPropertyButton != null) { UserPropertyButton.Dispose(); UserPropertyButton = null; } }
public MainEmailBoxPage LogInToEmailBox(string email, string password) { try { HomePage homePage = new HomePage(); IWebDriver driver = Browser.GetDriver(); driver.Manage(); LogInForm logInForm = new LogInForm(); WaitTillElementIsVisible(_logInForm); if (RussianLanguageIsSelected.Displayed) { RussianLanguageIsSelected.Click(); WaitTillElementIsVisible(_contentBy); EnglishLanguage.Click(); WaitTillElementIsVisible(_logInForm); } if (driver.IsElementDisplayed(_changeUserButton)) { ChangeUserButton.Click(); } if (driver.IsElementDisplayed(_useAnotherAccountBy)) { logInForm.UseAnotherAccountButton.Click(); } //Enter credentials logInForm.WaitTillElementIsVisible(_loginInputBy); logInForm.LogInInput.SendKeys(email); logInForm.NextEmailButton.Click(); logInForm.WaitTillElementIsVisible(_passwordInputBy); logInForm.PasswordInput.SendKeys(password); logInForm.PasswordInput.HighlightElement(_passwordInputBy); logInForm.NextPasswordButton.Click(); //Wait till main mail box page is loaded MainEmailBoxPage mainEmailBoxPage = new MainEmailBoxPage(); mainEmailBoxPage.WaitTillElementIsVisible(_composeButtonBy); Logger.Configure(); Log.Information($"I login with the following credentials: '{email}' / '{password}'"); } catch (Exception ex) { Logger.Configure(); Log.Error(ex, "Log in to the email box was failed"); } return(new MainEmailBoxPage()); }
void ReleaseDesignerOutlets() { if (ChangeUserButton != null) { ChangeUserButton.Dispose(); ChangeUserButton = null; } if (LoginField != null) { LoginField.Dispose(); LoginField = null; } if (NotificationsFromHoursField != null) { NotificationsFromHoursField.Dispose(); NotificationsFromHoursField = null; } if (NotificationsFromMinutesField != null) { NotificationsFromMinutesField.Dispose(); NotificationsFromMinutesField = null; } if (NotificationsToHoursField != null) { NotificationsToHoursField.Dispose(); NotificationsToHoursField = null; } if (NotificationsToMinutesField != null) { NotificationsToMinutesField.Dispose(); NotificationsToMinutesField = null; } if (PasswordField != null) { PasswordField.Dispose(); PasswordField = null; } if (SendNodesOfflineNotificationsSwitch != null) { SendNodesOfflineNotificationsSwitch.Dispose(); SendNodesOfflineNotificationsSwitch = null; } if (ServerButton != null) { ServerButton.Dispose(); ServerButton = null; } if (UserNameLabel != null) { UserNameLabel.Dispose(); UserNameLabel = null; } }