예제 #1
0
        public void SendingAndReceivingAMessage()
        {
            LoginTestPo          loginTestPo             = new LoginTestPo(Driver);
            ImOpenConverastionPo imOpenConverastionPo    = new ImOpenConverastionPo(Driver);
            SendingIMPo          imSendingAndReceivingPo = new SendingIMPo(Driver);

            loginTestPo.GoToPage();
            loginTestPo.Login("*****@*****.**", "Password1");
            imOpenConverastionPo.OpenAConversationWithSeleniumUser2();

            ((IJavaScriptExecutor)Driver).ExecuteScript("window.open()");
            var tab = Driver.WindowHandles;

            Driver.SwitchTo().Window(tab[1]);
            loginTestPo.GoToPage();
            loginTestPo.Login("*****@*****.**", "Password1");
            imOpenConverastionPo.OpenAConversationWithSeleniumUser1();

            Driver.SwitchTo().Window(tab[0]);
            imSendingAndReceivingPo.SendAMessage("Test Message");

            Driver.SwitchTo().Window(tab[1]);
            Thread.Sleep(2000);
            Driver.SwitchTo().Window(tab[0]);
        }
예제 #2
0
        public void MessageAnOfflineContact()
        {
            LoginTestPo          loginTestPo             = new LoginTestPo(Driver);
            ImOpenConverastionPo imOpenConverastionPo    = new ImOpenConverastionPo(Driver);
            SendingIMPo          imSendingAndReceivingPo = new SendingIMPo(Driver);

            loginTestPo.GoToPage();
            loginTestPo.Login("*****@*****.**", "Password1");
            imOpenConverastionPo.OpenAConversationWithSeleniumUser2();
            imSendingAndReceivingPo.SendAMessage("Test Message");

            Assert.IsTrue(imOpenConverastionPo.SeleniumUser2IsVisible);
        }
예제 #3
0
        public void ClosingAnIMConversation()
        {
            MlaMessageToolbarPo  mlaMessageToolbarPo  = new MlaMessageToolbarPo(Driver);
            LoginTestPo          loginTestPo          = new LoginTestPo(Driver);
            ImOpenConverastionPo imOpenConverastionPo = new ImOpenConverastionPo(Driver);

            loginTestPo.GoToPage();
            loginTestPo.Login("*****@*****.**", "Password1");
            imOpenConverastionPo.OpenAConversationWithSeleniumUser2();
            Assert.IsTrue(imOpenConverastionPo.SeleniumUser2IsVisible);

            mlaMessageToolbarPo.CloseConversationButton();
            Driver.SwitchTo().Frame(0);
            Assert.IsTrue(loginTestPo.MLHeadlinIsVisible);
        }