public void AddReply_AddReply_Total_5_AllText() { string filePath = PortalChromeDriver.CreateFolder(@"自动回复\添加5个文字reply"); PortalChromeDriver.ClickElementPerXpath(AutoReplyElement.AddAutoReply); var regulationTextes = PortalChromeDriver.GetElementByClassName(AutoReplyElement.RegulationText); regulationTextes.Clear(); regulationTextes.SendKeys("这是rule"); AutoReplyPage.AddTrigger(1 + "", 1 + ""); Assert.IsFalse(Utility.IsAt(AutoReplyElement.TrigerContent.Replace("[{0}]", "[" + 1 + "]"), 1 + "")); for (int i = 1; i <= 5; i++) { AutoReplyPage.AddReply_Text(i + "", i + ""); Thread.Sleep(3 * 1000); PortalChromeDriver.ClickElementPerXpath("/html/body/div/div[2]/div[2]/div[2]/div/div[1]/div[1]/div[2]/span"); Assert.IsTrue(Utility.IsAt(AutoReplyElement.ReplyContent.Replace("[{0}]", "[" + i + "]"), i + "")); } PortalChromeDriver.TakeScreenShot(filePath, "添加5个文字reply"); AutoReplyPage.AddReply_Text(6 + "", 6 + ""); Assert.IsFalse(Utility.IsAt(AutoReplyElement.ReplyContent.Replace("[{0}]", "[" + 6 + "]"), 6 + "")); }