Пример #1
0
        public void waitForPageToLoad()
        {
            for (int i = 0; i < 2; i++)
            {
                try
                {
                    MyDriverManager.waitForElement(header);
                }
                catch (Exception e)
                {
                    //This should loop back to try again
                }
            }

            string actualHeaderText = getHeaderText();

            Assert.IsTrue(actualHeaderText.Contains("IN DRAFT"), actualHeaderText + "does NOT contain 'In Draft'");
        }
Пример #2
0
        public void waitForPageToLoadacp()
        {
            for (int i = 0; i < 2; i++)
            {
                try
                {
                    MyDriverManager.waitForElement(header);
                }
                catch (Exception e)
                {
                    //This should loop back to try again
                }
            }

            string actualHeaderText = getHeaderText();

            Assert.IsTrue(actualHeaderText.Contains("SEND CUSTOMER ADVANCED PRICING TO CUSTOMER"), actualHeaderText + "does NOT contain 'SEND CUSTOMER ADVANCED PRICING TO CUSTOMER'");
        }
Пример #3
0
        public void waitForPageToLoad()
        {
            for (int i = 0; i < 2; i++)
            {
                try
                {
                    MyDriverManager.waitForElement(header);
                    break;
                }
                catch (Exception e)
                {
                    //this should loop back and try again if it fails to find the element
                }
            }
            string actualText = getHeaderText();

            Assert.IsTrue(actualText.Equals("MANAGER APPROVAL"), actualText + "'does NOT equal MANAGER APPROVAL'");
        }
Пример #4
0
        public void waitForPageToLoad()
        {
            //Waits for the time specified in AppConfig for the header to appear (currently 20 seconds)
            //To allow for slow performance, it will try twice before failing.
            for (int i = 0; i < 2; i++)
            {
                try
                {
                    MyDriverManager.waitForElement(header);
                    break;
                }

                catch (Exception e)
                {
                    //This should allow the for loop to continue so it tries again
                }
            }
            string actualHeaderText = getHeaderText();

            Assert.IsTrue(actualHeaderText.Contains("SELECT COMPANY"), actualHeaderText + " doesn't contain 'SELECT COMPANY'");
        }
Пример #5
0
 public static void ClickOn(IWebElement element)
 {
     MyDriverManager.waitForElement(element);
     element.Click();
 }
Пример #6
0
 public static void EnterText(string input, IWebElement element)
 {
     MyDriverManager.waitForElement(element);
     element.SendKeys(input);
 }