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 Is_Big_MsgTip_ShowUp() { PortalChromeDriver.CreateFolder(@"HI\59.[对话窗口]是否有新消息提示标识显示,当开启人工客服后有消息接入_客户H5发送消息"); //Portal确保HI是Turn on的状态 WeChatManagermentPage.GoToHIPage(); HIPage.TurnOnSetup(); //H5页面进入平台测试账号对话窗口 Mobile_WeChat_Utility.GetToTestAccount(); //H5呼叫客服 Mobile_WeChat_Utility.GetHiCard("客服"); //H5用户发送消息 Mobile_WeChat_Utility.XB_SendMessage("这里是测试账号"); Mobile_WeChat_Utility.XB_SendMessage("这里是测试账号"); MobileAndroidDriver.GetScreenshot(foler, "客户H5发送消息"); Mobile_WeChat_Utility.BackButtonClick(); Thread.Sleep(5 * 1000); PortalChromeDriver.TakeScreenShot(foler, "59.[对话窗口]是否有新消息提示标识显示,当开启人工客服后有消息接入"); PortalChromeDriver.CreateFolder(@"HI\61.是否可以显示大红点,当不在人工对话栏并有新消息接入时"); PortalChromeDriver.TakeScreenShot(foler, "61.是否可以显示大红点,当不在人工对话栏并有新消息接入时"); Assert.IsTrue(HIPage.Is_Big_New_Msg_Tip()); //点击人工客服之后 大红点消失 HIPage.HiChatPoartal(); Assert.IsFalse(HIPage.Is_Big_New_Msg_Tip()); }
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 FollowedAutoReply_AddText_BVT() { string filePath = PortalChromeDriver.CreateFolder(@"被关注自动回复\添加文字关键词回复"); FollowedAutoReplyPage.AddAutoReplyText("hello,谢谢关注"); Thread.Sleep(2 * 1000); PortalChromeDriver.TakeScreenShot(filePath, "Portal添加一条回复"); Assert.IsTrue(Utility.IsAt(FollowedAutoReplyElement.AddedAutoReply, "hello,谢谢关注")); MobileAndroidDriver.AndroidInitialize(); Mobile_WeChat_Utility.UnFollowWeChatOffcialAccount(); Mobile_WeChat_Utility.FollowWeChatOffcialAccount(); MobileAndroidDriver.GetScreenshot(filePath, "Mobile端check"); Assert.IsTrue((Mobile_WeChat_Utility.GetLatestMessage("hello,谢谢关注"))); Mobile_WeChat_Utility.BackButtonClick(); FollowedAutoReplyPage.AddAutoReplyText("我是更改的文字回复"); Thread.Sleep(2 * 1000); PortalChromeDriver.TakeScreenShot(filePath, "Portal修改文字回复"); Assert.IsTrue(Utility.IsAt(FollowedAutoReplyElement.AddedAutoReply, "我是更改的文字回复")); FollowedAutoReplyPage.Delete(); Thread.Sleep(2 * 1000); PortalChromeDriver.TakeScreenShot(filePath, "Portal删除一条回复"); Assert.IsFalse(Utility.IsAt(FollowedAutoReplyElement.AddedAutoReply, "我是更改的文字回复")); }
public void TurnOff_AutoReply_Weibo() { string filePath = PortalChromeDriver.CreateFolder(@"自动回复\关键词自动回复Mobile可用"); WeChatManagermentPage.GoTo_AutoReply_Page(); PortalChromeDriver.ClickElementPerXpath(AutoReplyElement.KeyWordsReply); AutoReplyPage.TurnOnAutoReply(); AutoReplyPage.ClearReply(); AutoReplyPage.AddAutoReply("A", "怎么办", "我是美女"); MobileAndroidDriver.AndroidInitialize_Weibo(); Mobile_Weibo_Utility.Follow(); Mobile_Weibo_Utility.ClearAllMessage(); Mobile_Weibo_Utility.SendMessage("怎么办"); MobileAndroidDriver.GetScreenshot(filePath, "H5关键词精确匹配"); Assert.IsTrue(Mobile_WeChat_Utility.IsAtPerName("[啊_荀] 说:我是美女")); filePath = PortalChromeDriver.CreateFolder(@"自动回复\停用关键词回复Mobile无关键词回复"); AutoReplyPage.TurnOffAutoReply(); Mobile_WeChat_Utility.BackButtonClick(); Mobile_Weibo_Utility.ClearAllMessage(); Mobile_WeChat_Utility.SendMessage("怎么办"); Thread.Sleep(2 * 1000); MobileAndroidDriver.GetScreenshot(filePath, "停用关键词回复Mobile无关键词回复"); Assert.IsFalse(Mobile_WeChat_Utility.IsAtPerName("[啊_荀] 说:[我是美女]")); }
public void Can_ShareWin_ToFriend() { //Portal确保HI是Turn on的状态 WeChatManagermentPage.GoToHIPage(); HIPage.TurnOnSetup(); //H5页面进入平台测试账号对话窗口 Mobile_WeChat_Utility.GetToTestAccount(); //H5呼叫客服 Mobile_WeChat_Utility.GetHiCard("客服"); string foler = PortalChromeDriver.CreateFolder(@"HI\H5.12.对话窗口是否可以分享和发送给朋友"); MobileAndroidDriver.GetScreenshot(foler, "H5"); Assert.IsTrue(Mobile_WeChat_Utility.GetMoreItmes()); Mobile_WeChat_Utility.BackButtonClick(); }
public void Is_Big_MsgTip_Show_InHiWin() { //Portal确保HI是Turn on的状态 WeChatManagermentPage.GoToHIPage(); HIPage.TurnOnSetup(); HIPage.HiChatPoartal(); //H5页面进入平台测试账号对话窗口 Mobile_WeChat_Utility.GetToTestAccount(); //H5呼叫客服 Mobile_WeChat_Utility.GetHiCard("客服"); //H5用户发送消息 Mobile_WeChat_Utility.XB_SendMessage("这里是测试账号"); PortalChromeDriver.CreateFolder(@"HI\62.是否可以显示大红点,当停留在'对话窗口'页面"); MobileAndroidDriver.GetScreenshot(foler, "客户H5发消息"); Mobile_WeChat_Utility.BackButtonClick(); PortalChromeDriver.TakeScreenShot(foler, "62.是否可以显示大红点,当停留在'对话窗口'页面"); Assert.IsFalse(HIPage.Is_Big_New_Msg_Tip()); }
public void Portal_H5_Chat() { //Portal确保HI是Turn on的状态 WeChatManagermentPage.GoToHIPage(); HIPage.TurnOnSetup(); HIPage.OpenHiChatWindow(); HIPage.GetTestUserFromUserList(); Mobile_WeChat_Utility.GetToTestAccount(); Mobile_WeChat_Utility.GetHiCard("客服"); Mobile_WeChat_Utility.XB_SendMessage("我是客户"); //验证能否收到H5客户端的消息 HIPage.OpenHiChatWindow(); string foler = PortalChromeDriver.CreateFolder(@"HI\H5.7.在H5对话窗口, 是否可以发送消息"); MobileAndroidDriver.GetScreenshot(foler, "H5发送消息"); Assert.IsTrue(HIPage.Can_ReceiveMesageFromMobile()); Thread.Sleep(2 * 1000); HIPage.SendMessage("我是客服"); Thread.Sleep(2 * 1000); //验证能否收到Portal客服端的消息 foler = PortalChromeDriver.CreateFolder(@"HI\H5.9.用户在H5对话窗口时,是否可以收到客服回复的消息"); MobileAndroidDriver.GetScreenshot(foler, "H5"); Assert.IsTrue(Mobile_WeChat_Utility.GetMessage("我是客服")); //验证H5端在未退出当前窗口时,是否会收到客服回复的card foler = PortalChromeDriver.CreateFolder(@"HI\H5.10.是否可以收到一条新的客服回复的card,当用户没有退出当前H5对话窗口时"); MobileAndroidDriver.GetScreenshot(foler, "H5"); Assert.IsFalse(Mobile_WeChat_Utility.IsAt(HIMobileH5Element.ReplyCardFromHI)); //验证H5端发送图片 Mobile_WeChat_Utility.XB_SendPhotoFromFile("mmexport1482395212867.jpg"); PortalChromeDriver.Wait(TimeSpan.FromSeconds(5)); Assert.IsTrue(HIPage.Can_ReceiveImageFromMobile()); //Portal发送图片 HIPage.SendImage(); Mobile_WeChat_Utility.GetImageMessage(false); foler = PortalChromeDriver.CreateFolder(@"HI\H5.21.发送和接受的图片是否可以可以点击放大"); MobileAndroidDriver.GetScreenshot(foler, "H5"); Assert.IsTrue(Mobile_WeChat_Utility.GetMagnifyImage()); Mobile_WeChat_Utility.BackButtonClick(); }
public void IsHICardAvailableAfterHITurnOff() { //Portal确保HI是Turn on的状态 WeChatManagermentPage.GoToHIPage(); HIPage.TurnOnSetup(); //H5页面进入平台测试账号对话窗口 Mobile_WeChat_Utility.GetToTestAccount(); //清空聊天记录 Mobile_WeChat_Utility.ClearAllRecord(); //H5呼叫客服 Mobile_WeChat_Utility.SendMessage("客服"); //关闭HI Utility.TurnOff(); Mobile_WeChat_Utility.ClickHICard(); string foler = PortalChromeDriver.CreateFolder(@"HI\H5.23.人工客服功能关闭,是否可以打开H5对话窗口"); MobileAndroidDriver.GetScreenshot(foler, "H5"); //Assert.IsTrue(HIMobileH5.IsAtPerXpath(HIMobileH5Element.HIOffError)); Assert.IsFalse(Mobile_WeChat_Utility.IsAt(HIMobileH5Element.HiCardXpath)); Mobile_WeChat_Utility.BackButtonClick(); }
public void Is_NewMsg_TopShow_InHIWin() { //Portal确保HI是Turn on的状态 WeChatManagermentPage.GoToHIPage(); HIPage.TurnOnSetup(); //Portal客服打开Hi对话窗口 HIPage.OpenHiChatWindow(); HIPage.GetOtherUserFromUserList(); //H5页面进入平台测试账号对话窗口 Mobile_WeChat_Utility.GetToTestAccount(); //H5呼叫客服 Mobile_WeChat_Utility.GetHiCard("客服"); PortalChromeDriver.Wait(TimeSpan.FromSeconds(10)); //H5用户发送消息 Mobile_WeChat_Utility.XB_SendMessage("这里是测试账号"); Mobile_WeChat_Utility.BackButtonClick(); Thread.Sleep(5 * 1000); string foler = PortalChromeDriver.CreateFolder(@"HI\44.[对话窗口]是否可以在用户消息列表上次置顶显示,无论消息的状态是已读或未读,只要收到新的消息"); PortalChromeDriver.TakeScreenShot(foler, "Portal"); Assert.IsTrue(HIPage.CheckTheTopUser()); }