Esempio n. 1
0
 public void Test14()
 {
     try
     {
         LoginPageSteps.LoginUser(TestsData.user1_email, TestsData.user1_password);
         BaseSteps.GoToSettings();
         SettingPageSteps.SetOutOfOfficeAutoReplyOn(TestsData.vacation_subject, TestsData.vacation_message);
         LoginPageSteps.SwitchUser(TestsData.user2_email, TestsData.user2_password);
         BaseSteps.SendMessage(TestsData.user1_email, TestsData.subject, TestsData.message);
         BaseSteps.WaitForReply();
         InboxPageSteps.Refresh();
         Assert.IsTrue(InboxPageSteps.IsMessagePresentInInbox(TestsData.user1_email,
                                                              $"{TestsData.vacation_subject} {TestsData.Re} {TestsData.subject}"), "Correct reply message isn't present in inbox, but it should be");
         log.Info($"{TestContext.CurrentContext.Test.Name} - {TestsData.Pass}");
         LoginPageSteps.SwitchUser(TestsData.user1_email, TestsData.user1_password);
         SettingPageSteps.SetOutOfOfficeAutoReplyOff();
     }
     catch (Exception ex) when(ex is NoSuchElementException || ex is TimeoutException)
     {
         log.Info($"{TestContext.CurrentContext.Test.Name} - {TestsData.Failed}");
         log.Error(ex);
     }
     catch (AssertionException ex)
     {
         log.Info($"{TestContext.CurrentContext.Test.Name} - {TestsData.Failed}");
         log.Error(ex.Message);
         throw;
     }
 }
Esempio n. 2
0
 public void Test1()
 {
     try
     {
         LoginPageSteps.LoginUser(TestsData.user2_email, TestsData.user2_password);
         BaseSteps.SendMessage(TestsData.user1_email, TestsData.subject, TestsData.message);
         LoginPageSteps.SwitchUser(TestsData.user1_email, TestsData.user1_password);
         InboxPageSteps.ReportMessageAsSpam(TestsData.user2_email, TestsData.subject);
         LoginPageSteps.SwitchUser(TestsData.user2_email, TestsData.user2_password);
         BaseSteps.SendMessage(TestsData.user1_email, TestsData.subject2, TestsData.message2);
         LoginPageSteps.SwitchUser(TestsData.user1_email, TestsData.user1_password);
         Assert.IsTrue(SpamPageSteps.IsMessagePresentInSpam(TestsData.user2_email, TestsData.subject2), "Second message isn't in spam, but it should be");
         log.Info($"{TestContext.CurrentContext.Test.Name} - {TestsData.Pass}");
     }
     catch (Exception ex) when(ex is NoSuchElementException || ex is TimeoutException)
     {
         log.Info($"{TestContext.CurrentContext.Test.Name} - {TestsData.Failed}");
         log.Error(ex);
     }
     catch (AssertionException ex)
     {
         log.Info($"{TestContext.CurrentContext.Test.Name} - {TestsData.Failed}");
         log.Error(ex.Message);
         throw;
     }
 }
Esempio n. 3
0
        static void Main(string[] args)
        {
            LoginPageSteps   loginPage   = new LoginPageSteps();
            LogoutPageSteps  logoutPage  = new LogoutPageSteps();
            MainPageSteps    mainPage    = new MainPageSteps();
            ThemesPageSteps  themePage   = new ThemesPageSteps();
            SettingPageSteps settPage    = new SettingPageSteps();
            MailBoxPageSteps mailPage    = new MailBoxPageSteps();
            LetterPageSteps  letterPage  = new LetterPageSteps();
            StarredPageSteps starredPage = new StarredPageSteps();
            SpamPageSteps    spamPage    = new SpamPageSteps();

            //MailBoxPageSteps mailPage = new MailBoxPageSteps();
            //StarredPageSteps starredPage = new StarredPageSteps();
            loginPage.Open();
            loginPage.Authorize(D.user2, D.password);
            mailPage.WriteMessage(D.user3, "For starred", "XO");
            logoutPage.CommonExit();
            loginPage.Authorize(D.user3, D.password);
            Console.WriteLine(mainPage.CheckIfItIsStarred());
            mainPage.GoToStarred();
            Console.WriteLine(starredPage.CheckIfItIsStarredPage("https://mail.google.com/mail/u/0/#starred"));
            Console.WriteLine(starredPage.CheckTheTopic("For starred"));
            Console.ReadLine();
        }
