Beispiel #1
0
        public void MailManipulation()
        {
            MailPageObjects mailPage = new MailPageObjects(driver);

            if (TestConfig.Browser == "IE")
            {
                mailPage.postChapter.Click();
            }


            Assert.IsTrue(mailPage.mailadress.Displayed);


            WaitExtensions.WaitForElement(driver, mailPage.drafts);

            Assert.IsTrue(mailPage.mail.Text.Contains("Невелика довідка про"));
            Actions action = new Actions(driver);

            action.MoveToElement(mailPage.mail).Build().Perform();
            Thread.Sleep(7000);
            Assert.IsTrue(mailPage.checkpopup.Text.Contains("Пропонуємо Вам ознайомитися"));
            mailPage.ChoosePopup("Невелика довідка про");
            mailPage.acceptbutton.Click();
            IAlert alert = driver.SwitchTo().Alert();

            alert.Dismiss();
            mailPage.CheckMail();
        }
        public void B_CheckLetter()
        {
            MailPageObjects mailPageObject = new MailPageObjects(driver);

            WaitExtensions.WaitForElement(driver, mailPageObject.drafts);
            mailPageObject.drafts.Click();
            mailPageObject.CheckMail(TestConfig.Mail, TestConfig.Theme);
            mailPageObject.CheckMailText(TestConfig.Theme);

            ChromeOptions chromeOptions = new ChromeOptions();

            string File     = "Program.cs";
            string FilePath = @"E:\Clone\Save Result\" + File;



            driver.FindElement(By.LinkText("Program.cs")).Click();
        }