Example #1
0
        public void EndReport()
        {
            AssistFunctions assistFunc = new AssistFunctions();

            extent.Flush();
            assistFunc.killProcess("ChromeDriver");
        }
Example #2
0
        public void StartReport()
        {
            AssistFunctions assistFunc = new AssistFunctions();

            extent = new ExtentReports();
            assistFunc.Extent(extent);

            ExcelLib.PopulateInCollection(@"C:\Users\Tzahi.Ben\Documents\Visual Studio 2015\Projects\GalaCasino\GalaCasino\Data.xlsx");
        }
Example #3
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);
            }
        }
Example #4
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);
            }
        }
Example #5
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);
            }
        }