Esempio n. 4
0
        public void asserAddedNewInfo()
        {
            test        = ReportsHelper.extent.CreateTest("General Info Test");
            this.extent = ReportsHelper.extent;

            LoginPageSteps             loginPageSteps             = new LoginPageSteps(driver, test);
            StatusPanelPageSteps       statusPanelPageSteps       = new StatusPanelPageSteps(driver, test);
            TelephonyWindowPageSteps   telephonyWindowPageSteps   = new TelephonyWindowPageSteps(driver, test);
            TransactionWindowPageSteps transactionWindowPageSteps = new TransactionWindowPageSteps(driver, test);
            FunctionMenuPageSteps      functionMenuPageSteps      = new FunctionMenuPageSteps(driver, test);
            ChildWindowsPageSteps      childWindowPageSteps       = new ChildWindowsPageSteps(driver, test);

            Commons commons = new Commons(driver, this.test);

            loginPageSteps.loginUsingSeatNo();
            statusPanelPageSteps.selectAdminWork();
            statusPanelPageSteps.selectFacility();
            telephonyWindowPageSteps.telephonyClickRejectAll();
            transactionWindowPageSteps.enterServices();
            transactionWindowPageSteps.selectReason();
            transactionWindowPageSteps.selectClassification();
            transactionWindowPageSteps.clickeEndCall();
            transactionWindowPageSteps.clickF12EndCall();
            functionMenuPageSteps.selectTransResearch();
            childWindowPageSteps.validateAddedRecords("General Info");
            statusPanelPageSteps.logOut();
        }
