public void DownLoadReportsFunds()
 {
     try
     {
         test = extent.CreateTest("DownLoadReportsFunds").Info("Test Started");
         AssetSummaryPage funds = new AssetSummaryPage(BaseTest.driver);
         //Verify download works for Fund A
         Thread.Sleep(3000);
         funds.SelectFundsFromDropdwon();
         funds.ClickAssetSummary();
         funds.DownloadReportForFunds();
         Thread.Sleep(3000);
         funds.ClickFundBTab();
         driver.Navigate().Refresh();
         funds.ClickAssetSummary();
         funds.DownloadReportForFunds();
         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();
     }
 }
        public void verifyChangeViewWorksForFundA_B()
        {
            try
            {
                test = extent.CreateTest("verifyChangeViewWorksForFundA_B").Info("Test Started");
                AssetSummaryPage funds = new AssetSummaryPage(BaseTest.driver);
                funds.SelectFundsFromDropdwon();
                funds.ClickAssetSummary();
                //Verify user can switch to list view
                Boolean lview = funds.ChangeToListView();
                Assert.IsTrue(lview == true, "View not changed to list view");
                driver.Navigate().Refresh();
                Thread.Sleep(5000);

                //Verify switch view works on fund B
                funds.ClickFundBTab();
                driver.Navigate().Refresh();
                funds.ClickAssetSummary();
                Boolean cview = funds.ChangeToCardView();
                Assert.IsTrue(cview == true, "View not changed to card view");
                funds.ClickFundATab();
                test.Log(Status.Pass, "Test Case passed");
            }
            catch (Exception e)
            {
                test.Log(Status.Fail, "Test Case Failed");
                baseTest.TakeScreenshot();
                Console.WriteLine(e.StackTrace);
            }
        }
        public void SearchWorksForBothTheFunds()
        {
            try
            {
                test = extent.CreateTest("SearchWorksForBothTheFunds").Info("Test Started");
                AssetSummaryPage funds = new AssetSummaryPage(BaseTest.driver);
                //Verify search works on fund A
                funds.SelectFundsFromDropdwon();
                funds.ClickAssetSummary();
                int countbeforesearchA = funds.RowsBeforeSearch();
                int countaftersearchA  = funds.RowsafterSearchForProperty();
                Assert.IsTrue(countbeforesearchA > countaftersearchA, "Search does not work");

                //Verify search works on fund B
                funds.ClickFundBTab();
                driver.Navigate().Refresh();
                funds.ClickAssetSummary();
                int countbeforesearchB = funds.RowsBeforeSearch();
                int countaftersearchB  = funds.RowsafterSearchForProperty();
                Assert.IsTrue(countbeforesearchB > countaftersearchB, "Search does not work");
                test.Log(Status.Pass, "Test Case passed");
            }
            catch (Exception e)
            {
                test.Log(Status.Fail, "Test Case Failed");
                baseTest.TakeScreenshot();
                Console.WriteLine(e.StackTrace);
            }
        }
        public void NavigationFromFundsToAssetSummary()
        {
            try
            {
                test = extent.CreateTest("NavigationFromFundsToAssetSummary").Info("Test Started");
                AssetSummaryPage funds = new AssetSummaryPage(BaseTest.driver);
                funds.SelectFundsFromDropdwon();
                funds.ClickAssetSummary();
                //Verify user navigates to property details from asset summary Fund A
                String title = funds.NavigateToPropertyDetails();
                Assert.AreEqual("Asset Summary", title, "User lands on Asset Summary Screen");
                Boolean res = funds.NavigateToAssetSummaryBack();
                Assert.IsTrue(res == true, "User does not navigated back to asset summary detail");

                //Verify user navigates to property details from asset summary Fund B
                String title1 = funds.NavigateToPropertyDetails();
                Assert.AreEqual("Asset Summary", title1, "User lands on Asset Summary Screen");
                Boolean res1 = funds.NavigateToAssetSummaryBack();
                Assert.IsTrue(res1 == true, "User does not navigated back to asset summary detail");
                test.Log(Status.Pass, "Test Case passed");
            }
            catch (Exception e)
            {
                test.Log(Status.Fail, "Test Case Failed");
                baseTest.TakeScreenshot();
                Console.WriteLine(e.StackTrace);
            }
        }
        public void VerifySortbyWorks()
        {
            try
            {
                test = extent.CreateTest("VerifySortbyWorks").Info("Test Started");
                AssetSummaryPage funds = new AssetSummaryPage(BaseTest.driver);
                funds.SelectFundsFromDropdwon();
                funds.ClickAssetSummary();
                //Verify Sort By for Fund A
                funds.ClickOptionsInSortBy();
                //Verify descending works as expected
                Boolean desc = funds.SelectDescending();
                Assert.True(desc == true, "Descending does not work");
                Thread.Sleep(3000);
                //Verify Ascending works as expected
                Boolean Asc = funds.SelectAscending();
                Assert.True(Asc == true, "Ascending does not work");

                //Verify sort by works for Fund B
                funds.ClickFundBTab();
                driver.Navigate().Refresh();
                funds.ClickAssetSummary();
                funds.ClickOptionsInSortBy();
                Boolean desc1 = funds.SelectDescending();
                Assert.True(desc1 == true, "Descending does not work");
                Boolean Asc1 = funds.SelectAscending();
                Assert.True(Asc1 == true, "Ascending does not work");
                test.Log(Status.Pass, "Test Case passed");
            }
            catch (Exception e)
            {
                test.Log(Status.Fail, "Test Case Failed");
                baseTest.TakeScreenshot();
                Console.WriteLine(e.StackTrace);
            }
        }