コード例 #1
0
        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);
            }
        }