Esempio n. 5
0
 public void Test5()
 {
     try
     {
         LoginPageSteps.LoginUser(TestsData.user1_email, TestsData.user1_password);
         string city = IpApiService.GetCityFromIp(TestsData.IP);
         BaseSteps.SendMessageWithEmoticons(TestsData.user1_email, TestsData.emoticon_subject, city,
                                            int.Parse(TestsData.emoticon_number_1), int.Parse(TestsData.emoticon_number_2));
         InboxPageSteps.Refresh();
         InboxPageSteps.GoToMessagePage(TestsData.user1_email, TestsData.emoticon_subject);
         Assert.AreEqual(2, MessagePageSteps.CountOfEmoticonsInMessage(), "The number of emoticons in the message is incorrect");
         Assert.IsTrue(MessagePageSteps.IsMessageContainsText(TestsData.City), "The message doesn't contains right city name");
         log.Info($"{TestContext.CurrentContext.Test.Name} - {TestsData.Pass}");
     }
     catch (Exception ex) when(ex is NoSuchElementException || ex is TimeoutException)
     {
         log.Info($"{TestContext.CurrentContext.Test.Name} - {TestsData.Failed}");
         log.Error(ex);
     }
     catch (AssertionException ex)
     {
         log.Info($"{TestContext.CurrentContext.Test.Name} - {TestsData.Failed}");
         log.Error(ex.Message);
         throw;
     }
 }
 public void Test11()
 {
     try
     {
         LoginPageSteps.LoginUser(TestsData.user1_email, TestsData.user1_password);
         BaseSteps.SendMessage(TestsData.user1_email, TestsData.subject, TestsData.message);
         InboxPageSteps.Refresh();
         InboxPageSteps.ReportMessageAsSpam(TestsData.user1_email, TestsData.subject);
         Assert.IsTrue(SpamPageSteps.IsMessagePresentInSpam(TestsData.user1_email, TestsData.subject), "The message isn't moved from inbox to spam, but it should be");
         SpamPageSteps.MoveMessageToInbox(TestsData.user1_email, TestsData.subject);
         Assert.IsTrue(InboxPageSteps.IsMessagePresentInInbox(TestsData.user1_email, TestsData.subject), "The message isn't moved from spam to inbox, but it should be");
         log.Info($"{TestContext.CurrentContext.Test.Name} - {TestsData.Pass}");
     }
     catch (Exception ex) when(ex is NoSuchElementException || ex is TimeoutException)
     {
         log.Info($"{TestContext.CurrentContext.Test.Name} - {TestsData.Failed}");
         log.Error(ex);
     }
     catch (AssertionException ex)
     {
         log.Info($"{TestContext.CurrentContext.Test.Name} - {TestsData.Failed}");
         log.Error(ex.Message);
         throw;
     }
 }
        public void AddMessageWithPicture()
        {
            OpenBrowserSteps.OpenBrowser();
            OpenBrowserSteps.Navigate(TestsConstants.WebSiteHttpAddress);
            OpenBrowserSteps.CheckThatMainPageOpnned();
            LoginPageSteps.Login();
            NewsPageSteps.ClickOnAddNewMessageButton();

            var messageGuid = Guid.NewGuid().ToString();
            var title       = $"Это тестовое сообщение c картинкой {messageGuid}";
            var message     = $"Это текст тестового сообщения c картинкой, This is text for test message with picture {messageGuid}";

            NewsPageSteps.AddTitle(title);
            NewsPageSteps.AddMessageText(message);
            NewsPageSteps.AddPicture();
            NewsPageSteps.ClickOnCreateMessageButon();

            MessageCreatedSteps.CheckThatNewMessageCreatedPageOpened();
            MessageCreatedSteps.CheckThatTitleShownForNewMessage(title);
            MessageCreatedSteps.CheckThatTextShownForNewMessage(message);
            const string pageTitle = "Школа борьбы: Добавление сообщения";

            OpenBrowserSteps.TitleDisplayed(pageTitle);

            MessageCreatedSteps.ClickOnShowAllMessagesList();
            OpenBrowserSteps.CheckThatMainPageOpnned();
            NewsPageSteps.CheckThatMainPageContainsMessageWithPicture(title);
        }
Esempio n. 8
0
        public void assertAddedReferral()
        {
            //reportsHelper = new ReportsHelper("ServiceReferral");
            test        = ReportsHelper.extent.CreateTest("Service Referral Test");
            this.extent = ReportsHelper.extent;

            LoginPageSteps             loginPageSteps             = new LoginPageSteps(driver, test);
            StatusPanelPageSteps       statusPanelPageSteps       = new StatusPanelPageSteps(driver, test);
            TelephonyWindowPageSteps   telephonyWindowPageSteps   = new TelephonyWindowPageSteps(driver, test);
            TransactionWindowPageSteps transactionWindowPageSteps = new TransactionWindowPageSteps(driver, test);
            FunctionMenuPageSteps      functionMenuPageSteps      = new FunctionMenuPageSteps(driver, test);
            ChildWindowsPageSteps      childWindowPageSteps       = new ChildWindowsPageSteps(driver, test);
            Commons commons = new Commons(driver, this.test);

            loginPageSteps.loginUsingSeatNo();
            statusPanelPageSteps.selectAdminWork();
            statusPanelPageSteps.selectFacility();
            telephonyWindowPageSteps.telephonyClickRejectAll();
            transactionWindowPageSteps.clickCancel();
            commons.clickYes();
            statusPanelPageSteps.selectCategoryServices();
            statusPanelPageSteps.selectTypeServiceReferral();
            transactionWindowPageSteps.fillServiceReferralForm();
            transactionWindowPageSteps.clickF12EndCall();
            functionMenuPageSteps.selectTransResearch();
            childWindowPageSteps.verifyAddedRecordsInServiceReferral();
            statusPanelPageSteps.logOut();
        }
