public void ThenEncryptedMailShouldAppearInTheInbox(string to, string subject, string content, string listSubject, string encryptedPass)
 {
     myMessageInboxPage = new InboxPage(driver);
     myMessageInboxPage.NavigateToMyMessageInbox(driver);
     readFromConfig = new ReadFromConfig();
     Assert.IsTrue(myMessageInboxPage.ValidateMail(driver, readFromConfig.GetValue(to), subject, content, listSubject, readFromConfig.GetValue(encryptedPass)));
 }
 public void WhenUserSendsAnOutgoingMessageTo(string name, string subject, string content, string deliveryType)
 {
     driver             = driverFactory.GetDriver();
     myMessageInboxPage = new InboxPage(driver);
     readFromConfig     = new ReadFromConfig();
     myMessageInboxPage.SendOutgoingMessage(subject, content, deliveryType: readFromConfig.GetValue(deliveryType), deptName: readFromConfig.GetValue(name));
 }
 public void WhenUserGoToInternalDocument()
 {
     driver         = driverFactory.GetDriver();
     inboxPage      = new InboxPage(driver);
     readFromConfig = new ReadFromConfig();
     inboxPage.NavigateToMyMessageInbox(driver);
     inboxPage.CheckButtonClickable(driver, "Internal Document");
 }
 public void WhenSearch(string to, string level, string receiverType)
 {
     readFromConfig = new ReadFromConfig();
     inboxPage.ClickToButton(driver);
     inboxPage.SelectLevel(driver, readFromConfig.GetValue(level));
     inboxPage.SelectReceiverType(driver, receiverType);
     inboxPage.SearchNameCode = readFromConfig.GetValue(to);
     inboxPage.SelectToUser(driver, readFromConfig.GetValue(to));
     inboxPage.ClickOkBtn();
 }
Example #5
0
 public void AdminLoggedIn(string username, string password)
 {
     driver         = driverFactory.GetDriver();
     loginPage      = new LoginPage(driver);
     readFromConfig = new ReadFromConfig();
     Thread.Sleep(1000);
     loginPage.CheckLogin(driver);
     loginPage.SelectEnglish(driver);
     loginPage.UserName = readFromConfig.GetUserName(username);
     loginPage.Password = readFromConfig.GetPassword(password);
     loginPage.ClickLoginButton(driver);
     Thread.Sleep(3000);
 }
 public void AddAttachments(string multipleAttachmentType)
 {
     Click(_driver, _attachmentTab);
     Click(_driver, _attacheBtn);
     if (multipleAttachmentType.Contains(".jpg"))
     {
         AutoItX3 autoIt = new AutoItX3();
         autoIt.WinActivate("Open");
         readFromConfig = new ReadFromConfig();
         var filePath = readFromConfig.GetValue("AttachementFolder") + "1.jpg";
         autoIt.Send(filePath);
         autoIt.Send("{ENTER}");
     }
 }
 public void WhenUserSendsAnInternalMessageWithProperties(string level, string receiverType, string to, string subject, string content, string securityLevel, int attachmentNo, string attachmentType)
 {
     driver         = driverFactory.GetDriver();
     inboxPage      = new InboxPage(driver);
     readFromConfig = new ReadFromConfig();
     inboxPage.NavigateToMyMessageInbox(driver);
     inboxPage.CheckButtonClickable(driver, "Internal Document");
     inboxPage.ClickToButton(driver);
     inboxPage.SelectLevel(driver, level);
     inboxPage.SelectReceiverType(driver, receiverType);
     inboxPage.SearchNameCode = readFromConfig.GetValue(to);
     inboxPage.SelectToUser(driver, readFromConfig.GetValue(to));
     inboxPage.ClickOkBtn();
     inboxPage.SendMail(subject, content, multipleAttachementNo: attachmentNo, multipleAttachmentType: attachmentType, securityLevel: readFromConfig.GetValue(securityLevel));
 }
 public void WhenUserSendsAnInternalMessageTo(string level, string receiverType, string to, string subject, string content)
 {
     driver             = driverFactory.GetDriver();
     readFromConfig     = new ReadFromConfig();
     myMessageInboxPage = new InboxPage(driver);
     myMessageInboxPage.NavigateToMyMessageInbox(driver);
     myMessageInboxPage.CheckButtonClickable(driver, "Internal Document");
     myMessageInboxPage.ClickToButton(driver);
     myMessageInboxPage.SelectLevel(driver, readFromConfig.GetValue(level));
     myMessageInboxPage.SelectReceiverType(driver, receiverType);
     myMessageInboxPage.SearchNameCode = readFromConfig.GetValue(to);
     myMessageInboxPage.SelectToUser(driver, readFromConfig.GetValue(to));
     myMessageInboxPage.ClickOkBtn();
     myMessageInboxPage.SendMail(subject, content);
 }
Example #9
0
 public void AddAttachments(string multipleAttachmentType, int multipleAttachementNo)
 {
     if (!multipleAttachmentType.Equals(""))
     {
         if (multipleAttachmentType.Contains(","))
         {
             string[] types = multipleAttachmentType.Split(',');
             foreach (string type in types)
             {
                 Click(_driver, _attachmentTab);
                 Click(_driver, _attacheBtn);
                 AutoItX3 autoIt = new AutoItX3();
                 autoIt.WinActivate("Open");
                 readFromConfig = new ReadFromConfig();
                 var filePath = readFromConfig.GetValue("AttachementFolder") + type;
                 autoIt.Send(filePath);
                 autoIt.Send("{ENTER}");
                 WaitForUploading();
             }
         }
         else
         {
             for (int i = 0; i < multipleAttachementNo; i++)
             {
                 Click(_driver, _attachmentTab);
                 Click(_driver, _attacheBtn);
                 AutoItX3 autoIt = new AutoItX3();
                 autoIt.WinActivate("Open");
                 readFromConfig = new ReadFromConfig();
                 var filePath = readFromConfig.GetValue("AttachementFolder") + multipleAttachmentType;
                 autoIt.Send(filePath);
                 autoIt.Send("{ENTER}");
                 WaitForUploading();
             }
         }
     }
 }
 public void WhenSelectTheExternalDepartment(string to)
 {
     readFromConfig = new ReadFromConfig();
     inboxPage.SelectExternalDeptTo(deptName: readFromConfig.GetValue(to));
 }
        public ActionResult Index()
        {
            ViewData["Message"] = ReadFromConfig.Get();

            return(View());
        }