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 FaceRanking_ChangeTheAverage() { MobileAndroidDriver.AndroidInitialize(); Mobile_WeChat_Utility.FollowWeChatOffcialAccount(); FaceRankingMobilePage_WeChat.ClickFaceRanking(); double before1 = 0; double after1 = 0; double before2 = 0; double after2 = 0; double before3 = 0; double after3 = 0; string filePath = PortalChromeDriver.CreateFolder(@"拼颜值\12.检查多次上传测试后,平均值是否被拉高或拉低了"); FaceRankingMobilePage_WeChat.FaceRankingFromFile(SecretRelationshipTest.美女美女); FaceRankingMobilePage_WeChat.Getfraction(ref before1, ref after1); MobileAndroidDriver.GetScreenshot(filePath, "第一次上传"); FaceRankingMobilePage_WeChat.BackWards(); FaceRankingMobilePage_WeChat.ClickFaceRanking(); FaceRankingMobilePage_WeChat.FaceRankingFromFile(SecretRelationshipTest.美女美女); FaceRankingMobilePage_WeChat.Getfraction(ref before2, ref after2); MobileAndroidDriver.GetScreenshot(filePath, "第二次上传"); FaceRankingMobilePage_WeChat.BackWards(); FaceRankingMobilePage_WeChat.ClickFaceRanking(); FaceRankingMobilePage_WeChat.FaceRankingFromFile(SecretRelationshipTest.美女美女); FaceRankingMobilePage_WeChat.Getfraction(ref before3, ref after3); MobileAndroidDriver.GetScreenshot(filePath, "第三次上传"); Assert.IsTrue(before1 <= after1 && before2 <= after2 && before3 <= after3); Assert.IsTrue(after1 == before2 && after2 == before3); }
public void EditReply_AutoReply() { string filePath = PortalChromeDriver.CreateFolder(@"自动回复\编辑关键词回复"); AutoReplyPage.AddAutoReply("A", "Hi", "第一个自动回复"); Thread.Sleep(2 * 1000); PortalChromeDriver.Refresh(); AutoReplyPage.EditRule("修改的Rule"); PortalChromeDriver.TakeScreenShot(filePath, "修改的Rule"); Assert.IsTrue(Utility.IsAt(AutoReplyElement.RuleContent, "修改的Rule")); AutoReplyPage.EditTriger("修改的Trigger"); PortalChromeDriver.TakeScreenShot(filePath, "修改的Trigger"); Assert.IsTrue(Utility.IsAt(AutoReplyElement.TrigerContent.Replace("[{0}]", ""), "修改的Trigger")); AutoReplyPage.EditReply("修改的Reply"); PortalChromeDriver.TakeScreenShot(filePath, "修改的Reply"); Assert.IsTrue(Utility.IsAt(AutoReplyElement.ReplyContent.Replace("[{0}]", ""), "修改的Reply")); MobileAndroidDriver.AndroidInitialize(); Mobile_WeChat_Utility.GetToTestAccount(); Mobile_WeChat_Utility.SendMessage("修改的Trigger"); MobileAndroidDriver.GetScreenshot(filePath, "H5关键词精确匹配"); Assert.IsTrue(!Mobile_WeChat_Utility.GetLatestMessage("修改的Reply")); }
public void FollowedAutoReply_Add_Delete_Edit_Image() { string filePath = PortalChromeDriver.CreateFolder(@"被关注自动回复\添加图片回复"); FollowedAutoReplyPage.AddAutoReplyImage(FollowedAutoReplyElement.ImageChoose); PortalChromeDriver.TakeScreenShot(filePath, "添加"); Assert.IsTrue(Utility.IsAt(FollowedAutoReplyElement.AddedImage, "u=115503548,1566568049&fm=23&gp=0.jpg")); MobileAndroidDriver.AndroidInitialize(); Mobile_WeChat_Utility.UnFollowWeChatOffcialAccount(); Mobile_WeChat_Utility.FollowWeChatOffcialAccount(); Thread.Sleep(5 * 1000); Assert.IsTrue(MobileAndroidDriver.IsAt("//android.widget.FrameLayout[contains(@resource-id,'com.tencent.mm:id/a4w')]"), "添加第一页图片"); filePath = PortalChromeDriver.CreateFolder(@"被关注自动回复\删除图片回复"); FollowedAutoReplyPage.Delete(); PortalChromeDriver.TakeScreenShot(filePath, "删除图片回复"); Assert.IsFalse(Utility.IsAt(FollowedAutoReplyElement.AddedImage, "u=115503548,1566568049&fm=23&gp=0.jpg"), "删除图片"); filePath = PortalChromeDriver.CreateFolder(@"被关注自动回复\修改图片回复"); FollowedAutoReplyPage.AddAutoReplyImage(FollowedAutoReplyElement.EditImage); Thread.Sleep(2 * 1000); PortalChromeDriver.TakeScreenShot(filePath, "修改图片回复"); Assert.IsTrue(Utility.IsAt(FollowedAutoReplyElement.AddedImage, "1114.png"), "修改图片"); }
public void Rule_Add_Delete_Response_News() { string filePath = PortalChromeDriver.CreateFolder(@"自动回复\添加1个图片素材"); PortalChromeDriver.ClickElementPerXpath(AutoReplyElement.AddAutoReply); var regulationTextes = PortalChromeDriver.GetElementByClassName(AutoReplyElement.RegulationText); regulationTextes.Clear(); regulationTextes.SendKeys("这是rule"); AutoReplyPage.AddTrigger("abc" + "", 1 + ""); AutoReplyPage.AddReply_News(1); Thread.Sleep(3 * 1000); PortalChromeDriver.TakeScreenShot(filePath, "添加1个图片素材"); Assert.IsTrue(Utility.IsAt(AutoReplyElement.PicValidator1, "关于“东方万里行” 相关问题")); MobileAndroidDriver.AndroidInitialize(); Mobile_WeChat_Utility.GetToTestAccount(); Mobile_WeChat_Utility.SendMessageWithMenu("abc"); MobileAndroidDriver.GetScreenshot(filePath, "H5关键词精确匹配"); Assert.IsTrue(Mobile_WeChat_Utility.IsAtPerName("关于“东方万里行” 相关问题")); filePath = PortalChromeDriver.CreateFolder(@"自动回复\删除图文"); AutoReplyPage.DeletePicReply(1); PortalChromeDriver.TakeScreenShot(filePath, "删除图文"); Assert.IsFalse(Utility.IsAt(AutoReplyElement.PicValidator, "关于“东方万里行” 相关问题")); }
public void ChitChatSkill_BedTime_Story() { MobileAndroidDriver.AndroidInitialize(); Mobile_WeChat_Utility.GetToTestAccount(); Mobile_WeChat_Utility.ClearAllRecord(); Mobile_WeChat_Utility.SendMessage("讲个税前故事"); Assert.IsTrue(Mobile_WeChat_Utility.GetLatestMessage(null)); }
public void FaceRanking_NoneHuman() { MobileAndroidDriver.AndroidInitialize(); Mobile_WeChat_Utility.FollowWeChatOffcialAccount(); FaceRankingMobilePage_WeChat.ClickFaceRanking(); FaceRankingMobilePage_WeChat.FaceRankingFromFile("mmexport1489570865737.jpg"); string filePath = PortalChromeDriver.CreateFolder(@"拼颜值\11.检查上传非人物图片的效果"); MobileAndroidDriver.GetScreenshot(filePath, "11.检查上传非人物图片的效果"); Assert.IsFalse(Mobile_WeChat_Utility.IsAtPerXpath(Mobile.UIElement.FaceRankingMobileElement.Comment, "公众号颜值"), "Comment不出现评分"); }
public void FaceRanking_Trigger() { string filePath = PortalChromeDriver.CreateFolder(@"拼颜值\检查输入以下trigger,是否会触发拼颜值功能:"); Utility.TurnOff(); MobileAndroidDriver.AndroidInitialize(); Mobile_WeChat_Utility.FollowWeChatOffcialAccount(); Mobile_WeChat_Utility.ClearAllRecord(); Mobile_WeChat_Utility.SendMessageWithMenu("拼颜值"); Thread.Sleep(2 * 1000); Assert.IsTrue(Mobile_WeChat_Utility.GetLatestMessage("关闭")); }
public void FaceRanking_Celebrity() { MobileAndroidDriver.AndroidInitialize(); Mobile_WeChat_Utility.FollowWeChatOffcialAccount(); FaceRankingMobilePage_WeChat.ClickFaceRanking(); FaceRankingMobilePage_WeChat.FaceRankingFromFile("mmexport1489570800142.jpg"); string filePath = PortalChromeDriver.CreateFolder(@"拼颜值\9.检查上传明星图片的效果"); MobileAndroidDriver.GetScreenshot(filePath, "9.检查上传明星图片的效果"); Assert.IsTrue(Mobile_WeChat_Utility.IsAtPerXpath(Mobile.UIElement.FaceRankingMobileElement.Comment, "杨洋"), "未显示明星名字,当前case为林丹"); }
public void AddOneLevelMenu_Text() { string filePath = PortalChromeDriver.CreateFolder(@"自定义菜单\添加一级菜单_文本"); MenuPage.AddMenu("一"); MenuPage.AddMenu_Text("这里是一级菜单"); Thread.Sleep(300 * 1000); MobileAndroidDriver.AndroidInitialize(); Mobile_WeChat_Utility.GetToTestAccount(); Mobile_WeChat_Utility.ClickFirstLevelMenu("一"); MobileAndroidDriver.GetScreenshot(filePath, "是否能成功添加一个一级菜单_文本"); Assert.IsTrue(Mobile_WeChat_Utility.GetLatestMessageWithMenu().Text == "这里是一级菜单"); }
public void AutoReply_ClearAll_TurnOff() { string filePath = PortalChromeDriver.CreateFolder(@"自动回复\老用户删除所有创建的规则后,停用并且启用关键词回复功能"); AutoReplyPage.TurnOffAutoReply(); MobileAndroidDriver.AndroidInitialize(); Mobile_WeChat_Utility.FollowWeChatOffcialAccount(); //MobileH5.GetToTestAccount(); Mobile_WeChat_Utility.ResetKeyboard("Appium Android Input Manager for Unicode"); Mobile_WeChat_Utility.SendMessageWithMenu("a"); MobileAndroidDriver.GetScreenshot(filePath, "H5关键词精确匹配"); Assert.IsTrue(!Mobile_WeChat_Utility.GetLatestMessage("[平台测试账号2]说:")); }
public void Rule_Trigger_SameWith_Material() { string filePath = PortalChromeDriver.CreateFolder(@"自动回复\如果设置关键词的内容跟素材的名称一致,优先回复关键词"); AutoReplyPage.AddAutoReply("A", "jdw", "我不是素材"); PortalChromeDriver.TakeScreenShot(filePath, "Portal如果设置关键词的内容跟素材的名称一致,优先回复关键词"); MobileAndroidDriver.AndroidInitialize(); Mobile_WeChat_Utility.GetToTestAccount(); Mobile_WeChat_Utility.SendMessageWithMenu("jdw"); Thread.Sleep(1 * 1000); MobileAndroidDriver.GetScreenshot(filePath, "H5如果设置关键词的内容跟素材的名称一致,优先回复关键词"); Assert.IsTrue(Mobile_WeChat_Utility.GetLatestMessage("我不是素材")); }
public void Rule_Fuzzy_Matching() { string filePath = PortalChromeDriver.CreateFolder(@"自动回复\模糊匹配"); AutoReplyPage.AddAutoReply_Fuzzy_Matching("A", "abcdef", "我不是素材"); MobileAndroidDriver.AndroidInitialize(); Mobile_WeChat_Utility.GetToTestAccount(); Mobile_WeChat_Utility.ClearAllRecord(); Mobile_WeChat_Utility.SendMessageWithMenu("abcdef123"); Thread.Sleep(2 * 1000); MobileAndroidDriver.GetScreenshot(filePath, "模糊匹配"); Assert.IsTrue(Mobile_WeChat_Utility.GetLatestMessage("我不是素材")); }
public void Rule_Exact_Match() { string filePath = PortalChromeDriver.CreateFolder(@"自动回复\关键词精确匹配"); AutoReplyPage.AddAutoReply("A", "A", "我不是素材"); PortalChromeDriver.TakeScreenShot(filePath, "关键词精确匹配"); MobileAndroidDriver.AndroidInitialize(); Mobile_WeChat_Utility.GetToTestAccount(); Mobile_WeChat_Utility.ClearAllRecord(); Mobile_WeChat_Utility.SendMessageWithMenu("A"); MobileAndroidDriver.GetScreenshot(filePath, "H5关键词精确匹配"); Assert.IsTrue(Mobile_WeChat_Utility.GetLatestMessage("我不是素材")); }
public void CheckOnMobile_OtherPhoto() { string folder = PortalChromeDriver.CreateFolder(@"朋友圈截图\是否支持其他格式图片"); Utility.TurnOn(); MomentsSnapPage.DeleteCampain(); Thread.Sleep(2 * 1000); MomentsSnapPage.CreateCampaign("河北"); MobileAndroidDriver.AndroidInitialize(); Mobile_WeChat_Utility.GetToTestAccount(); Mobile_WeChat_Utility.SendPhotoFromFileWithMenu("图片 1, 2017-03-15 17:49"); Thread.Sleep(5 * 1000); Assert.IsFalse(Mobile_WeChat_Utility.GetLatestMessageWithMenu().Text.Contains("[平台测试账号2] 说:ok")); }
public void DeleteAutoReply_AutoReply() { string filePath = PortalChromeDriver.CreateFolder(@"自动回复\删除自动回复"); AutoReplyPage.AddAutoReply("A", "Hi", "第一个自动回复"); AutoReplyPage.DeleteReply(); PortalChromeDriver.TakeScreenShot(filePath, "删除自动回复"); Assert.IsFalse(Utility.IsAt(AutoReplyElement.RuleContent, "规则1:A")); MobileAndroidDriver.AndroidInitialize(); Mobile_WeChat_Utility.GetToTestAccount(); Mobile_WeChat_Utility.SendMessage("A"); MobileAndroidDriver.GetScreenshot(filePath, "H5关键词精确匹配"); Assert.IsTrue(!Mobile_WeChat_Utility.GetLatestMessage("[平台测试账号2]说:")); }
public void FollowedAutoReply_AddedAll_VideoFirst() { string filePath = PortalChromeDriver.CreateFolder(@"被关注自动回复\同时添加文本图文图片和语音自动回复信息,当前选中的素材被保存并发布到微信公众号上"); FollowedAutoReplyPage.AddAutoReplyText("hello,谢谢关注"); FollowedAutoReplyPage.AddAutoReplyImage(FollowedAutoReplyElement.ImageChoose); FollowedAutoReplyPage.AddAutoReplyNews(FollowedAutoReplyElement.NewsChoose); FollowedAutoReplyPage.AddAutoReplyVideo(FollowedAutoReplyElement.VideoEdit); MobileAndroidDriver.AndroidInitialize(); Mobile_WeChat_Utility.UnFollowWeChatOffcialAccount(); Mobile_WeChat_Utility.FollowWeChatOffcialAccount(); MobileAndroidDriver.GetScreenshot(filePath, "同时添加所有回复素材,video会上传至微信平台"); Assert.IsTrue((Mobile_WeChat_Utility.GetLatestMessage("测试视频10"))); }
public void FaceRanking_QRCode_Available() { string filePath = PortalChromeDriver.CreateFolder(@"拼颜值\检查手机端拼颜值页面下面的二位码是否可以正常使用"); MobileAndroidDriver.AndroidInitialize(); Mobile_WeChat_Utility.FollowWeChatOffcialAccount(); FaceRankingMobilePage_WeChat.ClickFaceRanking(); FaceRankingMobilePage_WeChat.ClickQRCode(); MobileAndroidDriver.GetScreenshot(filePath, "点击二维码是否进入公众号"); Assert.IsTrue(Mobile_WeChat_Utility.IsAtPerName(Mobile.UIElement.FaceRankingMobileElement.Menuitem)); FaceRankingMobilePage_WeChat.ClickFaceRanking(); FaceRankingMobilePage_WeChat.FaceRankingFromFile(SecretRelationshipTest.美男美女); MobileAndroidDriver.GetScreenshot(filePath, "二维码进去公众号后是否能正常使用拼颜值"); Assert.IsTrue(Mobile_WeChat_Utility.IsAtPerXpath(Mobile.UIElement.FaceRankingMobileElement.Comment), "二维码进去公众号后是否能正常使用拼颜值"); }
public void ChitChatSkill_Star_Arena() { MobileAndroidDriver.AndroidInitialize(); Mobile_WeChat_Utility.GetToTestAccount(); Mobile_WeChat_Utility.ClearAllRecord(); Mobile_WeChat_Utility.SendMessage("韩寒和小四谁更火"); Assert.IsTrue(Mobile_WeChat_Utility.GetLatestMessage("郭敬明")); Utility.TurnOff(); Thread.Sleep(60 * 1000); Mobile_WeChat_Utility.ClearAllRecord(); Mobile_WeChat_Utility.SendMessage("韩寒和小四谁更火"); Thread.Sleep(60 * 1000); Mobile_WeChat_Utility.ClearAllRecord(); Mobile_WeChat_Utility.SendMessage("韩寒和小四谁更火"); Assert.IsTrue(!Mobile_WeChat_Utility.GetLatestMessage("郭敬明")); }
public void AddOneLevelMenu_Link() { string filePath = PortalChromeDriver.CreateFolder(@"自定义菜单\添加一级菜单_链接"); MenuPage.AddMenu("一级菜单"); MenuPage.AddMenu_Link_Wait("https://www.google.com"); MobileAndroidDriver.AndroidInitialize(); Mobile_WeChat_Utility.GetToTestAccount(); Mobile_WeChat_Utility.ClickFirstLevelMenu("一级菜单"); MobileAndroidDriver.GetScreenshot(filePath, "是否能成功添加一个一级菜单;在一级菜单里是否能成功设置一个跳转网页;是否能够成功删除所有菜单,点击界面下方的”删除”按钮"); Assert.IsTrue(Mobile_WeChat_Utility.IsAtPerName("Google")); filePath = PortalChromeDriver.CreateFolder(@"自定义菜单\是否能够成功删除所有菜单,点击界面下方的”删除”按钮"); MenuPage.DeleteMenuItem(); Assert.IsFalse(Utility.IsAt(MenuElement.addedMenu, "一级菜单")); }
public void ChitChatSkill_Weather_Sun() { MobileAndroidDriver.AndroidInitialize(); Mobile_WeChat_Utility.GetToTestAccount(); Mobile_WeChat_Utility.ClearAllRecord(); Mobile_WeChat_Utility.SendMessage("北京天气"); Assert.IsTrue(Mobile_WeChat_Utility.GetLatestMessage("℃")); Utility.TurnOff(); Thread.Sleep(60 * 1000); Mobile_WeChat_Utility.ClearAllRecord(); Mobile_WeChat_Utility.SendMessage("北京天气"); Thread.Sleep(60 * 1000); Mobile_WeChat_Utility.ClearAllRecord(); Mobile_WeChat_Utility.SendMessage("北京天气"); Assert.IsTrue(!Mobile_WeChat_Utility.GetLatestMessage("℃")); }
public void Rule_Add_Response_href_script() { string filePath = PortalChromeDriver.CreateFolder(@"自动回复\回复为超链接和脚本"); AutoReplyPage.AddAutoReply("A", "A", "<a href='http://bing.com'>必应</a>"); Assert.IsTrue(Utility.IsAt(AutoReplyElement.ReplyContent.Replace("[{0}]", "[" + 1 + "]"), "http://bing.com")); AutoReplyPage.AddAutoReply("B", "B", "<script>alert(“123”);</script>"); Assert.IsTrue(Utility.IsAt(AutoReplyElement.ReplyContent.Replace("[{0}]", "[" + 1 + "]"), "<script>alert(“123”);</script>")); MobileAndroidDriver.AndroidInitialize(); Mobile_WeChat_Utility.GetToTestAccount(); Mobile_WeChat_Utility.ClearAllRecord(); Mobile_WeChat_Utility.SendMessageWithMenu("A"); PortalChromeDriver.TakeScreenShot(filePath, "关键词为超链接"); Assert.IsTrue(Mobile_WeChat_Utility.GetLatestMessage("必应")); Mobile_WeChat_Utility.ClearAllRecord(); Mobile_WeChat_Utility.SendMessageWithMenu("B"); PortalChromeDriver.TakeScreenShot(filePath, "关键词为脚本"); Assert.IsTrue(Mobile_WeChat_Utility.GetLatestMessage("<script>alert(“123”);</script>")); }
public void Rule_Add_Response_Emoj() { string filePath = PortalChromeDriver.CreateFolder(@"自动回复\添加表情回复"); PortalChromeDriver.ClickElementPerXpath(AutoReplyElement.AddAutoReply); var regulationTextes = PortalChromeDriver.GetElementByClassName(AutoReplyElement.RegulationText); regulationTextes.Clear(); regulationTextes.SendKeys("我是rule"); AutoReplyPage.AddTrigger("trigger", 1 + ""); AutoReplyPage.AddEmoj(); PortalChromeDriver.TakeScreenShot(filePath, "添加表情回复"); Assert.IsTrue(PortalChromeDriver.GetElementByXpath(AutoReplyElement.Emoj).GetAttribute("title") == "微笑"); MobileAndroidDriver.AndroidInitialize(); Mobile_WeChat_Utility.GetToTestAccount(); Mobile_WeChat_Utility.SendMessageWithMenu("trigger"); MobileAndroidDriver.GetScreenshot(filePath, "H5关键词精确匹配"); Assert.IsTrue(Mobile_WeChat_Utility.GetLatestMessage("[平台测试账号2] 说:")); }
public void AddOneLevelMenu_Video() { string filePath = PortalChromeDriver.CreateFolder(@"自定义菜单\添加一级菜单_视频"); MenuPage.AddMenu("一级视频"); MenuPage.AddMenu_Video(); Thread.Sleep(300 * 1000); MobileAndroidDriver.AndroidInitialize(); Mobile_WeChat_Utility.GetToTestAccount(); Mobile_WeChat_Utility.ClickFirstLevelMenu("一级视频"); Thread.Sleep(5 * 1000); MobileAndroidDriver.GetScreenshot(filePath, "添加一级菜单_视频"); Assert.IsTrue((Mobile_WeChat_Utility.GetLatestMessageWithMenu().Text.Contains("测试视频11"))); filePath = PortalChromeDriver.CreateFolder(@"自定义菜单\删除已添加的视频"); MenuPage.Delete(); Thread.Sleep(1 * 1000); Assert.IsTrue(Utility.IsAt(MenuElement.Notification, "菜单项不能为空")); MobileAndroidDriver.GetScreenshot(filePath, "删除已添加的视频"); }
public void AddOneLevelMenu_Image() { string filePath = PortalChromeDriver.CreateFolder(@"自定义菜单\添加一级菜单——文本"); MenuPage.AddMenu("一级图片"); MenuPage.AddMenu_Image(); MobileAndroidDriver.AndroidInitialize(); Mobile_WeChat_Utility.GetToTestAccount(); Mobile_WeChat_Utility.ClearAllRecord(); Mobile_WeChat_Utility.ClickFirstLevelMenu("一级图片"); Thread.Sleep(5 * 1000); MobileAndroidDriver.GetScreenshot(filePath, "添加一级菜单"); Assert.IsTrue(MobileAndroidDriver.IsAt("//android.widget.FrameLayout[contains(@resource-id,'com.tencent.mm:id/a4w')]", "")); filePath = PortalChromeDriver.CreateFolder(@"自定义菜单\删除已添加的图片"); MenuPage.Delete(); Thread.Sleep(1 * 1000); Assert.IsTrue(Utility.IsAt(MenuElement.Notification, "菜单项不能为空")); MobileAndroidDriver.GetScreenshot(filePath, "删除已添加的图片"); }
public void AddOneLevelMenu_Audio() { string filePath = PortalChromeDriver.CreateFolder(@"自定义菜单\添加一级菜单_语音"); MenuPage.AddMenu("一级语音"); MenuPage.AddMenu_Audio(); MobileAndroidDriver.AndroidInitialize(); Mobile_WeChat_Utility.GetToTestAccount(); Mobile_WeChat_Utility.ClearAllRecord(); Mobile_WeChat_Utility.ClickFirstLevelMenu("一级语音"); Thread.Sleep(5 * 1000); MobileAndroidDriver.GetScreenshot(filePath, "添加一级菜单_语音"); Assert.IsTrue(Mobile_WeChat_Utility.GetAudioMessage()); filePath = PortalChromeDriver.CreateFolder(@"自定义菜单\删除已添加的语音"); MenuPage.Delete(); Thread.Sleep(1 * 1000); Assert.IsTrue(Utility.IsAt(MenuElement.Notification, "菜单项不能为空")); MobileAndroidDriver.GetScreenshot(filePath, "删除已添加的语音"); }
public void FaceRanking_Link_Available() { MobileAndroidDriver.AndroidInitialize(); Mobile_WeChat_Utility.FollowWeChatOffcialAccount(); //拼颜值功能是否正常使用 string filePath = PortalChromeDriver.CreateFolder(@"拼颜值\5.检查在手机端”拼颜值“功能是否可以正常使用"); FaceRankingMobilePage_WeChat.ClickFaceRanking(); FaceRankingMobilePage_WeChat.FaceRankingFromFile(SecretRelationshipTest.美女美女); MobileAndroidDriver.GetScreenshot(filePath, "图片显示描述语"); Assert.IsTrue(Mobile_WeChat_Utility.IsAtPerXpath(Mobile.UIElement.FaceRankingMobileElement.Comment), "图片显示描述语"); //分享出去后是否能正常打开 filePath = PortalChromeDriver.CreateFolder(@"拼颜值\16.测试结果是否可以分享"); FaceRankingMobilePage_WeChat.ShareToSomeOne(); FaceRankingMobilePage_WeChat.BackWards(); FaceRankingMobilePage_WeChat.BackWards(); FaceRankingMobilePage_WeChat.BackWards(); FaceRankingMobilePage_WeChat.CheckLinkAvailable(); MobileAndroidDriver.GetScreenshot(filePath, "分享出去后是否能正常打开"); Assert.IsTrue(Mobile_WeChat_Utility.IsAtPerXpath(Mobile.UIElement.FaceRankingMobileElement.Comment), "分享出去后是否能正常打开"); //分享之后能否正常使用 FaceRankingMobilePage_WeChat.FaceRankingFromFile(SecretRelationshipTest.美女美女); MobileAndroidDriver.GetScreenshot(filePath, "分享出去后是否能正常使用"); Assert.IsTrue(Mobile_WeChat_Utility.IsAtPerXpath(Mobile.UIElement.FaceRankingMobileElement.Comment), "分享出去后是否能正常使用"); //再次分享后是否正常打开 FaceRankingMobilePage_WeChat.ShareToSomeOne(); FaceRankingMobilePage_WeChat.CheckLinkAvailable(); MobileAndroidDriver.GetScreenshot(filePath, "第二次分享出去后是否能正常打开"); Assert.IsTrue(Mobile_WeChat_Utility.IsAtPerXpath(Mobile.UIElement.FaceRankingMobileElement.Comment), "分享出去后是否能正常打开"); //二次分享之后能否正常使用 FaceRankingMobilePage_WeChat.FaceRankingFromFile(SecretRelationshipTest.美女美女); MobileAndroidDriver.GetScreenshot(filePath, "第二次分享出去后是否能正常使用"); Assert.IsTrue(Mobile_WeChat_Utility.IsAtPerXpath(Mobile.UIElement.FaceRankingMobileElement.Comment), "第二次分享出去后是否能正常使用"); }
public void TurnOff_AutoReply() { string filePath = PortalChromeDriver.CreateFolder(@"自动回复\关键词自动回复Mobile可用"); AutoReplyPage.AddAutoReply("A", "A", "我是美女"); MobileAndroidDriver.AndroidInitialize(); Mobile_WeChat_Utility.GetToTestAccount(); Mobile_WeChat_Utility.ClearAllRecord(); Mobile_WeChat_Utility.SendMessageWithMenu("A"); Thread.Sleep(2 * 1000); MobileAndroidDriver.GetScreenshot(filePath, "关键词自动回复Mobile可用"); Assert.IsTrue(Mobile_WeChat_Utility.GetLatestMessage("我是美女")); filePath = PortalChromeDriver.CreateFolder(@"自动回复\停用关键词回复Mobile无关键词回复"); AutoReplyPage.TurnOffAutoReply(); Mobile_WeChat_Utility.ClearAllRecord(); Mobile_WeChat_Utility.SendMessageWithMenu("A"); Thread.Sleep(2 * 1000); MobileAndroidDriver.GetScreenshot(filePath, "停用关键词回复Mobile无关键词回复"); Assert.IsFalse(Mobile_WeChat_Utility.GetLatestMessage("我是美女")); }
public void FaceRanking_TurnOff() { MobileAndroidDriver.AndroidInitialize(); Mobile_WeChat_Utility.FollowWeChatOffcialAccount(); FaceRankingMobilePage_WeChat.ClickFaceRanking(); FaceRankingMobilePage_WeChat.FaceRankingFromFile(SecretRelationshipTest.美男美女); string filePath = PortalChromeDriver.CreateFolder(@"拼颜值\14.检查是否可以正常关闭”拼颜值“的功能"); MobileAndroidDriver.GetScreenshot(filePath, "关闭前拼颜值正常使用,图片显示描述语"); Assert.IsTrue(Mobile_WeChat_Utility.IsAtPerXpath(Mobile.UIElement.FaceRankingMobileElement.Comment), "关闭前拼颜值正常使用,图片显示描述语"); //停用拼颜值 Utility.TurnOff();; string turnOffPath = PortalChromeDriver.CreateFolder(@"拼颜值\19.是否可以停用'拼颜值'功能"); PortalChromeDriver.TakeScreenShot(turnOffPath, "Portal是否能正常关闭拼颜值"); Assert.IsTrue(!Utility.IsTurnOn(), "Portal是否能正常关闭拼颜值"); FaceRankingMobilePage_WeChat.BackWards(); FaceRankingMobilePage_WeChat.ClickFaceRanking(); MobileAndroidDriver.GetScreenshot(filePath, "关闭拼颜值技能后H5端是否能正常使用"); Assert.IsFalse(Mobile_WeChat_Utility.IsAt(Mobile.UIElement.FaceRankingMobileElement.AccountFaceRanking), "关闭拼颜值技能后H5端是否能正常使用"); }
public void FollowedAutoReply_Add_Delete_Edit_Video() { string filePath = PortalChromeDriver.CreateFolder(@"被关注自动回复\添加删除修改视频回复"); FollowedAutoReplyPage.AddAutoReplyVideo(FollowedAutoReplyElement.VideoChoose); PortalChromeDriver.TakeScreenShot(filePath, "添加"); Assert.IsTrue(Utility.IsAt(FollowedAutoReplyElement.AddedVideo, "测试视频11"), "添加视频回复"); MobileAndroidDriver.AndroidInitialize(); Mobile_WeChat_Utility.UnFollowWeChatOffcialAccount(); Mobile_WeChat_Utility.FollowWeChatOffcialAccount(); Thread.Sleep(5 * 1000); MobileAndroidDriver.GetScreenshot(filePath, "验证添加回复"); Assert.IsTrue((Mobile_WeChat_Utility.GetLatestMessage("测试视频11")), "验证添加回复"); FollowedAutoReplyPage.Delete(); PortalChromeDriver.TakeScreenShot(filePath, "删除视频回复"); Assert.IsFalse(Utility.IsAt(FollowedAutoReplyElement.AddedVideo, "测试视频11"), "删除视频回复"); FollowedAutoReplyPage.AddAutoReplyVideo(FollowedAutoReplyElement.VideoEdit); Thread.Sleep(2 * 1000); PortalChromeDriver.TakeScreenShot(filePath, "修改音频回复"); Assert.IsTrue(Utility.IsAt(FollowedAutoReplyElement.AddedVideo, "测试视频10"), "修改音频回复"); }