Exemple #1
0
        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 EditReply_AutoReply_Weibo()
        {
            string filePath = PortalChromeDriver.CreateFolder(@"自动回复\编辑关键词回复");

            WeChatManagermentPage.GoTo_AutoReply_Page();
            PortalChromeDriver.ClickElementPerXpath(AutoReplyElement.KeyWordsReply);
            AutoReplyPage.TurnOnAutoReply();
            AutoReplyPage.ClearReply();
            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_Weibo();
            Mobile_Weibo_Utility.Follow();
            Mobile_Weibo_Utility.ClearAllMessage();
            Mobile_Weibo_Utility.SendMessage("修改的Trigger");
            MobileAndroidDriver.GetScreenshot(filePath, "H5关键词精确匹配");
            Assert.IsTrue(Mobile_WeChat_Utility.IsAtPerName("[啊_荀] 说:修改的Reply"));
        }