public void DownloadFile() { string FilePath = @"C:\Users\Lenovo Y500\Desktop\TestFiles\"; EmailPage emailPage = new EmailPage(driver); emailPage.IncomingMailsTab().Click(); emailPage.FirstMail().Click(); driver.FindElement(By.LinkText("UploadTEST.txt")).Click(); Thread.Sleep(2000); }
public void Verify_Fields_Of_Sent_Letter() { EmailPage emailPage = new EmailPage(driver); emailPage.CreateNewLetter(); emailPage.IncomingMailsTab().Click(); emailPage.FirstMail().Click(); Assert.AreEqual("Letter for test", emailPage.Subject().Text); Assert.IsTrue(emailPage.Description().Text.Contains("Description Test")); Assert.AreEqual("*****@*****.**", emailPage.Receiver().Text); }
public void UploadFile() { string File = "UploadTEST.txt"; string FilePath = @"C:\Users\Lenovo Y500\Desktop\" + File; EmailPage emailPage = new EmailPage(driver); emailPage.CreateLetterBtn().Click(); emailPage.ReceiverField().SendKeys("*****@*****.**"); emailPage.SubjectField().SendKeys("Letter for test"); emailPage.DescriptionField().SendKeys("Description Test"); driver.FindElement(By.XPath("//*[@id='att']/div[2]/span[1]/i")).Click(); Thread.Sleep(2000); driver.FindElement(By.XPath("//input[@type='file']")).SendKeys(FilePath); Thread.Sleep(2000); emailPage.SentMailButton().Click(); emailPage.IncomingMailsTab().Click(); emailPage.FirstMail().Click(); }