public static void AddComment(String comment) { var textarea = SeleniumGetMethods.GetWebElementByName("ctl00$MainContent$AddMessageLoginView$MessageTB"); textarea.Clear(); textarea.SendKeys(comment); var addCommentButton = SeleniumGetMethods.GetWebElementByAttribut("value", "Adauga comentariu"); addCommentButton.Click(); }
public static void EditeComment(String originalComment, String newComment, bool append) { var commentRootElem = SeleniumGetMethods.Parent(SeleniumGetMethods.GetWebElementInnerHTML(originalComment)); var childs = SeleniumGetMethods.GetChilds(commentRootElem); var editeButton = SeleniumGetMethods.GetFirstChild(SeleniumGetMethods.GetFirstChild((IWebElement)childs[3])); editeButton.Click(); var textarea = SeleniumGetMethods.GetWebElementByName("ctl00$MainContent$AddMessageLoginView$EditMessageTB"); if (!append) { textarea.Clear(); } else { } textarea.SendKeys(newComment); var addCommentButton = SeleniumGetMethods.GetWebElementByAttribut("value", "Salveaza"); addCommentButton.Click(); }