[Fact]      //Admin_20
        public void VerifyAccountDetailsTabShowAllRelevantAccountInfo()
        {
            try
            {
                string accountId;
                string USDCurrency;
                string USDAmount;
                string commentValue;
                string amountField;
                string expectedAmount;
                string actualAmount;

                accountId    = TestData.GetData("TCAdmin4_UserAccountID");
                USDCurrency  = TestData.GetData("USDCurrency");
                USDAmount    = TestData.GetData("USDAmount");
                commentValue = TestData.GetData("TC41_Comment");
                amountField  = TestData.GetData("TCAdmin4_AmountField");

                AdminFunctions       adminfunctions       = new AdminFunctions(TestProgressLogger);
                AdminCommonFunctions admincommonfunctions = new AdminCommonFunctions(TestProgressLogger);
                AdminAccountsPage    adminAccountPage     = new AdminAccountsPage(TestProgressLogger);

                // login in admin
                adminfunctions.AdminLogIn(TestProgressLogger, Const.ADMIN1);

                // Navigate on Accounts page.
                admincommonfunctions.SelectAccountsMenu();
                admincommonfunctions.SelectAccountsTab();
                TestProgressLogger.LogCheckPoint(LogMessage.NavigateAccountPage);

                // Click on ViewAll and search by accountid and double click.
                adminAccountPage.ClickOnViewAll(driver);
                adminAccountPage.SearchByAccountID(driver, accountId);
                adminAccountPage.DoubleClickOnAccountName(driver, accountId);
                TestProgressLogger.LogCheckPoint(string.Format(LogMessage.NavigateAccountPage, accountId));

                // Verify labels under account details section.
                adminAccountPage.VerifyLabelUnderAccountDetailsSection();
                TestProgressLogger.LogCheckPoint(LogMessage.VerifyLabelsUnderAccountDetailsSection);

                // Verify labels under balances section.
                adminAccountPage.VerifyLabelsUnderBalancesSection();
                TestProgressLogger.LogCheckPoint(LogMessage.VerifyLabelsUnderBalancesSection);

                // Get balances of usd before credit amount.
                Dictionary <string, string> balancesData = adminAccountPage.GetBalances(driver, USDCurrency);

                // Credit usd amount using submit ledger entry.
                adminAccountPage.ClickOnSubmitLedgerEntryButton();
                adminAccountPage.CreditAmountInSubmintLedgerEntryModal(USDCurrency, USDAmount, commentValue);
                TestProgressLogger.LogCheckPoint(LogMessage.CreditAmountBySubmitLedgerEntry);

                // Get balances of usd after credit amount.
                adminAccountPage.ClickOnRefreshInUserAccountSection(driver);
                Dictionary <string, string> afterSubmitLedgerBalancesData = adminAccountPage.GetBalances(driver, USDCurrency);

                // Verify increased usd amount after credit by submit ledger entry.
                expectedAmount = GenericUtils.GetSumFromStringAfterAddition(balancesData.GetValueOrDefault(amountField), USDAmount);
                actualAmount   = GenericUtils.ConvertStringToDecimalFormat(afterSubmitLedgerBalancesData.GetValueOrDefault(amountField));
                Assert.Equal(expectedAmount, GenericUtils.RemoveCommaFromString(actualAmount));
                TestProgressLogger.LogCheckPoint(LogMessage.VerifyCreditedUSDAmount);

                // Verify all ticket ids in Decending order.
                Assert.True(adminAccountPage.VerifyTicketsIdInDecendingOrder());

                // Verify all ticket ids in ascending order.
                Assert.True(adminAccountPage.VerifyTicketsIdInAscendingOrder());

                // Logout from admin.
                admincommonfunctions.UserMenuBtn();
                adminfunctions.AdminLogOut();
            }
            catch (NoSuchElementException ex)
            {
                TestProgressLogger.TakeScreenshot();
                TestProgressLogger.LogCheckPoint(ex.Message + ex.StackTrace);
                TestProgressLogger.LogError(LogMessage.AccountDetailsTabShowAllRelevantAccountInfoTestFailed, ex);
                throw;
            }
            catch (Exception e)
            {
                TestProgressLogger.TakeScreenshot();
                TestProgressLogger.LogCheckPoint(e.Message + e.StackTrace);
                TestProgressLogger.LogError(LogMessage.AccountDetailsTabShowAllRelevantAccountInfoTestFailed, e);
                throw e;
            }
            finally
            {
                TestProgressLogger.EndTest();
            }
        }
        [Fact]      //Admin_8
        public void VerifyOpenOrderUnderOMSOpenOrders()
        {
            try
            {
                string accountId;
                string instrument;
                string buyTab;
                string buyOrderSize;
                string limitPrice;
                string timeInForce;
                string quantity;
                string price;

                instrument   = TestData.GetData("Instrument");
                limitPrice   = TestData.GetData("TCAdmin8_LimitPrice");
                timeInForce  = TestData.GetData("TimeInForce");
                buyTab       = TestData.GetData("BuyTab");
                buyOrderSize = TestData.GetData("TCAdmin8_BuyOrderSize");
                accountId    = TestData.GetData("TCAdmin4_UserAccountID");
                quantity     = TestData.GetData("TCAdmin8_QunatityField");
                price        = TestData.GetData("TCAdmin8_PriceField");

                AdminFunctions       adminfunctions       = new AdminFunctions(TestProgressLogger);
                AdminCommonFunctions admincommonfunctions = new AdminCommonFunctions(TestProgressLogger);
                AdminAccountsPage    adminAccountPage     = new AdminAccountsPage(TestProgressLogger);
                UserFunctions        userFunctions        = new UserFunctions(TestProgressLogger);
                UserCommonFunctions  userCommonFunction   = new UserCommonFunctions(TestProgressLogger);

                // Place sell order to set up market
                userFunctions.LogIn(TestProgressLogger, Const.USER17);
                userCommonFunction.CancelAndPlaceLimitBuyOrder(driver, instrument, buyTab, buyOrderSize, limitPrice, timeInForce);
                TestProgressLogger.LogCheckPoint(LogMessage.PlaceBuyOrder);

                // login in admin
                adminfunctions.AdminLogIn(TestProgressLogger, Const.ADMIN1);

                // Navigate on Accounts page.
                admincommonfunctions.SelectAccountsMenu();
                admincommonfunctions.SelectAccountsTab();
                TestProgressLogger.LogCheckPoint(LogMessage.NavigateAccountPage);

                // Click on ViewAll and search by accountid and double click.
                adminAccountPage.ClickOnViewAll(driver);
                adminAccountPage.SearchByAccountID(driver, accountId);
                adminAccountPage.DoubleClickOnAccountName(driver, accountId);
                TestProgressLogger.LogCheckPoint(string.Format(LogMessage.NavigateAccountPage, accountId));

                // Verify price and quantity under open order section.
                Dictionary <string, string> orderData = adminAccountPage.GetOpenOrdersInAccountsPage(driver);
                Assert.Equal(GenericUtils.ConvertStringToDecimalFormat(buyOrderSize), orderData.GetValueOrDefault(quantity));
                Assert.Equal(limitPrice, orderData.GetValueOrDefault(price));
                TestProgressLogger.LogCheckPoint(LogMessage.VerifyPriceAndQuantityInOpenOrder);

                // Click on showall link under open order section.
                adminAccountPage.ClickShowAllUnderOpenOrderSection(driver);

                // Verify price and quantity in account order page.
                Dictionary <string, string> orderDataAccountOrder = adminAccountPage.GetPriceAndQuantityInAccountOrderPage(driver);
                Assert.Equal(GenericUtils.ConvertStringToDecimalFormat(buyOrderSize), orderDataAccountOrder.GetValueOrDefault(quantity));
                Assert.Equal(limitPrice, orderDataAccountOrder.GetValueOrDefault(price));
                TestProgressLogger.LogCheckPoint(LogMessage.VerifyPriceAndQuantityInAccountOrder);

                // Logout from admin.
                admincommonfunctions.UserMenuBtn();
                adminfunctions.AdminLogOut();
            }
            catch (NoSuchElementException ex)
            {
                TestProgressLogger.TakeScreenshot();
                TestProgressLogger.LogCheckPoint(ex.Message + ex.StackTrace);
                TestProgressLogger.LogError(LogMessage.VerifyOpenOrderUnderOMSOpenOrdersTestFailed, ex);
                throw;
            }
            catch (Exception e)
            {
                TestProgressLogger.TakeScreenshot();
                TestProgressLogger.LogCheckPoint(e.Message + e.StackTrace);
                TestProgressLogger.LogError(LogMessage.VerifyOpenOrderUnderOMSOpenOrdersTestFailed, e);
                throw e;
            }
            finally
            {
                TestProgressLogger.EndTest();
            }
        }