public static void AddTrigger(string trigger, string count) { try { PortalChromeDriver.ClickElementPerXpath(AutoReplyElement.AddTrigger); var triggerInput = PortalChromeDriver.GetElementByXpathByClassName(AutoReplyElement.AddTriggerParent.Replace("{0}", count), AutoReplyElement.AddTriggerInput); triggerInput.Clear(); triggerInput.SendKeys(trigger); } catch (Exception e) { } }
public static void EditTriger(String trigger) { try { //PortalChromeDriver.ClickElementPerXpath(AutoReplyElement.entity_expand); PortalChromeDriver.ClickElementPerXpath(AutoReplyElement.EditTrigger); var regulationTextes = PortalChromeDriver.GetElementByXpathByClassName(AutoReplyElement.AddTriggerParent.Replace("{0}", 1 + ""), AutoReplyElement.AddTriggerInput); regulationTextes.Click(); regulationTextes.Clear(); regulationTextes.SendKeys(trigger); PortalChromeDriver.ClickElementPerXpath(AutoReplyElement.SaveButton); Thread.Sleep(2 * 1000); } catch (Exception e) { } }
public static void EditRule(String rule) { try { PortalChromeDriver.ClickElementPerXpath(AutoReplyElement.entity_expand); PortalChromeDriver.ClickElementPerXpath(AutoReplyElement.EditRule); var regulationTextes = PortalChromeDriver.GetElementByXpathByClassName(AutoReplyElement.RegulationTextParent, AutoReplyElement.RegulationText); regulationTextes.Click(); regulationTextes.Clear(); regulationTextes.SendKeys(rule); PortalChromeDriver.ClickElementPerXpath(AutoReplyElement.SaveButton); System.Threading.Thread.Sleep(2 * 1000); } catch (Exception e) { } }