Пример #1
0
        public void SwitchingBetweenViewsOnOngoingandSoldDeals()
        {
            try
            {
                test = extent.CreateTest("SwitchingBetweenViewsOnOngoingandSoldDeals").Info("Test Started");
                IMTRLandingPage    imtr       = new IMTRLandingPage(BaseTest.driver);
                NavigationMenuPage navigation = new NavigationMenuPage(BaseTest.driver);
                navigation.ClickMainMenu();
                navigation.ClickTrackRecordOption();

                //Verify change view works for ongoing deals
                imtr.ClickOngoingDeals();
                Thread.Sleep(2000);
                Boolean lview = imtr.ChangeToListView();
                Assert.IsTrue(lview == true, "List View is not displayed");

                //Verify change view works for sold deals
                Thread.Sleep(3000);
                imtr.ClickSoldDeals();
                Boolean cview = imtr.ChangeToCardView();
                Assert.IsTrue(cview == true, "card View is not displayed");
                test.Log(Status.Pass, "Test Case Passed");
            }
            catch (Exception e)
            {
                test.Log(Status.Fail, "Test Case Failed");
                baseTest.TakeScreenshot();
                Console.WriteLine(e.StackTrace);
                driver.Quit();
            }
        }