Beispiel #1
0
 /// <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);
 }
Beispiel #2
0
        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);
        }
Beispiel #3
0
        /// <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));
        }
Beispiel #4
0
        public HomePage OpenHomePage()
        {
            HomeButton.Click();

            return(new HomePage(this.driver));
        }
Beispiel #5
0
 public void ClickHome()
 {
     HomeButton.Click();
 }