/// <summary> /// Attempts to log out /// </summary> /// <returns>false if failed to logout, not if already logged out</returns> public bool LogOut() { Console.WriteLine("Logging out if can"); try { if (IsLoggedIn()) { return(true); } WebDriverWait wait = TestingConfig.GetWaitDriver(Driver); UserDropDown.Click(); wait.Until(dr => SignOutButton); SignOutButton.Click(); wait.Until(dr => HomeButton); HomeButton.Click(); wait.Until(dr => LoginButton); } catch (Exception e) { Console.WriteLine(e.ToString()); Console.WriteLine("Cannot log out"); return(false); } return(true); }
public string AddNewFolder(string folderName) { WaitUntilExist(MailFrame); Browser.SwitchTo().Frame(MailFrame); NavigateToConfiguration(); WaitUntilExist(SettingsButtonFolderManagement); SettingsButtonFolderManagement.Click(); WaitUntilExist(SettingsButtonAdd); SettingsButtonAdd.Click(); WaitUntilExist(PreferencesFrame); Browser.SwitchTo().Frame(PreferencesFrame); FolderNameInput.SendKeys(folderName); ButtonSave.Click(); Browser.SwitchTo().ParentFrame(); HomeButton.Click(); IsPageLoaded(); return(FolderList.Text); }
/// <summary> /// Clicks the home navigation button. /// </summary> /// <returns>The expected <see cref="Homepage"/> that should result from this action.</returns> public Homepage ClickHome() { WaitForLoad(); HomeButton.Click(); return(new Homepage(Helper.Homepage.AbsoluteUri, Helper.HomepageTitle)); }
public HomePage OpenHomePage() { HomeButton.Click(); return(new HomePage(this.driver)); }
public void ClickHome() { HomeButton.Click(); }