Esempio n. 9
0
        public void assertAddedReferral()
        {
            test        = ReportsHelper.extent.CreateTest("Physician Referral Test");
            this.extent = ReportsHelper.extent;

            LoginPageSteps             loginPageSteps             = new LoginPageSteps(driver, test);
            StatusPanelPageSteps       statusPanelPageSteps       = new StatusPanelPageSteps(driver, test);
            TelephonyWindowPageSteps   telephonyWindowPageSteps   = new TelephonyWindowPageSteps(driver, test);
            TransactionWindowPageSteps transactionWindowPageSteps = new TransactionWindowPageSteps(driver, test);
            FunctionMenuPageSteps      functionMenuPageSteps      = new FunctionMenuPageSteps(driver, test);
            ChildWindowsPageSteps      childWindowPageSteps       = new ChildWindowsPageSteps(driver, test);

            Commons commons = new Commons(driver, this.test);

            loginPageSteps.loginUsingSeatNo();
            statusPanelPageSteps.selectAdminWork();
            statusPanelPageSteps.selectFacility();
            telephonyWindowPageSteps.telephonyClickRejectAll();
            transactionWindowPageSteps.clickCancel();
            commons.clickYes();
            statusPanelPageSteps.selectCategoryServices();
            statusPanelPageSteps.selectTypePhysicianReferral();
            transactionWindowPageSteps.selectHeardSource();
            transactionWindowPageSteps.populateFields();
            transactionWindowPageSteps.clickFirstRecord();
            transactionWindowPageSteps.clickReturn();
            transactionWindowPageSteps.populateReferralFields();
            transactionWindowPageSteps.clickEndReferralBtn();
            transactionWindowPageSteps.clickSendBtn();
            transactionWindowPageSteps.clickF12EndCall();
            functionMenuPageSteps.selectTransResearch();
            childWindowPageSteps.validateAddedRecords("Physician Referral");
            statusPanelPageSteps.logOut();
        }
