public void CheckReplyBackFromHI_NotInH5() { //Portal确保HI是Turn on的状态 WeChatManagermentPage.GoToHIPage(); HIPage.TurnOnSetup(); //H5页面进入平台测试账号对话窗口 Mobile_WeChat_Utility.GetToTestAccount(); //Thread.Sleep(5*1000); //H5呼叫客服 Mobile_WeChat_Utility.GetHiCard("客服"); Mobile_WeChat_Utility.XB_SendMessage("这里是测试账号"); //退出当前对话窗口 Mobile_WeChat_Utility.BackButtonClick(); //Portal端客服回复 HIPage.OpenHiChatWindow(); HIPage.GetTestUserFromUserList(); Thread.Sleep(90 * 1000); Mobile_WeChat_Utility.SendMessage("a"); Thread.Sleep(10 * 1000);; HIPage.SendMessage("这里是客服"); Thread.Sleep(2 * 1000); //验证最后一条消息是不是客服回复的消息 string foler = PortalChromeDriver.CreateFolder(@"HI\H5.11.当用户不在H5对话窗口时, 是否可以收到客服的回复"); MobileAndroidDriver.GetScreenshot(foler, "H5"); Assert.IsTrue(Mobile_WeChat_Utility.IsAt(HIMobileH5Element.ReplyCardFromHI)); Mobile_WeChat_Utility.ClickReplyCard(); Assert.IsTrue(Mobile_WeChat_Utility.IsAtPerXpath(string.Format(HIMobileH5Element.ReplyFromHi, "这里是客服"))); Mobile_WeChat_Utility.BackButtonClick(); }
public void Can_Continue_Chat_PressHome() { //Portal确保HI是Turn on的状态 WeChatManagermentPage.GoToHIPage(); HIPage.TurnOnSetup(); //H5页面进入平台测试账号对话窗口 Mobile_WeChat_Utility.GetToTestAccount(); ////H5呼叫客服 Mobile_WeChat_Utility.GetHiCard("客服"); Mobile_WeChat_Utility.XB_SendMessage("我是客户测试账号"); Thread.Sleep(2 * 1000); Mobile_WeChat_Utility.BackButtonClick(); Thread.Sleep(2 * 1000); Mobile_WeChat_Utility.BackToHome(); HIPage.OpenHiChatWindow(); HIPage.SendMessage("这里是客服"); Thread.Sleep(10 * 1000); Mobile_WeChat_Utility.OpenWeChatFromHome(); Mobile_WeChat_Utility.ClickReplyCard(); string foler = PortalChromeDriver.CreateFolder(@"HI\H5.30.按home键后,是否还能进入继续聊天(不停用微信进程)"); MobileAndroidDriver.GetScreenshot(foler, "H5)"); Assert.IsTrue(Mobile_WeChat_Utility.GetMessage("这里是客服")); Mobile_WeChat_Utility.BackButtonClick(); }
public void Can_Staff_CheckReply_FromCustomer() { string foler = PortalChromeDriver.CreateFolder(@"HI\43.客服是否可以正常回复收到的用户消息"); //Portal确保HI是Turn on的状态 WeChatManagermentPage.GoToHIPage(); HIPage.TurnOnSetup(); //H5页面进入平台测试账号对话窗口 Mobile_WeChat_Utility.GetToTestAccount(); //H5呼叫客服 Mobile_WeChat_Utility.GetHiCard("客服"); //H5用户发送消息 Mobile_WeChat_Utility.XB_SendMessage("这里是测试账号"); //Portal客服打开Hi对话窗口 HIPage.OpenHiChatWindow(); //点击测试账号 HIPage.GetTestUserFromUserList(); //客服发送消息 HIPage.SendMessage("这里是客服"); //验证Portal最后一条消息是不是客服回复的消息 PortalChromeDriver.TakeScreenShot(foler, "Portal"); MobileAndroidDriver.GetScreenshot(foler, "H5"); Assert.IsTrue(Mobile_WeChat_Utility.IsAtPerXpath(string.Format(HIMobileH5Element.ReplyFromHi, "这里是客服"))); Mobile_WeChat_Utility.ClickReplyCard(); }