Exemple #1
0
        public static void IsElementExist(this IWebElement element, ExtentTest reporter)
        {
            AssistFunctions assistFunc = new AssistFunctions();

            try
            {
                System.Threading.Thread.Sleep(2000);
                new WebDriverWait(PropertiesCollection.driver, TimeSpan.FromSeconds(4)).Until(ExpectedConditions.ElementToBeClickable(element));
            }
            catch (Exception e)
            {
                assistFunc.ChangeReporterStatusToFail(reporter, e);
            }
        }
Exemple #2
0
        public static void GoToURL(string URL, ExtentTest reporter)
        {
            AssistFunctions assistFunc = new AssistFunctions();

            try
            {
                System.Threading.Thread.Sleep(2000);
                PropertiesCollection.driver.Navigate().GoToUrl(URL);
            }
            catch (Exception e)
            {
                assistFunc.ChangeReporterStatusToFail(reporter, e);
            }
        }
Exemple #3
0
        public static void VerifyTextIdentical(this IWebElement element, string value, ExtentTest reporter)
        {
            AssistFunctions assistFunc = new AssistFunctions();

            try
            {
                System.Threading.Thread.Sleep(2000);
                new WebDriverWait(PropertiesCollection.driver, TimeSpan.FromSeconds(4)).Until(ExpectedConditions.ElementToBeClickable(element));
                Assert.That(element.Text, Is.EqualTo(value));
            }
            catch (Exception e)
            {
                assistFunc.ChangeReporterStatusToFail(reporter, e);
            }
        }