Esempio n. 10
0
 public void Setup()
 {
     driver = new ChromeDriver();
     driver.Manage().Window.Maximize();
     loginPage      = new LoginPage(driver);
     loginPageSteps = new LoginPageSteps(driver, loginPage);
 }
        public void asMSR()
        {
            var testName = "Triage Workflow as MSR";

            test        = ReportsHelper.extent.CreateTest(testName);
            this.extent = ReportsHelper.extent;

            LoginPageSteps             loginPageSteps             = new LoginPageSteps(driver, test);
            StatusPanelPageSteps       statusPanelPageSteps       = new StatusPanelPageSteps(driver, test);
            TelephonyWindowPageSteps   telephonyWindowPageSteps   = new TelephonyWindowPageSteps(driver, test);
            TransactionWindowPageSteps transactionWindowPageSteps = new TransactionWindowPageSteps(driver, test);
            FunctionMenuPageSteps      functionMenuPageSteps      = new FunctionMenuPageSteps(driver, test);
            ChildWindowsPageSteps      childWindowPageSteps       = new ChildWindowsPageSteps(driver, test);

            Commons commons = new Commons(driver, this.test);

            loginPageSteps.loginUsingSeatNo();
            statusPanelPageSteps.selectAdminWork();
            statusPanelPageSteps.selectFacility();
            telephonyWindowPageSteps.telephonyClickRejectAll();
            transactionWindowPageSteps.clickCancel();
            commons.clickYes();
            statusPanelPageSteps.selectTypeTriage();
            transactionWindowPageSteps.inputInitialTriageFormDetails();
            commons.clickOK();
            transactionWindowPageSteps.inputFinishinDetailsTriage();
            telephonyWindowPageSteps.telephonyClickRejectAll();
            transactionWindowPageSteps.clickF12EndCall();
            statusPanelPageSteps.logOut();
        }
        public void asNurse()
        {
            var testName = "Triage Workflow as MSR";

            test        = ReportsHelper.extent.CreateTest(testName);
            this.extent = ReportsHelper.extent;

            LoginPageSteps             loginPageSteps             = new LoginPageSteps(driver, test);
            StatusPanelPageSteps       statusPanelPageSteps       = new StatusPanelPageSteps(driver, test);
            TelephonyWindowPageSteps   telephonyWindowPageSteps   = new TelephonyWindowPageSteps(driver, test);
            TransactionWindowPageSteps transactionWindowPageSteps = new TransactionWindowPageSteps(driver, test);
            FunctionMenuPageSteps      functionMenuPageSteps      = new FunctionMenuPageSteps(driver, test);
            ChildWindowsPageSteps      childWindowPageSteps       = new ChildWindowsPageSteps(driver, test);

            loginPageSteps.loginUsingSeatNo();
            statusPanelPageSteps.selectAdminWork();
            functionMenuPageSteps.selectMonitorQueue();
            transactionWindowPageSteps.clickClinicalCalls();
            transactionWindowPageSteps.selectMSRCreatedEncounter();
            transactionWindowPageSteps.clickTakeCall();
            transactionWindowPageSteps.clickStartTriage();
            transactionWindowPageSteps.clickComplaintGuidelines();
            transactionWindowPageSteps.enterChiefComplaint();
            transactionWindowPageSteps.enterBleedingSearchAndGo();
            transactionWindowPageSteps.enterAssessmentValue();
            transactionWindowPageSteps.clickTriageGoBtn();
        }
        public void assertAddedNewMessage()
        {
            test        = ReportsHelper.extent.CreateTest("New Baby Test");
            this.extent = ReportsHelper.extent;

            LoginPageSteps             loginPageSteps             = new LoginPageSteps(driver, test);
            StatusPanelPageSteps       statusPanelPageSteps       = new StatusPanelPageSteps(driver, test);
            TelephonyWindowPageSteps   telephonyWindowPageSteps   = new TelephonyWindowPageSteps(driver, test);
            TransactionWindowPageSteps transactionWindowPageSteps = new TransactionWindowPageSteps(driver, test);
            FunctionMenuPageSteps      functionMenuPageSteps      = new FunctionMenuPageSteps(driver, test);
            ChildWindowsPageSteps      childWindowPageSteps       = new ChildWindowsPageSteps(driver, test);

            Commons commons = new Commons(driver, this.test);

            loginPageSteps.loginUsingSeatNo();
            statusPanelPageSteps.selectAdminWork();
            statusPanelPageSteps.selectFacility();
            telephonyWindowPageSteps.telephonyClickRejectAll();
            transactionWindowPageSteps.clickCancel();
            commons.clickYes();
            statusPanelPageSteps.selectMessage();
            statusPanelPageSteps.selectNewBabyReport();
            transactionWindowPageSteps.fillNewBabyForm();
            childWindowPageSteps.populateNewBabyOverrideReason();
            transactionWindowPageSteps.clickF12EndCall();

            functionMenuPageSteps.selectOutputQueue();

            transactionWindowPageSteps.verifyAddedNewBabyReport();
            statusPanelPageSteps.logOut();
        }
Esempio n. 14
0
 public void NewMessagePageShown()
 {
     OpenBrowserSteps.OpenBrowser();
     OpenBrowserSteps.Navigate(TestsConstants.WebSiteHttpAddress);
     OpenBrowserSteps.CheckThatMainPageOpnned();
     LoginPageSteps.Login();
     NewsPageSteps.ClickOnAddNewMessageButton();
     NewsPageSteps.CheckThatNewMessagePageOpened();
 }
Esempio n. 15
0
        public void Initialize()
        {
            DriverManager = DriverManagerFactory.GetDriverManager(DriverType.CHROME);
            Driver        = DriverManager.GetWebDriver();
            Driver.Navigate().GoToUrl("https://dev.integrivideo.com/app/projects");
            Driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(4);

            LoginPageSteps = new LoginPageSteps(Driver);
        }
