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]); }
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); }
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); }