Example #1
0
        static void Main(string[] args)
        {
            User          user   = new User();
            IWebDriver    driver = new FirefoxDriver();
            WebDriverWait wait   = new WebDriverWait(driver, TimeSpan.FromSeconds(11));

            RegistrationPageLocators registrationPageLocators = new RegistrationPageLocators();
            RegistrationPage         registrationPage         = new RegistrationPage(driver);

            registrationPage.GoToRegistrationPage(driver);
            HomePage homePage = registrationPage.RegistrationUserSuccesful(user, wait, registrationPageLocators);

            HomePageLocators homePageLocators = new HomePageLocators();
            MessagesPage     messagesPage     = homePage.GoToMessagesPage(driver, homePageLocators, wait);

            MessagesPageLocators messagesPageLocators = new MessagesPageLocators();
            LastDialogPage       lastDialogPage       = messagesPage.GoToLastDialog(driver, messagesPageLocators, wait);

            LastDialogLocators lastDialogLocators = new LastDialogLocators();

            Console.WriteLine("Last mesage : " + lastDialogPage.GetTextOfLastMessage(driver, lastDialogLocators, wait));

            driver.Quit();
        }
Example #2
0
 /// <summary>
 /// Go to messages page.
 /// </summary>
 /// <param name="driver"></param>
 /// <param name="homePageLocators"></param>
 /// <param name="wait"></param>
 /// <returns>MessagesPage</returns>
 public MessagesPage GoToMessagesPage(IWebDriver driver, HomePageLocators homePageLocators, WebDriverWait wait)
 {
     wait.Until(ExpectedConditions.ElementToBeClickable(homePageLocators.massagesLocator)).Click();
     return(new MessagesPage(driver));
 }