Esempio n. 16
0
        public void NewMessagePageTitle()
        {
            OpenBrowserSteps.OpenBrowser();
            OpenBrowserSteps.Navigate(TestsConstants.WebSiteHttpAddress);
            OpenBrowserSteps.CheckThatMainPageOpnned();
            LoginPageSteps.Login();
            NewsPageSteps.ClickOnAddNewMessageButton();

            const string pageTitle = "Школа борьбы: Создать сообщение";

            OpenBrowserSteps.TitleDisplayed(pageTitle);
        }
Esempio n. 17
0
 public UISteps(UiTestAssemblyFixture uiTestAssemblyFixture,
                UiTestClassFixture uiTestClassFixture, MainLoggedPageSteps mainLoggedPageSteps,
                BoardPageSteps boardPageSteps, LoginPageSteps loginPageSteps, HomePageSteps homePageSteps,
                CompanyInfoPageSteps companyInfoPageStep, TeamInfoPageSteps teamInfoPageSteps) : base(uiTestAssemblyFixture, uiTestClassFixture)
 {
     MainLoggedPageSteps  = mainLoggedPageSteps;
     BoardPageSteps       = boardPageSteps;
     LoginPageSteps       = loginPageSteps;
     HomePageSteps        = homePageSteps;
     CompanyInfoPageSteps = companyInfoPageStep;
     TeamInfoPageSteps    = teamInfoPageSteps;
 }
Esempio n. 18
0
        public void Test2()
        {
            try
            {
                string path = $@"{TestContext.CurrentContext.TestDirectory}\{TestsData.normal_attach_file}";
                LoginPageSteps.LoginUser(TestsData.user1_email, TestsData.user1_password);
                BaseSteps.GoToSettings();
                SettingPageSteps.GoToForwardingAndPOP();
                ForwardPageSteps.AddForwardingAddress(TestsData.user2_email);
                LoginPageSteps.SwitchUser(TestsData.user2_email, TestsData.user2_password);
                InboxPageSteps.GoToMessagePage(TestsData.google_forwarding_email);
                MessagePageSteps.ConfirmForwarding();
                LoginPageSteps.SwitchUser(TestsData.user1_email, TestsData.user1_password);
                BaseSteps.GoToSettings();
                SettingPageSteps.GoToForwardingAndPOP();
                ForwardPageSteps.ChooseForwardingVariant();
                BaseSteps.GoToSettings();
                SettingPageSteps.GoToFiltersAndBlockedAddresses();
                FiltersPageSteps.CreateNewFilter(TestsData.user3_email);
                LoginPageSteps.SwitchUser(TestsData.user3_email, TestsData.user3_password);
                BaseSteps.SendMessage(TestsData.user1_email, TestsData.no_attach_subject, TestsData.no_attach_message);
                BaseSteps.SendMesageWithAttachment(TestsData.user1_email, TestsData.attach_subject, TestsData.attach_message, path);
                LoginPageSteps.SwitchUser(TestsData.user1_email, TestsData.user1_password);

                Assert.IsTrue(InboxPageSteps.IsMessagePresentInInbox(TestsData.user3_email, TestsData.no_attach_subject));
                Assert.IsTrue(ImportantPageSteps.IsMessageMarkedAsImportant(TestsData.user3_email, TestsData.no_attach_subject));//IsFalse

                Assert.IsTrue(TrashPageSteps.IsMessagePresentInTrash(TestsData.user3_email, TestsData.attach_subject));
                Assert.IsFalse(ImportantPageSteps.IsMessageMarkedAsImportant(TestsData.user3_email, TestsData.attach_subject));//IsTrue

                LoginPageSteps.SwitchUser(TestsData.user2_email, TestsData.user2_password);
                Assert.IsTrue(InboxPageSteps.IsMessagePresentInInbox(TestsData.user3_email, TestsData.no_attach_subject));
                log.Info($"{TestContext.CurrentContext.Test.Name} - {TestsData.Pass}");
            }
            catch (Exception ex) when(ex is NoSuchElementException || ex is TimeoutException)
            {
                log.Info($"{TestContext.CurrentContext.Test.Name} - {TestsData.Failed}");
                log.Error(ex);
            }
            catch (AssertionException ex)
            {
                log.Info($"{TestContext.CurrentContext.Test.Name} - {TestsData.Failed}");
                log.Error(ex.Message);
                throw;
            }
        }
