Ejemplo n.º 1
0
        public static void Citeaza(String text)
        {
            var citeaza = SeleniumGetMethods.GetWebElementByName("ctl00$MainContent$MessageListView$ctrl0$QuoteLoginView$QuoteMessageButton");

            citeaza.Click();
            AddComment(text);
        }
Ejemplo n.º 2
0
        public static void SearchContent(String content)
        {
            var continutText = SeleniumGetMethods.GetWebElementByName("ctl00$MainContent$MessageDescriptionTB");

            continutText.SendKeys(content);
            var cautaButton = SeleniumGetMethods.GetWebElementByName("ctl00$MainContent$Button2");

            cautaButton.Click();
        }
Ejemplo n.º 3
0
        public static void SearchAutor(String autor)
        {
            var autorText = SeleniumGetMethods.GetWebElementByName("ctl00$MainContent$MessageUserTB");

            autorText.SendKeys(autor);
            var cautaButton = SeleniumGetMethods.GetWebElementByName("ctl00$MainContent$Button2");

            cautaButton.Click();
        }
Ejemplo n.º 4
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.º 5
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();
        }