Exemple #1
0
        public void Test_case()
        {
            rep  = ExtentManager.getInstance();
            test = rep.CreateTest("TestCase", "This Test will make sure that faux wood blinds can be carted and edited properly");


            openBrowser("Chrome");
            Navigate("appurl");
            Click("Blinds");
            Click("FauxWoodBlinds");
            Click("BuildYourBlinds");
            System.Threading.Thread.Sleep(5000);
            Click("ChooseYourRoom_Kitchen");
            Type("WindowName", "Kitchen");
            Click("Mount");
            Click("SlatSize_1");

            Click("Color_White");


            Click("AddCart");

            String price1 = driver.FindElement(By.XPath("//*[@class='bdc-cart-item-unit-price']")).Text.Trim();

            Console.WriteLine(price1);

            string int_Price1 = price1.Remove(0, 1);

            Console.WriteLine(int_Price1);

            var i = Convert.ToDecimal(int_Price1);

            Console.WriteLine(int_Price1);

            Click("MakeChanges");
            System.Threading.Thread.Sleep(5000);
            DropDown("Width", "65");
            Click("AddCart");

            String price2 = driver.FindElement(By.XPath("//*[@class='bdc-cart-item-unit-price']")).Text.Trim();

            Console.WriteLine(price2);

            string int_Price2 = price2.Remove(0, 1);

            Console.WriteLine(int_Price2);

            var j = Convert.ToDecimal(int_Price2);

            Console.WriteLine(int_Price2);

            if (j > i)
            {
                reportPass("The Price increases as expected when the width is increased.");
            }
        }
Exemple #2
0
        public void BeforeAll()
        {
            Config.SetUIEnvVariables();
            ExtentManager.GetReporter();

            //Re-map the interface
            Locator.Instance.Load("\\Resources\\Selector.json");
            Locator.Instance.setMap("TrelloLoginPageDesk", "TrelloLoginPage");
            Locator.Instance.setMap("TrelloLoginPageMobile", "TrelloLoginPage");
        }
Exemple #3
0
 /// <summary>
 /// constructor to invoked the tester choiced browser.
 /// </summary>
 /// <param name="browser">browser name</param>
 public Hooks(String browser)
 {
     if (browser.ToLower().Contains("chrome"))
     {
         _browserType = BrowserType.Chrome;
     }
     else if (browser.ToLower().Contains("ie"))
     {
         _browserType = BrowserType.IE;
     }
     else if (browser.ToLower().Contains("firefox"))
     {
         _browserType = BrowserType.Firefox;
     }
     Report = ExtentManager.GetInstance();
     ChooseDriverInstance(_browserType);
 }
Exemple #4
0
 public void AfterAll()
 {
     ExtentManager.FlushReporter();
 }
Exemple #5
0
 protected void Initialization()
 {
     driverPerTestId = new Dictionary <string, IWebDriver>();
     report          = ExtentManager.GetInstance();
 }
 public void BeforeClass()
 {
     extentReports = ExtentManager.getReport();
     LogHelpers.CreateLogFile(ExtentManager.reportPath);
 }