Esempio n. 19
0
 public void TearDown()
 {
     try
     {
         log.Info("TearDown started");
         LoginPageSteps.SwitchUser(TestsData.user1_email, TestsData.user1_password);
         BaseSteps.CleanUserSettingsAndMessages();
         LoginPageSteps.SwitchUser(TestsData.user2_email, TestsData.user2_password);
         BaseSteps.CleanUserSettingsAndMessages();
         BaseSteps.SignOut();
     }
     catch (Exception)
     {
         log.Error("Error occured in TearDown");
     }
     finally
     {
         WebDriver.CloseWebDriver();
         log.Info("TearDown finished");
     }
 }
Esempio n. 20
0
 public void Test12()
 {
     try
     {
         LoginPageSteps.LoginUser(TestsData.user1_email, TestsData.user1_password);
         BaseSteps.GoToSettings();
         SettingPageSteps.SetSignature(TestsData.signature);
         Assert.IsTrue(InboxPageSteps.IsSignaturePresentInMessage(TestsData.signature), "The signature isn't present, but it should be");
         log.Info($"{TestContext.CurrentContext.Test.Name} - {TestsData.Pass}");
         SettingPageSteps.RemoveSignature();
     }
     catch (Exception ex) when(ex is NoSuchElementException || ex is TimeoutException)
     {
         log.Info($"{TestContext.CurrentContext.Test.Name} - {TestsData.Failed}");
         log.Error(ex);
     }
     catch (AssertionException ex)
     {
         log.Info($"{TestContext.CurrentContext.Test.Name} - {TestsData.Failed}");
         log.Error(ex.Message);
         throw;
     }
 }
 public void Test13()
 {
     try
     {
         LoginPageSteps.LoginUser(TestsData.user1_email, TestsData.user1_password);
         BaseSteps.SendMessage(TestsData.user1_email, TestsData.subject, TestsData.message);
         InboxPageSteps.Refresh();
         InboxPageSteps.MarkMessageAsStarred(TestsData.user1_email, TestsData.subject);
         Assert.IsTrue(InboxPageSteps.IsMessagePresentInStarredFolder(TestsData.user1_email, TestsData.subject), "The message isn't marked as starred, but it should be");
         log.Info($"{TestContext.CurrentContext.Test.Name} - {TestsData.Pass}");
     }
     catch (Exception ex) when(ex is NoSuchElementException || ex is TimeoutException)
     {
         log.Info($"{TestContext.CurrentContext.Test.Name} - {TestsData.Failed}");
         log.Error(ex);
     }
     catch (AssertionException ex)
     {
         log.Info($"{TestContext.CurrentContext.Test.Name} - {TestsData.Failed}");
         log.Error(ex.Message);
         throw;
     }
 }
Esempio n. 22
0
 public void Test3()
 {
     try
     {
         string path = $@"{TestContext.CurrentContext.TestDirectory}\{TestsData.big_attach_file_path}";
         LoginPageSteps.LoginUser(TestsData.user1_email, TestsData.user1_password);
         BaseSteps.SendMesageWithAttachment(TestsData.user2_email, TestsData.attach_subject, TestsData.attach_message, path);
         Assert.IsTrue(BaseSteps.IsLargeFileAlertPresent(), "Large file alert isn't present, but it should be");
         log.Info($"{TestContext.CurrentContext.Test.Name} - {TestsData.Pass}");
         BaseSteps.CloseAlert();
     }
     catch (Exception ex) when(ex is NoSuchElementException || ex is TimeoutException)
     {
         log.Info($"{TestContext.CurrentContext.Test.Name} - {TestsData.Failed}");
         log.Error(ex);
     }
     catch (AssertionException ex)
     {
         log.Info($"{TestContext.CurrentContext.Test.Name} - {TestsData.Failed}");
         log.Error(ex.Message);
         throw;
     }
 }
