Exemple #1
0
        public void Logout()
        {
            Console.WriteLine("Step2. Login to Twitter with valid credentials");
            LoginFlow.SuccessfulLogin(LoginData.GetValidCredentials());

            Console.WriteLine("Step3. Log out from Twitter");
            Settings.ClickSettings();
            Settings.IsDropdownOpened();
            Settings.ClickLogout();

            Console.WriteLine("Step4. Check that Twitter Home page is loaded");
            HomePage.IsPageLoaded();
        }
Exemple #2
0
        public void SendTweet()
        {
            string tweet = "New tweet " + DateTime.Now.ToString("MMddyyyyhhmmss");

            Console.WriteLine("Step2. Login to Twitter with valid credentials");
            LoginFlow.SuccessfulLogin(LoginData.GetValidCredentials());

            Console.WriteLine("Step3. Posting a tweet");
            Feed.TypeNewTweet(tweet);
            Feed.SendTweet();

            Console.WriteLine("Step4. Check that the tweet appears on my profile");
            bool isTweetAppeared = Feed.IsTweetAppeared(tweet);

            Console.WriteLine($"Tweet '{tweet}' {(isTweetAppeared ? "appeared" : "did NOT appeared")}");
            if (!isTweetAppeared)
            {
                throw new Exception($"Tweet '{tweet}' did NOT appeared in Feed");
            }
        }
Exemple #3
0
 public void SuccessfulLogin()
 {
     Console.WriteLine("Step2. Login to Twitter with valid credentials");
     LoginFlow.SuccessfulLogin(LoginData.GetValidCredentials());
 }