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'"); }
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'"); }
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'"); }
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'"); }
public static void ClickOn(IWebElement element) { MyDriverManager.waitForElement(element); element.Click(); }
public static void EnterText(string input, IWebElement element) { MyDriverManager.waitForElement(element); element.SendKeys(input); }