public string GetPrompt(IWebElement loadWaitElement, string loadWaitString, string containerType)
        {
            SetDriverTime(2);
            try
            {
                string prompt;
                SeleniumHelperMethods.LoadWait(DriverContext.Driver, loadWaitElement, loadWaitString);
                try
                {
                    prompt = containerType == MessageContainer.DialogeContainer
                        ? dialogueContainerElem.Text
                        : toastContainer.Text;
                }
                catch (NoSuchElementException)
                {
                    prompt = toastContainer.Text;
                    return(prompt);
                }

                prompt = prompt.Trim();
                if (containerType == MessageContainer.DialogeContainer)
                {
                    prompt = prompt.Substring(10);
                }
                SetDriverTime(30);
                return(prompt);
            }


            catch (Exception e)
            {
                return(e.Message.Trim());
            }
        }
Esempio n. 2
0
 public void SearchMailboxUsingEmail(string email)
 {
     btnToggle.Click();
     txtEmailAddress.SendKeys(email);
     Thread.Sleep(2000);
     btnAdvanceSearch.Click();
     SeleniumHelperMethods.LoadWait(DriverContext.Driver, headerProgressElem, headerProgressElemBy);
     Thread.Sleep(2000);
 }