Ejemplo n.º 1
0
        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();
        }
Ejemplo n.º 2
0
        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();
        }