Esempio n. 23
0
 public void Test4()
 {
     try
     {
         string path = $@"{TestContext.CurrentContext.TestDirectory}\{TestsData.not_image_file}";
         LoginPageSteps.LoginUser(TestsData.user1_email, TestsData.user1_password);
         BaseSteps.GoToThemes();
         ThemesPageSteps.ChangeBackgroungImage(path);
         Assert.IsTrue(ThemesPageSteps.IsUploadErrorOccured(), "Upload error hasn't occured, but it should have");
         ThemesPageSteps.CloseThemesWindow();
         log.Info($"{TestContext.CurrentContext.Test.Name} - {TestsData.Pass}");
     }
     catch (Exception ex) when(ex is NoSuchElementException || ex is TimeoutException)
     {
         log.Info($"{TestContext.CurrentContext.Test.Name} - {TestsData.Failed}");
         log.Error(ex);
     }
     catch (AssertionException ex)
     {
         log.Info($"{TestContext.CurrentContext.Test.Name} - {TestsData.Failed}");
         log.Error(ex.Message);
         throw;
     }
 }
Esempio n. 24
0
        public void assertAddedNewMessage()
        {
            test        = ReportsHelper.extent.CreateTest("General Message Test");
            this.extent = ReportsHelper.extent;

            LoginPageSteps             loginPageSteps             = new LoginPageSteps(driver, test);
            StatusPanelPageSteps       statusPanelPageSteps       = new StatusPanelPageSteps(driver, test);
            TelephonyWindowPageSteps   telephonyWindowPageSteps   = new TelephonyWindowPageSteps(driver, test);
            TransactionWindowPageSteps transactionWindowPageSteps = new TransactionWindowPageSteps(driver, test);
            FunctionMenuPageSteps      functionMenuPageSteps      = new FunctionMenuPageSteps(driver, test);
            ChildWindowsPageSteps      childWindowPageSteps       = new ChildWindowsPageSteps(driver, test);

            Commons commons = new Commons(driver, this.test);

            loginPageSteps.loginUsingSeatNo();
            statusPanelPageSteps.selectAdminWork();
            statusPanelPageSteps.selectFacility();
            telephonyWindowPageSteps.telephonyClickRejectAll();
            transactionWindowPageSteps.clickCancel();
            commons.clickYes();
            statusPanelPageSteps.selectMessage();
            statusPanelPageSteps.selectGeneralMessage();
            telephonyWindowPageSteps.telephonyClickRejectAll();
            transactionWindowPageSteps.populateFields();
            transactionWindowPageSteps.clickFirstRecord();
            transactionWindowPageSteps.clickReturn();
            commons.clickOK();
            transactionWindowPageSteps.populateMoreFields();
            telephonyWindowPageSteps.telephonyClickRejectAll();
            transactionWindowPageSteps.clickSendMessageBtn();
            transactionWindowPageSteps.clickSendBtn();
            transactionWindowPageSteps.clickF12EndCall();
            functionMenuPageSteps.selectTransResearch();
            childWindowPageSteps.validateAddedRecords("General Message");
            statusPanelPageSteps.logOut();
        }
 public void Test_LogIn()
 {
     LoginPageSteps.LogIn(Login, Password);
 }
Esempio n. 26
0
 public void SetUp()
 {
     WebDriver.CreateWebDriver();
     LoginPageSteps.OpenGmail();
     log.Info($"Test {TestContext.CurrentContext.Test.Name} started.");
 }