Example #1
0
        /// <summary>
        /// Desc : Update Status
        /// </summary>
        /// <param name="status"></param>
        public bool AddWhatIsInYourMind(string status)
        {
            try
            {
                Utils.driver.FindElement(By.LinkText("Home")).Click();
                StatusInput.DoClick();
                StatusInput.SendChar(status);

                if (EmojiButton.Displayed)
                {
                    EmojiButton.Click();
                }

                EmojiType.Click();
                StatusInput.Click();
                PostButton.Click();
                System.Threading.Thread.Sleep(3000);
                if (Utils.driver.FindElements(By.XPath("//p[contains(text(),'" + status + "')]")).Count > 0)
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            catch (Exception)
            {
                return(false);
            }
        }
Example #2
0
        /// <summary>
        /// Desc : Update Status
        /// </summary>
        /// <param name="status"></param>
        public bool AddWhatIsInYourMind(string status)
        {
            try
            {
                Utils.driver.FindElement(By.LinkText("Home")).Click();

                var textArea = Utils.driver.FindElements(By.XPath("//textarea[contains(@title,'Write something here')]"));
                if (textArea.Count > 0)
                {
                    textArea[0].Click();
                }
                else
                {
                    StatusInput.DoClick();
                }

                StatusInput.SendChar(status);

                if (EmojiButton.Displayed)
                {
                    EmojiButton.Click();
                }

                EmojiType.Click();
                StatusInput.Click();
                PostButton.Click();
                System.Threading.Thread.Sleep(3000);
                if (Utils.driver.FindElements(By.XPath("//p[contains(text(),'" + status + "')]")).Count > 0)
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            catch (Exception ex)
            {
                ex.ToString();
                return(false);
            }
        }