コード例 #1
0
        public void TC46_VerifyDeleteAPIKey()
        {
            UserFunctions   userFunctions    = new UserFunctions(TestProgressLogger);
            UserSettingPage userSettingsPage = new UserSettingPage(driver, TestProgressLogger);

            try
            {
                TestProgressLogger.StartTest();
                userFunctions.LogIn(TestProgressLogger, Const.USER2);
                Assert.True(userSettingsPage.DeleteAPIKey(driver), LogMessage.DeleteAPIKeySuccessMsg);
                TestProgressLogger.LogCheckPoint(String.Format(LogMessage.DeleteAPIKeySuccessMsg));
            }
            catch (Exception e)
            {
                TestProgressLogger.TakeScreenshot();
                TestProgressLogger.LogError(LogMessage.DeleteAPIKeyFailureMsg, e);
                throw e;
            }
            finally
            {
                TestProgressLogger.EndTest();
                UserFunctions userFunctionality = new UserFunctions(TestProgressLogger);
                userFunctionality.LogOut();
            }
        }
コード例 #2
0
        public void TC46_VerifyDeleteAPIKey()
        {
            UserFunctions   userFunctions    = new UserFunctions(TestProgressLogger);
            UserSettingPage userSettingsPage = new UserSettingPage(driver, TestProgressLogger);

            try
            {
                TestProgressLogger.StartTest();
                // Login as user -> Create and Delete the API Key
                userFunctions.LogIn(TestProgressLogger, Const.USER2);
                Assert.True(userSettingsPage.DeleteAPIKey(driver), LogMessage.DeleteAPIKeyFailureMsg);
                TestProgressLogger.LogCheckPoint(String.Format(LogMessage.DeleteAPIKeySuccessMsg));
            }
            catch (NoSuchElementException ex)
            {
                TestProgressLogger.TakeScreenshot();
                TestProgressLogger.LogCheckPoint(ex.Message + ex.StackTrace);
                TestProgressLogger.LogError(LogMessage.DeleteAPIKeyFailureMsg, ex);
                throw ex;
            }
            catch (Exception e)
            {
                TestProgressLogger.TakeScreenshot();
                TestProgressLogger.LogCheckPoint(e.Message + e.StackTrace);
                TestProgressLogger.LogError(LogMessage.DeleteAPIKeyFailureMsg, e);
                throw e;
            }
            finally
            {
                TestProgressLogger.EndTest();
            }
        }
コード例 #3
0
 public void TC44_VerifyCreateAPIKey()
 {
     try
     {
         TestProgressLogger.StartTest();
         UserFunctions userFunctions = new UserFunctions(TestProgressLogger);
         userFunctions.LogIn(TestProgressLogger, Const.USER1);
         UserSettingPage userSettingsPage = new UserSettingPage(driver, TestProgressLogger);
         Assert.True((userSettingsPage.SelectAPIKey()), LogMessage.CreateAPIKeyBtnIsPresent);
         TestProgressLogger.LogCheckPoint(String.Format(LogMessage.CreateAPIKeyBtnIsPresent));
         Assert.True((userSettingsPage.VerifyAPIKeyCheckboxesArePresent()), LogMessage.APIKeyCheckboxesArePresent);
         TestProgressLogger.LogCheckPoint(String.Format(LogMessage.APIKeyCheckboxesArePresent));
         Assert.True((userSettingsPage.CreateAndVerifyAPIKey()), LogMessage.APIKeyCreatedSuccessMsg);
         TestProgressLogger.LogCheckPoint(String.Format(LogMessage.APIKeyCreatedSuccessMsg));
     }
     catch (Exception e)
     {
         TestProgressLogger.TakeScreenshot();
         TestProgressLogger.LogError(LogMessage.CreateAPIKeyFailed, e);
         throw e;
     }
     finally
     {
         TestProgressLogger.EndTest();
         UserFunctions userFunctionality = new UserFunctions(TestProgressLogger);
         userFunctionality.LogOut();
     }
 }
コード例 #4
0
        public void TC3_VerifyBuyMarketOrder()
        {
            try
            {
                instrument           = TestData.GetData("Instrument");
                buyTab               = TestData.GetData("BuyTab");
                sellTab              = TestData.GetData("SellTab");
                marketOrderBuyAmount = TestData.GetData("TC3_MarketOrderBuyAmount");
                feeComponent         = TestData.GetData("FeeComponent");
                sellOrderSize        = TestData.GetData("TC3_SellOrderSize");
                limitPrice           = TestData.GetData("TC3_LimitPrice");
                timeInForce          = TestData.GetData("TC3_TimeInForce");
                string feeValue;
                Dictionary <string, string> placeMarketBuyOrder;

                // Get fee based on buy amount and fee component
                feeValue = GenericUtils.FeeAmount(marketOrderBuyAmount, feeComponent);
                UserFunctions       userFunctions      = new UserFunctions(TestProgressLogger);
                UserCommonFunctions userCommonFunction = new UserCommonFunctions(TestProgressLogger);
                VerifyOrdersTab     objVerifyOrdersTab = new VerifyOrdersTab(driver, TestProgressLogger);
                OrderEntryPage      orderEntryPage     = new OrderEntryPage(driver, TestProgressLogger);

                TestProgressLogger.StartTest();
                // Place buy and sell order to set the last price
                TestProgressLogger.LogCheckPoint(String.Format(LogMessage.PlaceOrderToSetMarketBegin, limitPrice));
                userCommonFunction.PlaceOrdersToSetLastPrice(driver, instrument, buyTab, sellTab, sellOrderSize, limitPrice, timeInForce, Const.USER10, Const.USER11);
                TestProgressLogger.LogCheckPoint(String.Format(LogMessage.PlaceOrderToSetMarketEnd, limitPrice));

                // Place Limit sell order to set the market
                userFunctions.LogIn(TestProgressLogger, Const.USER8);
                userCommonFunction.CancelAndPlaceLimitSellOrder(driver, instrument, sellTab, sellOrderSize, limitPrice, timeInForce);
                userFunctions.LogOut();
                TestProgressLogger.LogCheckPoint(String.Format(LogMessage.MarketSetupEnd, sellTab, sellOrderSize, limitPrice));

                userFunctions.LogIn(TestProgressLogger, Const.USER11);
                // Place Market buy order with the same quantity as that of sell limit order placed
                placeMarketBuyOrder = orderEntryPage.PlaceMarketBuyOrder(instrument, buyTab, Double.Parse(marketOrderBuyAmount));
                // Verify order is present in Filled Orders tab
                Assert.True(objVerifyOrdersTab.VerifyFilledOrdersTab(placeMarketBuyOrder["Instrument"], placeMarketBuyOrder["Side"], Double.Parse(placeMarketBuyOrder["BuyAmount"]), feeValue, placeMarketBuyOrder["PlaceOrderTime"], placeMarketBuyOrder["PlaceOrderTimePlusOneMin"]), Const.MarketOrderVerifiedInFilledOrders);
                TestProgressLogger.LogCheckPoint(String.Format(LogMessage.MarketOrderTestPassed, buyTab));
            }
            catch (NoSuchElementException ex)
            {
                TestProgressLogger.TakeScreenshot();
                TestProgressLogger.LogCheckPoint(ex.Message + ex.StackTrace);
                TestProgressLogger.LogError(String.Format(LogMessage.MarketOrderTestFailed, buyTab), ex);
                throw ex;
            }
            catch (Exception e)
            {
                TestProgressLogger.TakeScreenshot();
                TestProgressLogger.LogCheckPoint(e.Message + e.StackTrace);
                TestProgressLogger.LogError(String.Format(LogMessage.MarketOrderTestFailed, buyTab), e);
                throw e;
            }
            finally
            {
                TestProgressLogger.EndTest();
            }
        }
コード例 #5
0
        public void TC48_VerifyCyclicReportTradeActivities()
        {
            string           reportTypeValue      = TestData.GetData("TC48_SingleReportTradeActivityValue");
            UserFunctions    objUserFunctionality = new UserFunctions(TestProgressLogger);
            TradeReportsPage objTradeReportsPage  = new TradeReportsPage(driver, TestProgressLogger);

            try
            {
                TestProgressLogger.StartTest();
                objUserFunctionality.LogIn(TestProgressLogger, Const.USER14);
                string startDate = GenericUtils.GetCurrentDate();

                //This will verify trade activities of cyclic report and their details
                Assert.True(objTradeReportsPage.VerifyCyclicReportData(reportTypeValue, startDate));
                TestProgressLogger.LogCheckPoint(String.Format(LogMessage.VerifyCyclicReportTradeActivitiesPassed, reportTypeValue));
            }
            catch (NoSuchElementException ex)
            {
                TestProgressLogger.TakeScreenshot();
                TestProgressLogger.LogCheckPoint(ex.Message + ex.StackTrace);
                TestProgressLogger.LogError(String.Format(LogMessage.VerifyCyclicReportTradeActivitiesFailed, reportTypeValue), ex);
                throw ex;
            }
            catch (Exception e)
            {
                TestProgressLogger.TakeScreenshot();
                TestProgressLogger.LogCheckPoint(e.Message + e.StackTrace);
                TestProgressLogger.LogError(String.Format(LogMessage.VerifyCyclicReportTradeActivitiesFailed, reportTypeValue), e);
                throw e;
            }
            finally
            {
                TestProgressLogger.EndTest();
            }
        }
コード例 #6
0
        [Fact] //
        public void TC2_VerifyAmountPersistence()
        {
            try
            {
                instrument = TestData.GetData("Instrument");
                buyTab     = TestData.GetData("BuyTab");
                sellTab    = TestData.GetData("SellTab");

                TestProgressLogger.StartTest();
                UserFunctions userFunctions = new UserFunctions(TestProgressLogger);
                userFunctions.LogIn(TestProgressLogger, Const.USER5);
                OrderEntryPage orderEntryPage = new OrderEntryPage(driver, TestProgressLogger);
                Assert.True(orderEntryPage.VerifyOrderEntryAmountPersistence(instrument, TestData.GetData("PersistenceTestAmount")), LogMessage.DataNotBeingPersisted);
                TestProgressLogger.LogCheckPoint(String.Format(LogMessage.AmountPersistenceSuccessMsg, buyTab, sellTab));
            }
            catch (NoSuchElementException ex)
            {
                TestProgressLogger.TakeScreenshot();
                TestProgressLogger.LogError(Const.AmountPersistenceFailureMsg, ex);
                throw ex;
            }
            catch (Exception e)
            {
                TestProgressLogger.TakeScreenshot();
                TestProgressLogger.LogError(Const.AmountPersistenceFailureMsg, e);
                throw e;
            }
            finally
            {
                TestProgressLogger.EndTest();
                UserFunctions userFunctionality = new UserFunctions(TestProgressLogger);
                userFunctionality.LogOut();
            }
        }
コード例 #7
0
        public void TCAdmin14_OMSOrdersHistory()
        {
            try
            {
                instrument   = TestData.GetData("Instrument");
                buyTab       = TestData.GetData("BuyTab");
                sellTab      = TestData.GetData("SellTab");
                buyOrderSize = TestData.GetData("TCAdmin14_BuyOrderSize");
                //sellOrderSize = TestData.GetData("TCAdmin13_SellOrderSize");
                buyLimitPrice = TestData.GetData("TCAdmin14_BuyLimitPrice");
                //sellLimitPrice = TestData.GetData("TCAdmin13_SellLimitPrice");
                timeInForce = TestData.GetData("TCAdmin14_TimeInForce");
                numOfOrders = TestData.GetData("TCAdmin14_NumberOfOrdersToDisplay");
                orderState  = TestData.GetData("TCAdmin14_OrderState");

                AdminFunctions              objAdminFunctions       = new AdminFunctions(TestProgressLogger);
                AdminOMSOrdersPage          adminOMSOrdersPage      = new AdminOMSOrdersPage(TestProgressLogger);
                UserFunctions               userFunctions           = new UserFunctions(TestProgressLogger);
                UserCommonFunctions         userCommonFunction      = new UserCommonFunctions(TestProgressLogger);
                AdminCommonFunctions        objAdminCommonFunctions = new AdminCommonFunctions(TestProgressLogger);
                Dictionary <string, string> userDetailsDict         = new Dictionary <string, string>();

                TestProgressLogger.StartTest();
                //userFunctions.LogIn(TestProgressLogger, Const.User8);
                // Create Buy limit order such that the order are present in open orders tab
                //userCommonFunction.CancelAndPlaceLimitBuyOrder(driver, instrument, buyTab, buyOrderSize, limitPrice, timeInForce);
                //Login as admin
                objAdminFunctions.AdminLogIn(TestProgressLogger);
                //userDetailsDict = objAdminCommonFunctions.GetUserDetails("User_3");
                // User will select the instrument from the dropdown and verify the orders placed above are present OMS orders history page or not
                //Assert.True(adminOMSOrdersPage.VerifySelectOMSOrdersHistoryInstrument("BTCUSD", numOfOrders), LogMessage.VerifySelectOMSOrdersInstrumentFailed);
                // This will verify that numbers of orders displayed is not more than the number of orders selected
                //Assert.True(adminOMSOrdersPage.VerifyNumOfOrdersOnHistorypage(numOfOrders, instrument), LogMessage.VerifyNumOfOrdersDisplayedFailed);
                // This will verify the the search functionality based on Account Id is working
                //Assert.True(adminOMSOrdersPage.VerifySearchOMSOrdersHistoryByAcountId(instrument, numOfOrders, userDetailsDict["AccountId"]), LogMessage.VerifySearchOMSOrdersByAcountIdFailed);
                // This will verify the the search functionality based on Order Id is working
                //Assert.True(adminOMSOrdersPage.VerifySearchOMSOrdersHistoryByOrderId(instrument, numOfOrders), LogMessage.VerifySearchOMSOrdersByUserIdFailed);
                Assert.True(adminOMSOrdersPage.VerifySearchRejectedOrder(instrument, numOfOrders, orderState));
            }
            catch (NoSuchElementException ex)
            {
                TestProgressLogger.TakeScreenshot();
                TestProgressLogger.LogCheckPoint(ex.Message + ex.StackTrace);
                TestProgressLogger.LogError(LogMessage.VerifyOMSOpenOrdersTestFailed, ex);
                throw ex;
            }
            catch (Exception e)
            {
                TestProgressLogger.TakeScreenshot();
                TestProgressLogger.LogCheckPoint(e.Message + e.StackTrace);
                TestProgressLogger.LogError(LogMessage.VerifyOMSOpenOrdersTestFailed, e);
                throw e;
            }
            finally
            {
                TestProgressLogger.EndTest();
            }
        }
コード例 #8
0
        public void TC7_VerifyBuyStopOrder()
        {
            try
            {
                string type = Const.StopMarket;
                instrument   = TestData.GetData("Instrument");
                feeComponent = TestData.GetData("FeeComponent");
                orderType    = TestData.GetData("OrderType");
                menuTab      = TestData.GetData("MenuTab");
                buyTab       = TestData.GetData("BuyTab");
                sellTab      = TestData.GetData("SellTab");
                orderSize    = TestData.GetData("TC7_OrderSize");
                limitPrice   = TestData.GetData("TC7_LimitPrice");
                timeInForce  = TestData.GetData("TimeInForce");
                stopPrice    = TestData.GetData("TC7_StopPrice");

                TestProgressLogger.StartTest();
                UserFunctions       userFunctions      = new UserFunctions(TestProgressLogger);
                UserCommonFunctions userCommonFunction = new UserCommonFunctions(TestProgressLogger);
                OrderEntryPage      orderEntryPage     = new OrderEntryPage(driver, TestProgressLogger);
                VerifyOrdersTab     objVerifyOrdersTab = new VerifyOrdersTab(driver, TestProgressLogger);

                userCommonFunction.PlaceOrdersToSetLastPrice(driver, instrument, buyTab, sellTab, orderSize, limitPrice, timeInForce, Const.USER10, Const.USER11);

                userFunctions.LogIn(TestProgressLogger, Const.USER8);
                string askPrice = userCommonFunction.CancelAndPlaceLimitSellOrder(driver, instrument, sellTab, orderSize, limitPrice, timeInForce);
                UserCommonFunctions.ConfirmWindowOrder(askPrice, limitPrice, driver);
                userFunctions.LogOut();
                TestProgressLogger.LogCheckPoint(String.Format(LogMessage.MarketSetupEnd, sellTab, orderSize, limitPrice));

                userFunctions.LogIn(TestProgressLogger, Const.USER9);
                Dictionary <string, string> placeStopBuyOrder = orderEntryPage.PlaceStopBuyOrder(instrument, buyTab, Double.Parse(orderSize), Double.Parse(feeComponent), Double.Parse(stopPrice));
                Assert.True(objVerifyOrdersTab.VerifyOpenOrdersTab(placeStopBuyOrder["Instrument"], placeStopBuyOrder["Side"], type, Double.Parse(placeStopBuyOrder["BuyAmount"]), placeStopBuyOrder["StopPrice"], placeStopBuyOrder["PlaceOrderTime"], placeStopBuyOrder["PlaceOrderTimePlusOneMin"]));
                TestProgressLogger.LogCheckPoint(string.Format(LogMessage.BuyStopOrderSuccessMsg, buyTab));

                // This cancels all the previous open orders
                UserCommonFunctions.LoginAndCancelAllOrders(TestProgressLogger, driver, instrument, Const.USER8);
                UserCommonFunctions.LoginAndCancelAllOrders(TestProgressLogger, driver, instrument, Const.USER9);
            }
            catch (NoSuchElementException ex)
            {
                TestProgressLogger.TakeScreenshot();
                TestProgressLogger.LogError(LogMessage.MarketOrderTestFailed, ex);
                throw ex;
            }
            catch (Exception e)
            {
                TestProgressLogger.TakeScreenshot();
                TestProgressLogger.LogError(LogMessage.MarketOrderTestFailed, e);
                throw e;
            }
            finally
            {
                TestProgressLogger.EndTest();
                UserFunctions userFunctionality = new UserFunctions(TestProgressLogger);
                userFunctionality.LogOut();
            }
        }
コード例 #9
0
        [Fact]      //Admin_22
        public void ExportAllAccountsBalancesCSVFile()
        {
            try
            {
                string allBalancesFileName;
                string toastMessage;

                allBalancesFileName = TestData.GetData("TCAdmin22_AccountsBalancesFileName");

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

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

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

                // Delete all previous file and download allaccounts csv file.
                genericUtils.DeleteAllFiles();
                toastMessage = adminAccountPage.ClickOnExportAllBalancesButton();
                TestProgressLogger.LogCheckPoint(LogMessage.DownloadAllBalancessCSVFile);

                // Verify success toast msg.
                Assert.Equal(toastMessage, Const.TCAdmin22_AllAccountBalancesDownloadSuccessfullyMSG);

                // Verify data in all balances csv file.
                Assert.True(adminAccountPage.VerifyAllBalancesCSVData(allBalancesFileName));
                TestProgressLogger.LogCheckPoint(LogMessage.VerifyAllBalancesCSVFile);

                // Logout from admin.
                admincommonfunctions.UserMenuBtn();
                adminfunctions.AdminLogOut();
            }
            catch (NoSuchElementException ex)
            {
                TestProgressLogger.TakeScreenshot();
                TestProgressLogger.LogCheckPoint(ex.Message + ex.StackTrace);
                TestProgressLogger.LogError(LogMessage.ExportAllBalancesCSVFileTestFailed, ex);
                throw;
            }
            catch (Exception e)
            {
                TestProgressLogger.TakeScreenshot();
                TestProgressLogger.LogCheckPoint(e.Message + e.StackTrace);
                TestProgressLogger.LogError(LogMessage.ExportAllBalancesCSVFileTestFailed, e);
                throw e;
            }
            finally
            {
                TestProgressLogger.EndTest();
            }
        }
コード例 #10
0
        [Fact]      //Admin_31
        public void VerifyShowDepositKeys()
        {
            try
            {
                string accountId;
                string toastMessage;
                string product;
                string accountProvider;
                string fiatCurrency;
                product         = TestData.GetData("TCAdmin31_Product");
                accountProvider = TestData.GetData("TCAdmin31_AccountProvider");
                fiatCurrency    = TestData.GetData("TCAdmin31_FiatCurrency");
                accountId       = TestData.GetData("TCAdmin31_AccountID");
                AdminFunctions       adminfunctions       = new AdminFunctions(TestProgressLogger);
                AdminCommonFunctions admincommonfunctions = new AdminCommonFunctions(TestProgressLogger);
                AdminAccountsPage    adminAccountPage     = new AdminAccountsPage(TestProgressLogger);

                // Login in admin
                adminfunctions.AdminLogIn(TestProgressLogger, Const.ADMIN1);
                // This method is used to navigate to accounts page and select the accountId passed
                adminAccountPage.GetAccountDetailsByAccountId(accountId);
                // Submit Show Deposit Keys
                adminAccountPage.SubmitDepositKeys(product, accountProvider);
                // Verify Create DepositKey Toast success msg
                toastMessage = adminAccountPage.CreateDepositKeyToastMessage();
                Assert.Equal(Const.DepositKeySuccessMsg, toastMessage);
                TestProgressLogger.LogCheckPoint(LogMessage.VerifyToastMSG);
                // Verify No FIAT is listed in the product droplist
                Assert.True(adminAccountPage.VerifyFIATCurrencyIsNotPresent(fiatCurrency));
                // Verify multiple Deposit Key can be created
                Assert.True(adminAccountPage.VerifyMultipleDepositKey());
                // Verify Copy button functionality is working
                Assert.True(adminAccountPage.VerifyCopyDepositKey());
                // Logout from admin.
                admincommonfunctions.UserMenuBtn();
                adminfunctions.AdminLogOut();
            }
            catch (NoSuchElementException ex)
            {
                TestProgressLogger.TakeScreenshot();
                TestProgressLogger.LogCheckPoint(ex.Message + ex.StackTrace);
                TestProgressLogger.LogError(LogMessage.VerifyShowDepositKeysTestFailed, ex);
                throw;
            }
            catch (Exception e)
            {
                TestProgressLogger.TakeScreenshot();
                TestProgressLogger.LogCheckPoint(e.Message + e.StackTrace);
                TestProgressLogger.LogError(LogMessage.VerifyShowDepositKeysTestFailed, e);
                throw e;
            }
            finally
            {
                TestProgressLogger.EndTest();
            }
        }
コード例 #11
0
        public void TC43_VerifyBuyAndSell_SellTest()
        {
            instrument    = TestData.GetData("Instrument");
            sellTab       = TestData.GetData("SellTab");
            buyTab        = TestData.GetData("BuyTab");
            sellOrderSize = TestData.GetData("TC43_SellOrderSize");
            limitPrice    = TestData.GetData("TC43_LimitPrice");
            timeInForce   = TestData.GetData("TC11_TimeInForce");

            UserFunctions       userfuntionality   = new UserFunctions(TestProgressLogger);
            BuyAndSellPage      objBuyAndSellPage  = new BuyAndSellPage(TestProgressLogger);
            UserFunctions       userFunctions      = new UserFunctions(TestProgressLogger);
            UserCommonFunctions userCommonFunction = new UserCommonFunctions(TestProgressLogger);

            try
            {
                string askPrice;
                TestProgressLogger.StartTest();
                userFunctions.LogIn(TestProgressLogger, Const.USER6);
                askPrice = userCommonFunction.CancelAndPlaceLimitBuyOrder(driver, instrument, sellTab, sellOrderSize, limitPrice, timeInForce);
                UserCommonFunctions.ConfirmWindowOrder(askPrice, limitPrice, driver);
                userFunctions.LogOut();
                userfuntionality.LogIn(TestProgressLogger, Const.USER8);
                UserCommonFunctions.DashBoardMenuButton(driver);
                UserCommonFunctions.NavigateToBuySell(driver);
                objBuyAndSellPage.SellBtn();
                Assert.True(objBuyAndSellPage.VerifyMakeATransaction());
                Assert.True(objBuyAndSellPage.VerifyChart());
                Assert.True(objBuyAndSellPage.VerifySellOption());
                Assert.True(objBuyAndSellPage.VerifyFifthRadioButtonOption());
                Assert.True(objBuyAndSellPage.VerifyFifthWithBlankValues());
                objBuyAndSellPage.PlaceSellOrder(instrument, sellTab);
                TestProgressLogger.LogCheckPoint(String.Format(LogMessage.BuyAndSell_SellTestVerificationPassed, buyTab));
            }
            catch (NoSuchElementException ex)
            {
                TestProgressLogger.TakeScreenshot();
                TestProgressLogger.LogCheckPoint(ex.Message + ex.StackTrace);
                throw ex;
            }
            catch (Exception ex)
            {
                TestProgressLogger.TakeScreenshot();
                TestProgressLogger.Error(String.Format(LogMessage.BuyAndSell_SellTestVerificationFailed, buyTab), ex);
                TestProgressLogger.LogCheckPoint(ex.Message + ex.StackTrace);
            }
            finally
            {
                TestProgressLogger.EndTest();
                UserFunctions userFunctionality = new UserFunctions(TestProgressLogger);
                userFunctionality.LogOut();
            }
        }
コード例 #12
0
        public void TCAdmin6_VerifyRevokeUserPermissionTest()
        {
            revokeUserPermission = TestData.GetData("TCAdmin6_RevokeUserPermission");
            string username;

            AdminFunctions       objAdminFunctions       = new AdminFunctions(TestProgressLogger);
            AdminCommonFunctions objAdminCommonFunctions = new AdminCommonFunctions(TestProgressLogger);
            AdminUsersPage       objAdminUsersPage       = new AdminUsersPage(TestProgressLogger);

            try
            {
                TestProgressLogger.StartTest();
                //Login as admin -> Click on "Users" menu button
                objAdminFunctions.AdminLogIn(TestProgressLogger);
                objAdminCommonFunctions.ClickOnUsersMenuLink();
                objAdminCommonFunctions.UsersTabBtn();

                ////This will get the user name from the user list under Users Tab and click on any user under Users Tab
                username = objAdminCommonFunctions.getUserNameFromUserList();
                objAdminCommonFunctions.SelectUserFromUserList(driver, username);

                //Click on "Revok" button under user permission window section and observed the message
                objAdminUsersPage.ClickOnRevokePermissionButton();

                //Click on "Add Permission" button -> verify all if selected reovked user permissions present in the list of user permission
                objAdminCommonFunctions.UserPermissionButton();
                objAdminCommonFunctions.RevokedUserPermissions(revokeUserPermission);

                //Close the permission window section
                objAdminCommonFunctions.ClosePermissionWindow();
            }

            catch (NoSuchElementException ex)
            {
                TestProgressLogger.TakeScreenshot();
                TestProgressLogger.LogCheckPoint(ex.Message + ex.StackTrace);
                TestProgressLogger.LogError(String.Format(LogMessage.VerifyRevokeUserPermissionFailed), ex);
                throw ex;
            }
            catch (Exception e)
            {
                TestProgressLogger.TakeScreenshot();
                TestProgressLogger.LogCheckPoint(e.Message + e.StackTrace);
                TestProgressLogger.LogError(String.Format(LogMessage.VerifyRevokeUserPermissionFailed), e);
                throw e;
            }
            finally
            {
                objAdminCommonFunctions.UserMenuBtn();
                objAdminFunctions.AdminLogOut();
                TestProgressLogger.EndTest();
            }
        }
コード例 #13
0
        public void TC4_VerifySellMarketOrder()
        {
            try
            {
                instrument            = TestData.GetData("Instrument");
                marketOrderSellAmount = TestData.GetData("TC4_MarketOrderSellAmount");
                feeComponent          = TestData.GetData("FeeComponent");
                orderType             = TestData.GetData("OrderType");
                menuTab      = TestData.GetData("MenuTab");
                buyTab       = TestData.GetData("BuyTab");
                sellTab      = TestData.GetData("SellTab");
                buyOrderSize = TestData.GetData("TC4_MarketOrderBuyAmount");
                limitPrice   = TestData.GetData("TC4_LimitPrice");
                timeInForce  = TestData.GetData("TimeInForce");


                UserFunctions       userFunctions      = new UserFunctions(TestProgressLogger);
                UserCommonFunctions userCommonFunction = new UserCommonFunctions(TestProgressLogger);
                OrderEntryPage      orderEntryPage     = new OrderEntryPage(driver, TestProgressLogger);
                string feeValue = GenericUtils.SellFeeAmount(buyOrderSize, limitPrice, feeComponent);

                TestProgressLogger.StartTest();
                userCommonFunction.PlaceOrdersToSetLastPrice(driver, instrument, buyTab, sellTab, buyOrderSize, limitPrice, timeInForce, Const.USER10, Const.USER11);
                userFunctions.LogIn(TestProgressLogger, Const.USER8);
                userCommonFunction.CancelAndPlaceLimitBuyOrder(driver, instrument, buyTab, buyOrderSize, limitPrice, timeInForce);
                userFunctions.LogOut();
                TestProgressLogger.LogCheckPoint(String.Format(LogMessage.MarketSetupEnd, buyTab, buyOrderSize, limitPrice));

                userFunctions.LogIn(TestProgressLogger, Const.USER11);
                Dictionary <string, string> placeMarketSellOrder = orderEntryPage.PlaceMarketSellOrder(instrument, sellTab, Double.Parse(marketOrderSellAmount), Double.Parse(feeComponent));
                VerifyOrdersTab             objVerifyOrdersTab   = new VerifyOrdersTab(driver, TestProgressLogger);
                Assert.True(objVerifyOrdersTab.VerifyFilledOrdersTab(placeMarketSellOrder["Instrument"], placeMarketSellOrder["Side"], Double.Parse(placeMarketSellOrder["SellAmount"]), feeValue, placeMarketSellOrder["PlaceOrderTime"], placeMarketSellOrder["PlaceOrderTimePlusOneMin"]), Const.MarketOrderVerifiedInFilledOrders);
                TestProgressLogger.LogCheckPoint(string.Format(LogMessage.SellMarketOrderSuccessMsg));
            }
            catch (NoSuchElementException ex)
            {
                TestProgressLogger.TakeScreenshot();
                TestProgressLogger.LogError(LogMessage.MarketOrderTestFailed, ex);
                throw ex;
            }
            catch (Exception e)
            {
                TestProgressLogger.TakeScreenshot();
                TestProgressLogger.LogError(LogMessage.MarketOrderTestFailed, e);
                throw e;
            }
            finally
            {
                TestProgressLogger.EndTest();
                UserFunctions userFunctionality = new UserFunctions(TestProgressLogger);
                userFunctionality.LogOut();
            }
        }
コード例 #14
0
        [Fact]      //Admin_33
        public void VerifyAccountBalances()
        {
            try
            {
                string accountId;
                string toastMessage;
                string product;
                string accountProvider;
                string fiatCurrency;
                product         = TestData.GetData("TCAdmin31_Product");
                accountProvider = TestData.GetData("TCAdmin31_AccountProvider");
                fiatCurrency    = TestData.GetData("TCAdmin31_FiatCurrency");
                accountId       = TestData.GetData("TCAdmin31_AccountID");
                AdminFunctions       adminfunctions       = new AdminFunctions(TestProgressLogger);
                AdminCommonFunctions admincommonfunctions = new AdminCommonFunctions(TestProgressLogger);
                AdminAccountsPage    adminAccountPage     = new AdminAccountsPage(TestProgressLogger);

                // Login in admin
                adminfunctions.AdminLogIn(TestProgressLogger, Const.ADMIN1);
                // Preconditions: Submit Ledger Entry for an account and product combination
                // Navigate on Accounts page.
                admincommonfunctions.SelectAccountsMenu();
                admincommonfunctions.ClickOnAccountBalancesTab();
                adminAccountPage.VerifyAccountBalancesPagination();
                // Verify that filter by product functionality is working
                adminAccountPage.VerifyFilterByProduct("USD");
                //

                // Logout from admin.
                admincommonfunctions.UserMenuBtn();
                adminfunctions.AdminLogOut();
            }
            catch (NoSuchElementException ex)
            {
                TestProgressLogger.TakeScreenshot();
                TestProgressLogger.LogCheckPoint(ex.Message + ex.StackTrace);
                TestProgressLogger.LogError(LogMessage.VerifyShowDepositKeysTestFailed, ex);
                throw;
            }
            catch (Exception e)
            {
                TestProgressLogger.TakeScreenshot();
                TestProgressLogger.LogCheckPoint(e.Message + e.StackTrace);
                TestProgressLogger.LogError(LogMessage.VerifyShowDepositKeysTestFailed, e);
                throw e;
            }
            finally
            {
                TestProgressLogger.EndTest();
            }
        }
コード例 #15
0
        public void TC35_VerifyCancelBlockTradeOrderWithoutLockedInTest()
        {
            instrument         = TestData.GetData("Instrument");
            counterPartyPrice  = TestData.GetData("TC33_CounterPartyPrice");
            productBoughtPrice = TestData.GetData("TC33_ProductBoughtPrice");
            productSoldPrice   = TestData.GetData("TC33_ProductSoldPrice");
            UserFunctions        userfuntionality        = new UserFunctions(TestProgressLogger);
            DetailsOnLandingPage objDetailsOnLandingPage = new DetailsOnLandingPage(TestProgressLogger);
            ReportBlockTradePage objReportBlockTradePage = new ReportBlockTradePage(TestProgressLogger);
            VerifyOrdersTab      objVerifyOrdersTab      = new VerifyOrdersTab(driver, TestProgressLogger);

            try
            {
                TestProgressLogger.StartTest();
                userfuntionality.LogIn(TestProgressLogger, Const.USER6);
                Thread.Sleep(2000);
                UserCommonFunctions.DashBoardMenuButton(driver);
                UserCommonFunctions.SelectAnExchange(driver);
                Assert.True(objDetailsOnLandingPage.ExchangeLinkButton());
                UserCommonFunctions.SelectInstrumentFromExchange(instrument, driver);
                objReportBlockTradePage.ReportBlockTradeButton();
                objReportBlockTradePage.VerifyReportBlockTradeWindow();
                objReportBlockTradePage.SubmitBlockTradeReportForUser(counterPartyPrice, productBoughtPrice, productSoldPrice);
                Assert.True(objVerifyOrdersTab.VerifyCancelBlockTradeOrdersInOpenOrderTab());
                Thread.Sleep(3000);
                TestProgressLogger.LogCheckPoint(String.Format(LogMessage.VerifiedCancelOrderButtonPassed));
                TestProgressLogger.LogCheckPoint(String.Format(LogMessage.VerifiedBlockTradeWithoutLockedInCancelPassed));
                TestProgressLogger.EndTest();
            }

            catch (NoSuchElementException ex)
            {
                TestProgressLogger.TakeScreenshot();
                TestProgressLogger.LogCheckPoint(ex.Message + ex.StackTrace);
            }
            catch (Exception ex)
            {
                TestProgressLogger.TakeScreenshot();
                TestProgressLogger.Error(String.Format(LogMessage.VerifiedCancelOrderButtonFailed));
                TestProgressLogger.Error(String.Format(LogMessage.VerifiedBlockTradeWithoutLockedInCancelFailed));
                TestProgressLogger.LogCheckPoint(ex.Message + ex.StackTrace);
            }
            finally
            {
                TestProgressLogger.EndTest();
                UserFunctions userFunctionality = new UserFunctions(TestProgressLogger);
                userFunctionality.LogOut();
            }
        }
コード例 #16
0
        public void TC45_VerifyAffiliateProgram()
        {
            string               userByID                = TestData.GetData("TC45_UserByID");
            string               affiliateTagID          = TestData.GetData("TC45_AffiliateTagID");
            string               verificationLevel       = TestData.GetData("TC45_VerificationLevel");
            AdminFunctions       objAdminFunctions       = new AdminFunctions(TestProgressLogger);
            UserFunctions        userFunctions           = new UserFunctions(TestProgressLogger);
            AdminCommonFunctions objAdminCommonFunctions = new AdminCommonFunctions(TestProgressLogger);
            UserSettingPage      userSettingsPage        = new UserSettingPage(driver, TestProgressLogger);

            try
            {
                TestProgressLogger.StartTest();
                // Login as admin
                objAdminFunctions.AdminLogIn(TestProgressLogger);
                // Select user by entering UserID
                objAdminCommonFunctions.ClickOnUsersMenuLink();
                objAdminCommonFunctions.UserByIDText(userByID);
                objAdminCommonFunctions.OpenUserButton();
                // Create Affiliate tag for the user
                objAdminCommonFunctions.AffiliateTagCreation(affiliateTagID);
                objAdminCommonFunctions.UserMenuBtn();
                objAdminFunctions.AdminLogOut();

                // Login as the user mentioned above and verify Affiliate program functionality
                userFunctions.LogIn(TestProgressLogger, Const.USER12);
                Assert.True(userSettingsPage.VerifyAffiliateProgramFunctionality(driver, verificationLevel), LogMessage.AffiliateProgramFailureMsg);
                TestProgressLogger.LogCheckPoint(String.Format(LogMessage.AffiliateProgramSuccessMsg));
            }
            catch (NoSuchElementException ex)
            {
                TestProgressLogger.TakeScreenshot();
                TestProgressLogger.LogCheckPoint(ex.Message + ex.StackTrace);
                TestProgressLogger.LogError(LogMessage.AffiliateProgramFailureMsg, ex);
                throw ex;
            }
            catch (Exception e)
            {
                TestProgressLogger.TakeScreenshot();
                TestProgressLogger.LogCheckPoint(e.Message + e.StackTrace);
                TestProgressLogger.LogError(LogMessage.AffiliateProgramFailureMsg, e);
                throw e;
            }
            finally
            {
                TestProgressLogger.EndTest();
            }
        }
コード例 #17
0
        public void TCAdmin16_VerifyFilterByUserId()
        {
            enterUserId   = TestData.GetData("TCAdmin16_EnterUserId");
            userIdText    = TestData.GetData("TCAdmin16_UserIdTextValue");
            EmailText     = TestData.GetData("TCAdmin16_EmailTextValue");
            AccountIdText = TestData.GetData("TCAdmin16_AccountIdTextValue");

            AdminFunctions       objAdminFunctions       = new AdminFunctions(TestProgressLogger);
            AdminCommonFunctions objAdminCommonFunctions = new AdminCommonFunctions(TestProgressLogger);
            AdminUsersPage       objAdminUsersPage       = new AdminUsersPage(TestProgressLogger);

            try
            {
                TestProgressLogger.StartTest();
                //Login as admin -> Click on "Users" menu button -> Users Tab
                objAdminUsersPage.SelectAdminUserTab();

                //Click on "ViewAll" button
                objAdminUsersPage.ClickOnViewAllButton();

                //Verify if entered value in userId textfield loads the values in userTable dynamically and load the page
                Assert.True(objAdminUsersPage.VerifyUserIdResultsLoad(enterUserId, userIdText));
            }

            catch (NoSuchElementException ex)
            {
                TestProgressLogger.TakeScreenshot();
                TestProgressLogger.LogCheckPoint(ex.Message + ex.StackTrace);
                TestProgressLogger.LogError(String.Format(LogMessage.VerifyFilteredByFailed, userIdText), ex);
                throw ex;
            }
            catch (Exception e)
            {
                TestProgressLogger.TakeScreenshot();
                TestProgressLogger.LogCheckPoint(e.Message + e.StackTrace);
                TestProgressLogger.LogError(String.Format(LogMessage.VerifyFilteredByFailed, userIdText), e);
                throw e;
            }
            finally
            {
                objAdminCommonFunctions.UserMenuBtn();
                objAdminFunctions.AdminLogOut();
                TestProgressLogger.EndTest();
            }
        }
コード例 #18
0
        public void TCAdmin37_VerifyUserAPIKeysCreationDeletionTest()
        {
            string username;

            accountIdText   = TestData.GetData("TCAdmin19_AccountIdTextValue");
            entereAccountId = TestData.GetData("TCAdmin19_EnterAccountId");

            AdminFunctions       objAdminFunctions       = new AdminFunctions(TestProgressLogger);
            AdminCommonFunctions objAdminCommonFunctions = new AdminCommonFunctions(TestProgressLogger);
            AdminUsersPage       objAdminUsersPage       = new AdminUsersPage(TestProgressLogger);

            try
            {
                TestProgressLogger.StartTest();
                //Login as admin -> Click on "Users" menu button -> Users Tab
                objAdminUsersPage.SelectAdminUserTab();

                //Select an user from the user list and click on it
                username = objAdminCommonFunctions.getUserNameFromUserList();
                objAdminCommonFunctions.SelectUserFromUserList(driver, username);

                //Verify if entered value in accountId textfield loads the values in userTable dynamically and load the page
                Assert.True(objAdminUsersPage.VerifyAPIKeys());
            }
            catch (NoSuchElementException ex)
            {
                TestProgressLogger.TakeScreenshot();
                TestProgressLogger.LogCheckPoint(ex.Message + ex.StackTrace);
                TestProgressLogger.LogError(String.Format(LogMessage.VerifyCreationDeletionUserKeyFailed), ex);
                throw ex;
            }
            catch (Exception e)
            {
                TestProgressLogger.TakeScreenshot();
                TestProgressLogger.LogCheckPoint(e.Message + e.StackTrace);
                TestProgressLogger.LogError(String.Format(LogMessage.VerifyCreationDeletionUserKeyFailed), e);
                throw e;
            }
            finally
            {
                objAdminCommonFunctions.UserMenuBtn();
                objAdminFunctions.AdminLogOut();
                TestProgressLogger.EndTest();
            }
        }
コード例 #19
0
        public void TCAdmin12_VerifyAllTradesTakenPlaceUnderTradesTabTest()
        {
            accountId = TestData.GetData("TCAdmin12_AccountIdValue");
            userId    = TestData.GetData("TCAdmin12_UserIdValue");

            AdminFunctions       objAdminFunctions       = new AdminFunctions(TestProgressLogger);
            AdminCommonFunctions objAdminCommonFunctions = new AdminCommonFunctions(TestProgressLogger);
            AdminUsersPage       objAdminUsersPage       = new AdminUsersPage(TestProgressLogger);
            UserFunctions        userFunctions           = new UserFunctions(TestProgressLogger);
            UserCommonFunctions  userCommonFunction      = new UserCommonFunctions(TestProgressLogger);
            AdminTradePage       objAdminTradePage       = new AdminTradePage(TestProgressLogger);

            try
            {
                //Login as admin -> Click on "Trades" menu button
                objAdminFunctions.AdminLogIn(TestProgressLogger);
                objAdminCommonFunctions.SelectTradeMenu();
                // This method with will verify the AccountId textfield
                //Assert.True(objAdminTradePage.VerifySearchByAccountId(accountId));

                // This method with will verify the UserId textfield
                Assert.True(objAdminTradePage.VerifySearchByUserId(userId));
            }
            catch (NoSuchElementException ex)
            {
                TestProgressLogger.TakeScreenshot();
                TestProgressLogger.LogCheckPoint(ex.Message + ex.StackTrace);
                TestProgressLogger.LogError(String.Format(LogMessage.VerifyRevokeUserPermissionFailed), ex);
                throw ex;
            }
            catch (Exception e)
            {
                TestProgressLogger.TakeScreenshot();
                TestProgressLogger.LogCheckPoint(e.Message + e.StackTrace);
                TestProgressLogger.LogError(String.Format(LogMessage.VerifyRevokeUserPermissionFailed), e);
                throw e;
            }
            finally
            {
                objAdminCommonFunctions.UserMenuBtn();
                objAdminFunctions.AdminLogOut();
                TestProgressLogger.EndTest();
            }
        }
コード例 #20
0
        public void TCAdmin28_VerifyExportedByPermissionsDataTest()
        {
            selectByPermissionOption = TestData.GetData("TCAdmin28_SelectByPermissionOption");
            selectUserPermission     = TestData.GetData("TCAdmin28_SelectUserPermission");
            byPermissionUserIdValue  = TestData.GetData("TCAdmin28_UserId");

            AdminFunctions       objAdminFunctions       = new AdminFunctions(TestProgressLogger);
            AdminCommonFunctions objAdminCommonFunctions = new AdminCommonFunctions(TestProgressLogger);
            AdminUsersPage       objAdminUsersPage       = new AdminUsersPage(TestProgressLogger);
            GenericUtils         genericUtils            = new GenericUtils(TestProgressLogger);

            try
            {
                TestProgressLogger.StartTest();

                // This method is used to Delete all files from the Folder
                genericUtils.DeleteAllFiles();
                // Login as admin -> Click on "Users" menu button -> Users Tab
                objAdminUsersPage.SelectAdminUserTab();
                // Verify the "All users" exported csv file in the Admin UI
                Assert.True(objAdminUsersPage.VerifyExportByPermission(selectByPermissionOption, byPermissionUserIdValue, selectUserPermission));
            }
            catch (NoSuchElementException ex)
            {
                TestProgressLogger.TakeScreenshot();
                TestProgressLogger.LogCheckPoint(ex.Message + ex.StackTrace);
                TestProgressLogger.LogError(String.Format(LogMessage.VerifyByPermissionExportedCSVFileFailed), ex);
                throw ex;
            }
            catch (Exception e)
            {
                TestProgressLogger.TakeScreenshot();
                TestProgressLogger.LogCheckPoint(e.Message + e.StackTrace);
                TestProgressLogger.LogError(String.Format(LogMessage.VerifyByPermissionExportedCSVFileFailed), e);
                throw e;
            }
            finally
            {
                objAdminCommonFunctions.UserMenuBtn();
                objAdminFunctions.AdminLogOut();
                TestProgressLogger.EndTest();
            }
        }
コード例 #21
0
        public void TCAdmin5_VerifyUserPermissionConfigureTest()
        {
            submitBlockTradePermission = TestData.GetData("TCAdmin5_SubmitBlockTradePermission");

            string               username;
            AdminFunctions       objAdminFunctions       = new AdminFunctions(TestProgressLogger);
            AdminCommonFunctions objAdminCommonFunctions = new AdminCommonFunctions(TestProgressLogger);

            try
            {
                TestProgressLogger.StartTest();

                //Login as admin -> Click on "Users" menu button
                objAdminFunctions.AdminLogIn(TestProgressLogger);
                objAdminCommonFunctions.ClickOnUsersMenuLink();
                objAdminCommonFunctions.UsersTabBtn();
                username = objAdminCommonFunctions.getUserNameFromUserList();
                objAdminCommonFunctions.SelectUserFromUserList(driver, username);
                objAdminCommonFunctions.UserPermissionButton();
                objAdminCommonFunctions.AddSubmitBlockTradePermissions(submitBlockTradePermission);
            }

            catch (NoSuchElementException ex)
            {
                TestProgressLogger.TakeScreenshot();
                TestProgressLogger.LogCheckPoint(ex.Message + ex.StackTrace);
                TestProgressLogger.LogError(String.Format(LogMessage.VerifyAddUserPassed), ex);
                throw ex;
            }
            catch (Exception e)
            {
                TestProgressLogger.TakeScreenshot();
                TestProgressLogger.LogCheckPoint(e.Message + e.StackTrace);
                TestProgressLogger.LogError(String.Format(LogMessage.VerifyAddUserFailed), e);
                throw e;
            }
            finally
            {
                TestProgressLogger.EndTest();
            }
        }
コード例 #22
0
        public void TC44_VerifyCreateAPIKey()
        {
            try
            {
                TestProgressLogger.StartTest();
                UserFunctions   userFunctions    = new UserFunctions(TestProgressLogger);
                UserSettingPage userSettingsPage = new UserSettingPage(driver, TestProgressLogger);
                userFunctions.LogIn(TestProgressLogger, Const.USER1);
                // Login -> navigate to User Settings and Select API Key
                Assert.True((userSettingsPage.SelectAPIKey()), LogMessage.CreateAPIKeyBtnIsNotPresent);
                TestProgressLogger.LogCheckPoint(String.Format(LogMessage.CreateAPIKeyBtnIsPresent));
                // Verify that the checkboxes are present
                Assert.True((userSettingsPage.VerifyAPIKeyCheckboxesArePresent()), LogMessage.APIKeyCheckboxesAreNotPresent);
                TestProgressLogger.LogCheckPoint(String.Format(LogMessage.APIKeyCheckboxesArePresent));
                // Create API key and verify the key is created successfully
                Assert.True((userSettingsPage.CreateAndVerifyAPIKey()), LogMessage.APIKeyCreatedFailureMsg);
                TestProgressLogger.LogCheckPoint(String.Format(LogMessage.APIKeyCreatedSuccessMsg));
            }
            catch (NoSuchElementException ex)
            {
                TestProgressLogger.TakeScreenshot();
                TestProgressLogger.LogCheckPoint(ex.Message + ex.StackTrace);
                TestProgressLogger.LogError(LogMessage.CreateAPIKeyFailed, ex);

                throw;
            }
            catch (Exception e)
            {
                TestProgressLogger.TakeScreenshot();
                TestProgressLogger.LogCheckPoint(e.Message + e.StackTrace);
                TestProgressLogger.LogError(LogMessage.CreateAPIKeyFailed, e);
                throw e;
            }
            finally
            {
                TestProgressLogger.EndTest();
            }
        }
コード例 #23
0
        public void TC45_VerifyAffiliateProgram()
        {
            string userByID          = TestData.GetData("TC45_UserByID");
            string affiliateTagID    = TestData.GetData("TC45_AffiliateTagID");
            string verificationLevel = TestData.GetData("TC45_VerificationLevel");

            TestProgressLogger.StartTest();
            AdminFunctions       objAdminFunctions       = new AdminFunctions(TestProgressLogger);
            UserFunctions        userFunctions           = new UserFunctions(TestProgressLogger);
            AdminCommonFunctions objAdminCommonFunctions = new AdminCommonFunctions(TestProgressLogger);
            UserSettingPage      userSettingsPage        = new UserSettingPage(driver, TestProgressLogger);

            try
            {
                objAdminFunctions.AdminLogIn(TestProgressLogger);
                objAdminCommonFunctions.ClickOnUsersMenuLink();
                objAdminCommonFunctions.UserByIDText(userByID);
                objAdminCommonFunctions.OpenUserButton();
                objAdminCommonFunctions.AffiliateTagCreation(affiliateTagID);
                objAdminCommonFunctions.UserMenuBtn();
                objAdminFunctions.AdminLogOut();
                userFunctions.LogIn(TestProgressLogger, Const.USER12);
                Assert.True(userSettingsPage.VerifyAffiliateProgramFunctionality(driver, verificationLevel));
                TestProgressLogger.LogCheckPoint(String.Format(LogMessage.AffiliateProgramSuccessMsg));
            }
            catch (Exception e)
            {
                TestProgressLogger.TakeScreenshot();
                TestProgressLogger.LogError(LogMessage.AffiliateProgramFailureMsg, e);
                throw e;
            }
            finally
            {
                TestProgressLogger.EndTest();
                UserFunctions userFunctionality = new UserFunctions(TestProgressLogger);
                userFunctionality.LogOut();
            }
        }
コード例 #24
0
        public void TC47_VerifySingleReportTradeActivities()
        {
            string reportTypeValue;
            string startDate;
            string endDate;

            reportTypeValue = TestData.GetData("TC47_SingleReportTradeActivityValue");
            try
            {
                //Login as a User
                TestProgressLogger.StartTest();
                UserFunctions objUserFunctionality = new UserFunctions(TestProgressLogger);
                objUserFunctionality.LogIn(TestProgressLogger, Const.USER14);

                TradeReportsPage objTradeReportsPage = new TradeReportsPage(driver, TestProgressLogger);
                startDate = GenericUtils.GetCurrentDateMinusOne();
                endDate   = GenericUtils.GetCurrentDate();
                Assert.True(objTradeReportsPage.VerifySingleReportData(reportTypeValue, startDate, endDate));
                TestProgressLogger.LogCheckPoint(String.Format(LogMessage.VerifySingleReportTradeActivitiesPassed, reportTypeValue));
            }
            catch (NoSuchElementException ex)
            {
                TestProgressLogger.LogCheckPoint(ex.Message + ex.StackTrace);
                throw ex;
            }
            catch (Exception e)
            {
                TestProgressLogger.TakeScreenshot();
                TestProgressLogger.LogCheckPoint(String.Format(LogMessage.VerifySingleReportTradeActivitiesFailed, reportTypeValue));
                throw e;
            }
            finally
            {
                TestProgressLogger.EndTest();
                UserFunctions userFunctionality = new UserFunctions(TestProgressLogger);
                userFunctionality.LogOut();
            }
        }
コード例 #25
0
        public void TC1_VerifyDetailsOnLandingPageTest()
        {
            instrument             = TestData.GetData("Instrument");
            menuTab                = TestData.GetData("MenuTab");
            buyTab                 = TestData.GetData("BuyTab");
            sellTab                = TestData.GetData("SellTab");
            orderBook              = TestData.GetData("OrderBookValue");
            openOrders             = TestData.GetData("OpenOrdersValue");
            filledOrders           = TestData.GetData("FilledOrdersValue");
            InactiveOrders         = TestData.GetData("InactiveOrdersValue");
            tradeReports           = TestData.GetData("TradeReportsValue");
            depositStatus          = TestData.GetData("DepositStatusValue");
            withdrawStatus         = TestData.GetData("WithdrawStatusValue");
            pairValue              = TestData.GetData("TC1_PairValue");
            sideValue              = TestData.GetData("TC1_SideValue");
            typeValue              = TestData.GetData("TC1_TypeValue");
            sizeValue              = TestData.GetData("TC1_SizeValue");
            priceValue             = TestData.GetData("TC1_PriceValue");
            dateTimeValue          = TestData.GetData("TC1_DateTimeValue");
            statusValue            = TestData.GetData("TC1_StatusValue");
            actionValue            = TestData.GetData("TC1_ActionValue");
            actionsValue           = TestData.GetData("TC1_ActionsValue");
            idValue                = TestData.GetData("TC1_IDValue");
            totalValue             = TestData.GetData("TC1_TotalValue");
            feeValue               = TestData.GetData("TC1_FeeValue");
            executionValue         = TestData.GetData("TC1_ExecutionIDValue");
            productValue           = TestData.GetData("TC1_ProductValue");
            amountValue            = TestData.GetData("TC1_AmountValue");
            createdValue           = TestData.GetData("TC1_CreatedValue");
            priceChartValue        = TestData.GetData("TC1_PriceChartValue");
            availableBalanceValue  = TestData.GetData("TC1_AvailableBalanceValue");
            holdValue              = TestData.GetData("TC1_HoldValue");
            pendingDepositsValue   = TestData.GetData("TC1_PendingDepositsValue");
            totalBalanceValue      = TestData.GetData("TC1_TotalBalanceValue");
            recentTradesPriceValue = TestData.GetData("TC1_RecentTradesPriceValue");
            recentTradesQtyValue   = TestData.GetData("TC1_RecentTradesQtyValue");
            recentTradesTimeValue  = TestData.GetData("TC1_RecentTradesTimeValue");
            orderBookPriceValue    = TestData.GetData("TC1_OrderBookPriceValue");
            orderBookQtyValue      = TestData.GetData("TC1_OrderBookQtyValue");
            orderBookMySizeValue   = TestData.GetData("TC1_OrderBookMySizeValue");

            OrderEntryMarketValue = TestData.GetData("TC1_OrderEntryMarketValue");
            OrderEntryLimitValue  = TestData.GetData("TC1_OrderEntryLimitValue");
            OrderEntryStopValue   = TestData.GetData("TC1_OrderEntryStopValue");

            DetailsOnLandingPage objDetailsOnLandingPage = new DetailsOnLandingPage(TestProgressLogger);

            try
            {
                TestProgressLogger.StartTest();
                UserFunctions userFunctions = new UserFunctions(TestProgressLogger);
                userFunctions.LogIn(TestProgressLogger, Const.USER14);
                UserCommonFunctions.DashBoardMenuButton(driver);
                UserCommonFunctions.SelectAnExchange(driver);
                Assert.True(objDetailsOnLandingPage.ExchangeLinkButton());
                UserCommonFunctions.SelectInstrumentFromExchange(instrument, driver);
                Assert.True(objDetailsOnLandingPage.VerifyOpenOrdersTab(openOrders, pairValue, sideValue, typeValue, sizeValue, priceValue, dateTimeValue, statusValue, actionValue));
                Assert.True(objDetailsOnLandingPage.VerifyFilledOrdersTab(filledOrders, idValue, pairValue, sideValue, sizeValue, priceValue, totalValue, feeValue, executionValue, dateTimeValue));
                Assert.True(objDetailsOnLandingPage.VerifyInactiveOrdersTab(filledOrders, pairValue, sideValue, typeValue, sizeValue, priceValue, dateTimeValue, statusValue));
                Assert.True(objDetailsOnLandingPage.VerifyTradeReportTab(tradeReports, pairValue, sideValue, sizeValue, priceValue, feeValue, dateTimeValue, statusValue));
                Assert.True(objDetailsOnLandingPage.VerifyDepositStatusTab(depositStatus, productValue, amountValue, statusValue, createdValue, feeValue));
                Assert.True(objDetailsOnLandingPage.VerifyWithdrawStatusTab(withdrawStatus, productValue, amountValue, statusValue, createdValue, feeValue, actionsValue));
                Assert.True(objDetailsOnLandingPage.PriceChartTxt(priceChartValue));
                Assert.True(objDetailsOnLandingPage.OrderEntryWithBuyOption());
                Assert.True(objDetailsOnLandingPage.OrderEntryWithSellOption());
                objDetailsOnLandingPage.balancesBtn();
                Assert.True(objDetailsOnLandingPage.AvailableBalanceTxt(availableBalanceValue));
                Assert.True(objDetailsOnLandingPage.HoldTxt(holdValue));
                Assert.True(objDetailsOnLandingPage.PendingDepositsTxt(pendingDepositsValue));
                Assert.True(objDetailsOnLandingPage.TotalBalanceTxt(totalBalanceValue));
                Assert.True(objDetailsOnLandingPage.verifyOrderBookMenuTab(orderBookPriceValue, orderBookQtyValue, orderBookMySizeValue));
                Assert.True(objDetailsOnLandingPage.verifyRecentTradesMenuTab(recentTradesPriceValue, recentTradesQtyValue, recentTradesTimeValue));
                objDetailsOnLandingPage.OrderEntryBtn();
                Thread.Sleep(2000);
                Assert.True(objDetailsOnLandingPage.VerifyBuyOrderEntryMenuAndSubMenuTab(buyTab, OrderEntryMarketValue, OrderEntryLimitValue, OrderEntryStopValue));
                Assert.True(objDetailsOnLandingPage.VerifySellOrderEntryMenuAndSubMenuTab(sellTab, OrderEntryMarketValue, OrderEntryLimitValue, OrderEntryStopValue));
                Assert.True(objDetailsOnLandingPage.CancelBtn());
                Assert.True(objDetailsOnLandingPage.AdvanceOrderBtn());
                Assert.True(objDetailsOnLandingPage.OrderEntryButn());
                Assert.True(objDetailsOnLandingPage.balancesButn());
                Assert.True(objDetailsOnLandingPage.VariouOptionInPriceChart());

                Thread.Sleep(3000);
            }
            catch (NoSuchElementException ex)
            {
                TestProgressLogger.LogCheckPoint(ex.Message + ex.StackTrace);
            }
            catch (Exception e)
            {
                TestProgressLogger.TakeScreenshot();
                TestProgressLogger.Error(String.Format(LogMessage.VerifiedDetailInLandingPageFailed));
                throw e;
            }
            finally
            {
                TestProgressLogger.EndTest();
                UserFunctions userFunctionality = new UserFunctions(TestProgressLogger);
                userFunctionality.LogOut();
            }
        }
コード例 #26
0
        public void TC39_WalletsReceiveRequestbyEmail()
        {
            try
            {
                string username;
                string currentBalanceOfUser7;
                string currentBalanceOfUser8;
                string availablebalance;
                string totalbalance;
                string withdrawSuccessMsg;
                string updatedCurrentBalance;
                string expectedupdateBalance;
                string currentBalance;
                string expupdateBalance;
                string availablebalanceAfterApprove;


                instrument          = TestData.GetData("Instrument");
                currencyName        = TestData.GetData("CurrencyName");
                comment             = TestData.GetData("Comment");
                amountOfBtcToSend   = TestData.GetData("AmountOfBtcToSend");
                withdrawStatus      = TestData.GetData("WithdrawStatus");
                user12_EmailAddress = TestData.GetData("User_12EmailAddress");
                user13_EmailAddress = TestData.GetData("User_13EmailAddress");

                TestProgressLogger.StartTest();

                UserFunctions userFunctions = new UserFunctions(TestProgressLogger);
                username = userFunctions.LogIn(TestProgressLogger, Const.USER12);
                TestProgressLogger.LogCheckPoint(String.Format(LogMessage.UserLoggedInSuccessfully, Const.USER12));
                UserCommonFunctions.DashBoardMenuButton(driver);
                UserCommonFunctions.NavigateToWallets(driver);
                TestProgressLogger.LogCheckPoint(String.Format(LogMessage.NavigateWalletsPage));

                WalletPage walletpage = new WalletPage();
                currentBalanceOfUser7 = walletpage.GetInstrumentCurrentBalance(driver, currencyName);
                TestProgressLogger.LogCheckPoint(String.Format(LogMessage.StoreCurrentBalance, Const.USER12));
                userFunctions.LogOut();
                TestProgressLogger.LogCheckPoint(String.Format(LogMessage.UserLoggedOutSuccessfully, Const.USER12));

                userFunctions.LogIn(TestProgressLogger, Const.USER13);
                TestProgressLogger.LogCheckPoint(String.Format(LogMessage.UserLoggedInSuccessfully, Const.USER13));

                UserCommonFunctions.DashBoardMenuButton(driver);
                UserCommonFunctions.NavigateToWallets(driver);
                TestProgressLogger.LogCheckPoint(String.Format(LogMessage.NavigateWalletsPage));

                currentBalanceOfUser8 = walletpage.GetInstrumentCurrentBalance(driver, currencyName);
                TestProgressLogger.LogCheckPoint(String.Format(LogMessage.StoreCurrentBalance, Const.USER13));
                walletpage.ClickInstrumentDetails(driver, currencyName);
                walletpage.GetHoldAvailablePendingDepositTotalBalanceOnDetailsPage(driver);
                availablebalance = walletpage.AvailableBalanceDetailsPage;
                totalbalance     = walletpage.AvailableBalanceDetailsPage;
                walletpage.ClickReceiveButtonOnDetailsPage(driver);
                walletpage.ClickOnReceiveRequestByEmail(driver);
                walletpage.SendBitCoinRequestByEmail(driver, comment, user12_EmailAddress, amountOfBtcToSend);
                walletpage.ClickOnSendBitCoin(driver);
                walletpage.VerifyConfirmationModal(driver, user12_EmailAddress, amountOfBtcToSend);
                TestProgressLogger.LogCheckPoint(LogMessage.VerifiedDetailsOnConfirmModal);
                walletpage.ClickConfirmButton(driver);
                TestProgressLogger.LogCheckPoint(LogMessage.ConfirmationModalVerified);
                withdrawSuccessMsg = UserCommonFunctions.GetTextOfMessage(driver, TestProgressLogger);
                Assert.Equal(Const.RequestTransferSuccessMsg, withdrawSuccessMsg);
                walletpage.CloseSendOrReciveSection(driver);
                walletpage.GetHoldAvailablePendingDepositTotalBalanceOnDetailsPage(driver);
                Assert.Equal(availablebalance, walletpage.AvailableBalanceDetailsPage);
                TestProgressLogger.LogCheckPoint(LogMessage.VerifiedAvailableBalance);
                Assert.Equal(totalbalance, walletpage.AvailableBalanceDetailsPage);
                TestProgressLogger.LogCheckPoint(LogMessage.VerifiedTotalBalance);
                walletpage.ClickRefreshTransfers(driver);
                walletpage.SelectSentRequests(driver);
                walletpage.VerifyAmountInTransferSentRequestsSection(driver, username, amountOfBtcToSend);
                TestProgressLogger.LogCheckPoint(LogMessage.VerifiedRequestUnderSentRequest);
                userFunctions.LogOut();
                TestProgressLogger.LogCheckPoint(String.Format(LogMessage.UserLoggedOutSuccessfully, Const.USER13));
                userFunctions.LogIn(TestProgressLogger, Const.USER12);
                TestProgressLogger.LogCheckPoint(String.Format(LogMessage.UserLoggedInSuccessfully, Const.USER12));

                walletpage.ClickApproveButton(driver);
                withdrawSuccessMsg = UserCommonFunctions.GetTextOfMessage(driver, TestProgressLogger);
                Assert.Equal(LogMessage.TransferApproved, withdrawSuccessMsg);
                Assert.False(walletpage.VerifyApproveButton(driver));
                Assert.False(walletpage.VerifyRejectButton(driver));
                TestProgressLogger.LogCheckPoint(LogMessage.VerifiedApproveAndRejectButton);
                UserCommonFunctions.DashBoardMenuButton(driver);
                UserCommonFunctions.NavigateToWallets(driver);
                TestProgressLogger.LogCheckPoint(String.Format(LogMessage.NavigateWalletsPage));
                updatedCurrentBalance = walletpage.GetInstrumentCurrentBalance(driver, currencyName);
                expectedupdateBalance = GenericUtils.GetDifferenceFromStringAfterSubstraction(currentBalanceOfUser7, amountOfBtcToSend);
                Assert.Equal(expectedupdateBalance, GenericUtils.RemoveCommaFromString(updatedCurrentBalance));
                TestProgressLogger.LogCheckPoint(String.Format(LogMessage.BalanceReducedSuccessfully, Const.USER12));
                userFunctions.LogOut();
                TestProgressLogger.LogCheckPoint(String.Format(LogMessage.UserLoggedOutSuccessfully, Const.USER12));

                userFunctions.LogIn(TestProgressLogger, Const.USER13);
                TestProgressLogger.LogCheckPoint(String.Format(LogMessage.UserLoggedInSuccessfully, Const.USER13));
                UserCommonFunctions.DashBoardMenuButton(driver);
                UserCommonFunctions.NavigateToWallets(driver);
                TestProgressLogger.LogCheckPoint(String.Format(LogMessage.NavigateWalletsPage));

                currentBalance   = walletpage.GetInstrumentCurrentBalance(driver, currencyName);
                expupdateBalance = GenericUtils.GetSumFromStringAfterAddition(currentBalanceOfUser8, amountOfBtcToSend);
                Assert.Equal(expupdateBalance, GenericUtils.RemoveCommaFromString(currentBalance));
                TestProgressLogger.LogCheckPoint(String.Format(LogMessage.BalanceIncreasedSuccessfully, Const.USER13));

                walletpage.ClickInstrumentDetails(driver, currencyName);
                walletpage.GetHoldAvailablePendingDepositTotalBalanceOnDetailsPage(driver);
                availablebalanceAfterApprove = walletpage.AvailableBalanceDetailsPage;
                expupdateBalance             = GenericUtils.GetSumFromStringAfterAddition(availablebalance, amountOfBtcToSend);
                Assert.Equal(expupdateBalance, GenericUtils.RemoveCommaFromString(availablebalanceAfterApprove));
                TestProgressLogger.LogCheckPoint(String.Format(LogMessage.AvailableBalanceIncresedAfterApporve, Const.USER13));
                userFunctions.LogOut();
                TestProgressLogger.LogCheckPoint(String.Format(LogMessage.UserLoggedOutSuccessfully, Const.USER13));
                TestProgressLogger.EndTest();
            }
            catch (Exception e)
            {
                TestProgressLogger.TakeScreenshot();
                TestProgressLogger.Error(LogMessage.WalletsReceiveRequestByEmailTestFailed, e);
                throw e;
            }
        }
コード例 #27
0
        public void TC6_VerifySellLimitOrder()
        {
            try
            {
                string type;
                string buyOrderFeeValue;
                string sellOrderFeeValue;
                instrument      = TestData.GetData("Instrument");
                orderType       = TestData.GetData("OrderType");
                menuTab         = TestData.GetData("MenuTab");
                buyTab          = TestData.GetData("BuyTab");
                sellTab         = TestData.GetData("SellTab");
                buyOrderSize    = TestData.GetData("TC6_BuyOrderSize");
                sellOrderSize   = TestData.GetData("TC6_SellOrderSize");
                incBuyOrderSize = TestData.GetData("TC6_IncreasedBuyOrderSize");
                decBuyOrderSize = TestData.GetData("TC6_DecreasedBuyOrderSize");
                limitPrice      = TestData.GetData("TC6_LimitPrice");
                timeInForce     = TestData.GetData("TC6_TimeInForce");
                feeComponent    = TestData.GetData("FeeComponent");

                type              = Const.Limit;
                buyOrderFeeValue  = GenericUtils.FeeAmount(buyOrderSize, feeComponent);
                sellOrderFeeValue = GenericUtils.SellFeeAmount(sellOrderSize, limitPrice, feeComponent);

                TestProgressLogger.StartTest();
                UserFunctions       userFunctions      = new UserFunctions(TestProgressLogger);
                UserCommonFunctions userCommonFunction = new UserCommonFunctions(TestProgressLogger);
                OrderEntryPage      orderEntryPage     = new OrderEntryPage(driver, TestProgressLogger);
                VerifyOrdersTab     objVerifyOrdersTab = new VerifyOrdersTab(driver, TestProgressLogger);

                // Creating Buy and Sell Order to get the last price
                userCommonFunction.PlaceOrdersToSetLastPrice(driver, instrument, buyTab, sellTab, buyOrderSize, limitPrice, timeInForce, Const.USER10, Const.USER11);

                // Scenario 1: Buy order B1 with same price is available and B1 quantity is = S1.
                userFunctions.LogIn(TestProgressLogger, Const.USER8);

                Dictionary <string, string> placeLimitSellOrder = orderEntryPage.PlaceLimitSellOrder(instrument, sellTab, sellOrderSize, limitPrice, timeInForce);
                Assert.True(objVerifyOrdersTab.VerifyOpenOrdersTab(instrument, sellTab, type, Double.Parse(sellOrderSize), limitPrice, placeLimitSellOrder["PlaceOrderTime"], placeLimitSellOrder["PlaceOrderTimePlusOneMin"]));
                TestProgressLogger.LogCheckPoint(string.Format(LogMessage.LimitOrderSuccessMsg, sellTab, sellOrderSize, limitPrice));

                userFunctions.LogIn(TestProgressLogger, Const.USER9);
                Dictionary <string, string> placeLimitBuyOrder = orderEntryPage.PlaceLimitBuyOrder(instrument, buyTab, buyOrderSize, limitPrice, timeInForce);
                Assert.True(objVerifyOrdersTab.VerifyFilledOrdersTab(instrument, buyTab, Double.Parse(buyOrderSize), buyOrderFeeValue, placeLimitBuyOrder["PlaceOrderTime"], placeLimitBuyOrder["PlaceOrderTimePlusOneMin"]));
                TestProgressLogger.LogCheckPoint(string.Format(LogMessage.LimitOrderSuccessMsg, buyTab, buyOrderSize, limitPrice));

                userFunctions.LogIn(TestProgressLogger, Const.USER8);
                orderEntryPage.NavigateToHomePage(instrument);
                Assert.True(objVerifyOrdersTab.VerifyFilledOrdersTab(instrument, sellTab, Double.Parse(sellOrderSize), sellOrderFeeValue, placeLimitSellOrder["PlaceOrderTime"], placeLimitSellOrder["PlaceOrderTimePlusOneMin"]));

                // Scenario 2: Buy order B1 with same price is available and B1 quantity is > S1.
                userFunctions.LogIn(TestProgressLogger, Const.USER8);
                Dictionary <string, string> placeLimitSellOrderS2 = orderEntryPage.PlaceLimitSellOrder(instrument, sellTab, sellOrderSize, limitPrice, timeInForce);
                Assert.True(objVerifyOrdersTab.VerifyOpenOrdersTab(instrument, sellTab, type, Double.Parse(sellOrderSize), limitPrice, placeLimitSellOrderS2["PlaceOrderTime"], placeLimitSellOrderS2["PlaceOrderTimePlusOneMin"]));
                TestProgressLogger.LogCheckPoint(string.Format(LogMessage.LimitOrderSuccessMsg, sellTab, sellOrderSize, limitPrice));

                userFunctions.LogIn(TestProgressLogger, Const.USER9);
                Dictionary <string, string> placeLimitBuyOrderS2 = orderEntryPage.PlaceLimitBuyOrder(instrument, buyTab, incBuyOrderSize, limitPrice, timeInForce);
                Assert.True(objVerifyOrdersTab.VerifyFilledOrdersTab(instrument, buyTab, Double.Parse(sellOrderSize), buyOrderFeeValue, placeLimitSellOrderS2["PlaceOrderTime"], placeLimitSellOrderS2["PlaceOrderTimePlusOneMin"]));
                TestProgressLogger.LogCheckPoint(string.Format(LogMessage.LimitOrderSuccessMsg, buyTab, incBuyOrderSize, limitPrice));

                userFunctions.LogIn(TestProgressLogger, Const.USER8);
                orderEntryPage.NavigateToHomePage(instrument);
                Assert.True(objVerifyOrdersTab.VerifyFilledOrdersTab(instrument, sellTab, Double.Parse(sellOrderSize), sellOrderFeeValue, placeLimitSellOrderS2["PlaceOrderTime"], placeLimitSellOrderS2["PlaceOrderTimePlusOneMin"]));


                // Scenario 3: Buy order B1 with same price is available and B1 quantity is < S1.
                UserCommonFunctions.LoginAndCancelAllOrders(TestProgressLogger, driver, instrument, Const.USER9);
                userFunctions.LogIn(TestProgressLogger, Const.USER8);
                Dictionary <string, string> placeLimitSellOrderS3 = orderEntryPage.PlaceLimitSellOrder(instrument, sellTab, sellOrderSize, limitPrice, timeInForce);
                Assert.True(objVerifyOrdersTab.VerifyOpenOrdersTab(instrument, sellTab, type, Double.Parse(sellOrderSize), limitPrice, placeLimitSellOrderS3["PlaceOrderTime"], placeLimitSellOrderS3["PlaceOrderTimePlusOneMin"]));
                TestProgressLogger.LogCheckPoint(string.Format(LogMessage.LimitOrderSuccessMsg, sellTab, sellOrderSize, limitPrice));

                userFunctions.LogIn(TestProgressLogger, Const.USER9);
                buyOrderFeeValue = GenericUtils.FeeAmount(decBuyOrderSize, feeComponent);
                Dictionary <string, string> placeLimitBuyOrderS3 = orderEntryPage.PlaceLimitBuyOrder(instrument, buyTab, decBuyOrderSize, limitPrice, timeInForce);
                Assert.True(objVerifyOrdersTab.VerifyFilledOrdersTab(instrument, buyTab, Double.Parse(decBuyOrderSize), buyOrderFeeValue, placeLimitSellOrderS3["PlaceOrderTime"], placeLimitSellOrderS3["PlaceOrderTimePlusOneMin"]));
                TestProgressLogger.LogCheckPoint(string.Format(LogMessage.LimitOrderSuccessMsg, buyTab, decBuyOrderSize, limitPrice));

                userFunctions.LogIn(TestProgressLogger, Const.USER8);
                orderEntryPage.NavigateToHomePage(instrument);
                sellOrderFeeValue = GenericUtils.SellFeeAmount(decBuyOrderSize, limitPrice, feeComponent);
                string orderSizeDifference = GenericUtils.GetDifferenceFromStringAfterSubstraction(sellOrderSize, decBuyOrderSize);
                Assert.True(objVerifyOrdersTab.VerifyOpenOrdersTab(instrument, sellTab, type, Double.Parse(orderSizeDifference), limitPrice, placeLimitSellOrderS3["PlaceOrderTime"], placeLimitSellOrderS3["PlaceOrderTimePlusOneMin"]));
                Assert.True(objVerifyOrdersTab.VerifyFilledOrdersTab(instrument, sellTab, Double.Parse(decBuyOrderSize), sellOrderFeeValue, placeLimitSellOrderS3["PlaceOrderTime"], placeLimitSellOrderS3["PlaceOrderTimePlusOneMin"]));

                // This step cancels the remaining order and verifies the same in Open orders tab
                UserCommonFunctions.CancelOrderBookSellOrder(driver);
                Assert.False(objVerifyOrdersTab.VerifyOpenOrdersTab(instrument, sellTab, type, Double.Parse(orderSizeDifference), limitPrice, placeLimitSellOrderS3["PlaceOrderTime"], placeLimitSellOrderS3["PlaceOrderTimePlusOneMin"]));
            }
            catch (NoSuchElementException ex)
            {
                TestProgressLogger.LogCheckPoint(ex.Message + ex.StackTrace);
                throw ex;
            }
            catch (Exception e)
            {
                TestProgressLogger.TakeScreenshot();
                TestProgressLogger.Error(LogMessage.MarketOrderTestFailed, e);
                throw e;
            }
            finally
            {
                TestProgressLogger.EndTest();
            }
        }
コード例 #28
0
        public void TC36_SendExternalWallets()
        {
            try
            {
                string emailAddress;
                string gmailPassword;
                string successMsg;
                string currentBalanceOfUser3;
                string holdBalance;
                string availableBalance;
                string btcAmount;
                string minerFees;
                string btcTotalaAmount;
                string withdrawSuccessMsg;
                string increasedHoldAmount;
                string incresedHoldBalance;
                string TotalBalance;
                string reducedAvailableBalance;
                string hold;
                string expectedReducedAvailableBalance;
                string statusID;
                string mailSubject;
                string withdrawSuccess;
                string acceptedticketStatus;
                string totalBalance;
                string expectedReducedHoldBalance;
                string expectedReducedTotalBalance;
                string linkUrl;
                string ticketStatusNew;

                instrument           = TestData.GetData("Instrument");
                currencyName         = TestData.GetData("CurrencyName");
                comment              = TestData.GetData("Comment");
                amountOfBtcToSend    = TestData.GetData("AmountOfBtcToSend");
                withdrawStatus       = TestData.GetData("WithdrawStatus");
                emailAddress         = TestData.GetData("User_14EmailAddress");
                gmailPassword        = TestData.GetData("GmailUser_Test1Password");
                mailSubject          = TestData.GetData("GmailMailSubject_ConfirmYourWithdraw");
                acceptedticketStatus = TestData.GetData("AcceptedTicketStatus");
                ticketStatusNew      = TestData.GetData("TicketStatus");

                TestProgressLogger.StartTest();
                UserFunctions userFunctions = new UserFunctions(TestProgressLogger);
                userFunctions.LogIn(TestProgressLogger, Const.USER12);
                TestProgressLogger.LogCheckPoint(String.Format(LogMessage.UserLoggedInSuccessfully, Const.USER12));

                UserCommonFunctions.DashBoardMenuButton(driver);
                UserCommonFunctions.NavigateToWallets(driver);
                TestProgressLogger.LogCheckPoint(String.Format(LogMessage.NavigateWalletsPage));

                WalletPage walletpage = new WalletPage();
                walletpage.ClickOnInstrumentReceiveButton(driver, currencyName);
                walletpage.CopyAddressToReceiveBTC(driver);
                successMsg = UserCommonFunctions.GetTextOfMessage(driver, TestProgressLogger);
                Assert.Equal(Const.CopyAddressSuccessMsg, successMsg);
                TestProgressLogger.LogCheckPoint(String.Format(LogMessage.RecievedAddressCopied, Const.USER12));
                walletpage.CloseSendOrReciveSection(driver);
                userFunctions.LogOut();
                TestProgressLogger.LogCheckPoint(String.Format(LogMessage.UserLoggedOutSuccessfully, Const.USER12));

                userFunctions.LogIn(TestProgressLogger, Const.USER14);
                TestProgressLogger.LogCheckPoint(String.Format(LogMessage.UserLoggedInSuccessfully, Const.USER14));
                UserCommonFunctions.DashBoardMenuButton(driver);
                UserCommonFunctions.NavigateToWallets(driver);
                TestProgressLogger.LogCheckPoint(String.Format(LogMessage.NavigateWalletsPage));

                currentBalanceOfUser3 = walletpage.GetInstrumentCurrentBalance(driver, currencyName);
                walletpage.ClickInstrumentDetails(driver, currencyName);
                walletpage.GetHoldAvailablePendingDepositTotalBalanceOnDetailsPage(driver);
                holdBalance      = walletpage.HoldBalanceDetailsPage;
                availableBalance = walletpage.AvailableBalanceDetailsPage;
                walletpage.ClickSendButtonOnDetailsPage(driver);
                walletpage.SendBitCoinExternalWallet(driver, comment, amountOfBtcToSend);
                TestProgressLogger.LogCheckPoint(String.Format(LogMessage.SendBitCoinSuccessfully, amountOfBtcToSend));
                btcAmount       = walletpage.GetBtcAmountOnConfirmation(driver);
                minerFees       = walletpage.GetMinerFeesOnConfirmation(driver);
                btcTotalaAmount = GenericUtils.GetSumFromStringAfterAddition(btcAmount, minerFees);
                walletpage.ClickConfirmButton(driver);
                withdrawSuccessMsg = UserCommonFunctions.GetTextOfMessage(driver, TestProgressLogger);
                Assert.Equal(Const.WithdrawSuccessMsg, withdrawSuccessMsg);

                increasedHoldAmount = GenericUtils.GetSumFromStringAfterAddition(holdBalance, btcTotalaAmount);
                walletpage.GetHoldAvailablePendingDepositTotalBalanceOnDetailsPage(driver);
                incresedHoldBalance     = walletpage.HoldBalanceDetailsPage;
                TotalBalance            = walletpage.TotalBalanceDetailsPage;
                reducedAvailableBalance = walletpage.AvailableBalanceDetailsPage;
                hold = GenericUtils.ConvertToDoubleFormat(GenericUtils.ConvertStringToDouble(increasedHoldAmount));
                Assert.Equal(hold, incresedHoldBalance);
                TestProgressLogger.LogCheckPoint(LogMessage.HoldAmountIncreasedSuccessfully);

                expectedReducedAvailableBalance = GenericUtils.GetDifferenceFromStringAfterSubstraction(availableBalance, btcTotalaAmount);
                Assert.Equal(expectedReducedAvailableBalance, GenericUtils.RemoveCommaFromString(reducedAvailableBalance));
                TestProgressLogger.LogCheckPoint(LogMessage.AvailableAmountReducedSuccessfully);
                statusID = walletpage.GetStatusID(driver);
                userFunctions.LogOut();
                TestProgressLogger.LogCheckPoint(String.Format(LogMessage.UserLoggedOutSuccessfully, Const.USER14));

                AdminFunctions adminfunctions = new AdminFunctions(TestProgressLogger);
                adminfunctions.AdminLogIn(TestProgressLogger, Const.ADMIN1);

                AdminCommonFunctions admincommonfunctions = new AdminCommonFunctions(TestProgressLogger);
                admincommonfunctions.SelectTicketsMenu();
                admincommonfunctions.VerifyStatus(driver, statusID, withdrawStatus);
                TestProgressLogger.LogCheckPoint(String.Format(LogMessage.CreatedTicketStatusVerified, statusID));
                admincommonfunctions.UserMenuBtn();
                adminfunctions.AdminLogOut();
                TestProgressLogger.LogCheckPoint(String.Format(LogMessage.AdminUserLogoutSuccessfully, Const.ADMIN1));

                GmailCommonFunctions gmailobj = new GmailCommonFunctions();
                linkUrl = gmailobj.Gmail(driver, emailAddress, gmailPassword, mailSubject);
                driver.Navigate().GoToUrl(linkUrl);
                withdrawSuccess = walletpage.GetWithdrawConfirmedMsg(driver);
                Assert.Equal(LogMessage.WithdrawSuccessfullyConfirmMsg, withdrawSuccess);
                walletpage.ClickOnGoToExchange(driver);
                TestProgressLogger.LogCheckPoint(LogMessage.WithdrawConfirmedMassage);

                adminfunctions.AdminLogIn(TestProgressLogger, Const.ADMIN1);
                admincommonfunctions = new AdminCommonFunctions(TestProgressLogger);
                admincommonfunctions.SelectTicketsMenu();
                admincommonfunctions.VerifyStatus(driver, statusID, ticketStatusNew);

                admincommonfunctions.DoubleClickOnCreatedDepositTicket(driver, statusID);
                admincommonfunctions.ClickOnAcceptButtonFromDepositsTicketModal();
                admincommonfunctions.VerifyStatus(driver, statusID, acceptedticketStatus);
                TestProgressLogger.LogCheckPoint(LogMessage.VerifiedTicketStatus);
                admincommonfunctions.UserMenuBtn();
                adminfunctions.AdminLogOut();
                TestProgressLogger.LogCheckPoint(String.Format(LogMessage.AdminUserLogoutSuccessfully, Const.ADMIN1));

                userFunctions.LogIn(TestProgressLogger, Const.USER14);
                TestProgressLogger.LogCheckPoint(String.Format(LogMessage.UserLoggedInSuccessfully, Const.USER14));
                UserCommonFunctions.DashBoardMenuButton(driver);
                UserCommonFunctions.NavigateToWallets(driver);
                TestProgressLogger.LogCheckPoint(String.Format(LogMessage.NavigateWalletsPage));

                currentBalanceOfUser3 = walletpage.GetInstrumentCurrentBalance(driver, currencyName);
                walletpage.ClickInstrumentDetails(driver, currencyName);
                walletpage.GetHoldAvailablePendingDepositTotalBalanceOnDetailsPage(driver);
                holdBalance  = walletpage.HoldBalanceDetailsPage;
                totalBalance = walletpage.TotalBalanceDetailsPage;

                expectedReducedHoldBalance = GenericUtils.GetDifferenceFromStringAfterSubstraction(incresedHoldBalance, btcTotalaAmount);
                Assert.Equal(expectedReducedHoldBalance, GenericUtils.RemoveCommaFromString(holdBalance));
                TestProgressLogger.LogCheckPoint(LogMessage.HoldBalanceVerified);

                expectedReducedTotalBalance = GenericUtils.GetDifferenceFromStringAfterSubstraction(TotalBalance, btcTotalaAmount);
                Assert.Equal(expectedReducedTotalBalance, GenericUtils.RemoveCommaFromString(totalBalance));
                TestProgressLogger.LogCheckPoint(LogMessage.TotalBalanceVerified);

                userFunctions.LogOut();
                TestProgressLogger.LogCheckPoint(String.Format(LogMessage.UserLoggedOutSuccessfully, Const.USER14));
                TestProgressLogger.EndTest();
            }
            catch (Exception e)
            {
                TestProgressLogger.TakeScreenshot();
                TestProgressLogger.Error(LogMessage.SendExternalWalletsTestFailed, e);
                throw e;
            }
        }
コード例 #29
0
        public void TC40_WalletsWithdrawFiatcurrency()
        {
            try
            {
                string emailAddress;
                string gmailPassword;
                string amounttowithdraw;
                string currentUSDBalance;
                string fee;
                string remainingBalance;
                string amountToWithdrawAndFees;
                string expectedRemainingBalance;
                string holdBalance;
                string totalBalance;
                string availableBalance;
                string withdrawSuccessMsg;
                string holdBalanceAfterDeposit;
                string availableBalanceAfterDeposit;
                string expectedAvailableBalanceAfterDeposit;
                string expectedHoldBalanceAfterDeposit;
                string statusID;
                string linkUrl;
                string ticketStatus;
                string withdrawSuccess;
                string mailSubject;
                string totalBalanceAfterDeposit;
                string expectedTotalBalanceAfterDeposit;


                currencyName          = TestData.GetData("USDCurrency");
                comment               = TestData.GetData("TC40_Comment");
                amountOfUSDToWithdraw = TestData.GetData("USDAmount");
                fullName              = TestData.GetData("FullName");
                language              = TestData.GetData("TC40_Language");
                bankAddress           = TestData.GetData("TC40_BankAddress");
                bankAccountNumber     = TestData.GetData("TC40_BankAccountNumber");
                bankName              = TestData.GetData("TC40_BankName");
                swiftCode             = TestData.GetData("TC40_SwiftCode");
                withdrawStatus        = TestData.GetData("WithdrawStatus");
                emailAddress          = TestData.GetData("User_14EmailAddress");
                gmailPassword         = TestData.GetData("GmailUser_Test1Password");
                mailSubject           = TestData.GetData("GmailMailSubject_ConfirmYourWithdraw");
                ticketStatus          = TestData.GetData("FullyProcessedTicketStatus");

                TestProgressLogger.StartTest();
                UserFunctions userFunctions = new UserFunctions(TestProgressLogger);
                userFunctions.LogIn(TestProgressLogger, Const.USER15);
                TestProgressLogger.LogCheckPoint(String.Format(LogMessage.UserLoggedInSuccessfully, Const.USER15));

                UserCommonFunctions.DashBoardMenuButton(driver);
                UserCommonFunctions.NavigateToWallets(driver);
                TestProgressLogger.LogCheckPoint(String.Format(LogMessage.NavigateWalletsPage));

                WalletPage walletpage = new WalletPage();
                walletpage.ClickInstrumentDetails(driver, currencyName);
                walletpage.GetHoldAvailablePendingDepositTotalBalanceOnDetailsPage(driver);
                holdBalance      = walletpage.HoldBalanceDetailsPage;
                availableBalance = walletpage.AvailableBalanceDetailsPage;
                walletpage.ClickWithdrawButtonOnDetails(driver);

                walletpage.WithdrawUSD(driver, amountOfUSDToWithdraw, fullName, language, comment, bankAddress, bankAccountNumber, bankName, swiftCode);
                amounttowithdraw  = walletpage.GetAmountToWithdraw(driver);
                currentUSDBalance = walletpage.GetCurrentUSDBalance(driver);
                fee = walletpage.GetFee(driver);
                remainingBalance         = walletpage.GetRemainingBalance(driver);
                amountToWithdrawAndFees  = GenericUtils.GetSumFromStringAfterAddition(amounttowithdraw, fee);
                expectedRemainingBalance = GenericUtils.GetDifferenceFromStringAfterSubstraction(currentUSDBalance, amountToWithdrawAndFees);
                Assert.Equal(expectedRemainingBalance, GenericUtils.RemoveCommaFromString(remainingBalance));
                TestProgressLogger.LogCheckPoint(LogMessage.RemainingBalanceVerifiedOnBalanceSection);

                walletpage.ClickOnWithdrawUSDButton(driver);
                walletpage.VerifyWithdrawUSDOnConfirmationModal(driver, amountOfUSDToWithdraw, fullName, language, comment, bankAddress, bankAccountNumber, bankName, swiftCode, fee);
                walletpage.ClickOnConfirmUSDModalButton(driver);
                TestProgressLogger.LogCheckPoint(LogMessage.ConfirmationModalVerified);
                withdrawSuccessMsg = UserCommonFunctions.GetTextOfMessage(driver, TestProgressLogger);
                Assert.Equal(LogMessage.USDWithdrawSuccessMsg, withdrawSuccessMsg);

                walletpage.GetHoldAvailablePendingDepositTotalBalanceOnDetailsPage(driver);
                holdBalanceAfterDeposit              = walletpage.HoldBalanceDetailsPage;
                availableBalanceAfterDeposit         = walletpage.AvailableBalanceDetailsPage;
                totalBalanceAfterDeposit             = walletpage.TotalBalanceDetailsPage;
                expectedAvailableBalanceAfterDeposit = GenericUtils.GetDifferenceFromStringAfterSubstraction(availableBalance, amountToWithdrawAndFees);
                Assert.Equal(expectedAvailableBalanceAfterDeposit, GenericUtils.RemoveCommaFromString(availableBalanceAfterDeposit));
                TestProgressLogger.LogCheckPoint(LogMessage.RemainingBalanceVerified);
                expectedHoldBalanceAfterDeposit = GenericUtils.GetSumFromStringAfterAddition(holdBalance, amountToWithdrawAndFees);
                Assert.Equal(expectedHoldBalanceAfterDeposit, holdBalanceAfterDeposit);
                TestProgressLogger.LogCheckPoint(LogMessage.HoldBalanceVerified);

                statusID = walletpage.GetStatusID(driver);
                userFunctions.LogOut();
                TestProgressLogger.LogCheckPoint(String.Format(LogMessage.UserLoggedOutSuccessfully, Const.USER15));

                AdminFunctions adminfunctions = new AdminFunctions(TestProgressLogger);
                adminfunctions.AdminLogIn(TestProgressLogger, Const.ADMIN1);

                AdminCommonFunctions admincommonfunctions = new AdminCommonFunctions(TestProgressLogger);
                admincommonfunctions.SelectTicketsMenu();
                admincommonfunctions.VerifyStatus(driver, statusID, withdrawStatus);
                TestProgressLogger.LogCheckPoint(String.Format(LogMessage.CreatedTicketStatusVerified, statusID));
                admincommonfunctions.UserMenuBtn();
                adminfunctions.AdminLogOut();
                TestProgressLogger.LogCheckPoint(String.Format(LogMessage.AdminUserLogoutSuccessfully, Const.ADMIN1));

                GmailCommonFunctions gmailobj = new GmailCommonFunctions();
                linkUrl = gmailobj.Gmail(driver, emailAddress, gmailPassword, mailSubject);
                driver.Navigate().GoToUrl(linkUrl);
                withdrawSuccess = walletpage.GetWithdrawConfirmedMsg(driver);
                Assert.Equal(LogMessage.WithdrawSuccessfullyConfirmMsg, withdrawSuccess);
                walletpage.ClickOnGoToExchange(driver);
                TestProgressLogger.LogCheckPoint(LogMessage.WithdrawConfirmedMassage);

                adminfunctions.AdminLogIn(TestProgressLogger, Const.ADMIN1);
                admincommonfunctions = new AdminCommonFunctions(TestProgressLogger);
                admincommonfunctions.SelectTicketsMenu();
                admincommonfunctions.VerifyStatus(driver, statusID, ticketStatus);
                TestProgressLogger.LogCheckPoint(LogMessage.VerifiedTicketStatus);
                admincommonfunctions.UserMenuBtn();
                adminfunctions.AdminLogOut();
                TestProgressLogger.LogCheckPoint(String.Format(LogMessage.AdminUserLogoutSuccessfully, Const.ADMIN1));

                userFunctions.LogIn(TestProgressLogger, Const.USER15);
                TestProgressLogger.LogCheckPoint(String.Format(LogMessage.UserLoggedInSuccessfully, Const.USER15));

                UserCommonFunctions.DashBoardMenuButton(driver);
                UserCommonFunctions.NavigateToWallets(driver);
                TestProgressLogger.LogCheckPoint(String.Format(LogMessage.NavigateWalletsPage));

                walletpage.ClickInstrumentDetails(driver, currencyName);
                walletpage.GetHoldAvailablePendingDepositTotalBalanceOnDetailsPage(driver);
                holdBalance  = walletpage.HoldBalanceDetailsPage;
                totalBalance = walletpage.TotalBalanceDetailsPage;

                expectedTotalBalanceAfterDeposit = GenericUtils.GetDifferenceFromStringAfterSubstraction(totalBalanceAfterDeposit, amountToWithdrawAndFees);
                Assert.Equal(expectedTotalBalanceAfterDeposit, GenericUtils.RemoveCommaFromString(totalBalance));
                TestProgressLogger.LogCheckPoint(LogMessage.TotalBalanceVerified);

                expectedHoldBalanceAfterDeposit = GenericUtils.GetDifferenceFromStringAfterSubstraction(holdBalanceAfterDeposit, amountToWithdrawAndFees);
                Assert.Equal(expectedHoldBalanceAfterDeposit, holdBalance);
                TestProgressLogger.LogCheckPoint(LogMessage.HoldBalanceVerified);

                userFunctions.LogOut();
                TestProgressLogger.LogCheckPoint(String.Format(LogMessage.UserLoggedOutSuccessfully, Const.USER15));

                TestProgressLogger.EndTest();
                TestProgressLogger.LogCheckPoint(LogMessage.WalletsWithdrawFiatcurrencyTestPassed);
            }
            catch (Exception e)
            {
                TestProgressLogger.TakeScreenshot();
                TestProgressLogger.Error(LogMessage.WalletsWithdrawFiatcurrencyTestFailed, e);
                throw e;
            }
        }
コード例 #30
0
        public void TC41_WalletsDepositFiatcurrency()
        {
            try
            {
                string ticketStatus;
                string AcceptedticketStatus;
                string amount;
                string availableBalanceAfterDeposit;
                string availableBalanceAfterAccept;
                string totalBalance;
                string pendingBalance;
                string withdrawSuccessMsg;
                string pendingBalanceAfterDeposit;
                string expectedPendingBalanceAfterDeposit;
                string expectedPendingBalanceAfterAccept;
                string ticketID;
                string expectedAvailableBalanceAfterAccept;

                currencyName         = TestData.GetData("USDCurrency");
                comment              = TestData.GetData("TC41_Comment");
                amount               = TestData.GetData("USDAmount");
                fullName             = TestData.GetData("FullName");
                language             = TestData.GetData("TC40_Language");
                bankAddress          = TestData.GetData("TC40_BankAddress");
                bankAccountNumber    = TestData.GetData("TC40_BankAccountNumber");
                bankName             = TestData.GetData("TC40_BankName");
                swiftCode            = TestData.GetData("TC40_SwiftCode");
                withdrawStatus       = TestData.GetData("WithdrawStatus");
                ticketStatus         = TestData.GetData("TicketStatus");
                AcceptedticketStatus = TestData.GetData("AcceptedTicketStatus");

                TestProgressLogger.StartTest();
                UserFunctions userFunctions = new UserFunctions(TestProgressLogger);
                userFunctions.LogIn(TestProgressLogger, Const.USER15);
                TestProgressLogger.LogCheckPoint(String.Format(LogMessage.UserLoggedInSuccessfully, Const.USER15));

                UserCommonFunctions.DashBoardMenuButton(driver);
                UserCommonFunctions.NavigateToWallets(driver);
                TestProgressLogger.LogCheckPoint(String.Format(LogMessage.NavigateWalletsPage));

                WalletPage walletpage = new WalletPage();
                TestProgressLogger.LogCheckPoint(String.Format(LogMessage.StoreCurrentBalance, Const.USER15));
                walletpage.ClickInstrumentDetails(driver, currencyName);
                walletpage.GetHoldAvailablePendingDepositTotalBalanceOnDetailsPage(driver);
                pendingBalance = walletpage.PendingDepositDetailsPage;
                totalBalance   = walletpage.TotalBalanceDetailsPage;
                walletpage.ClickDepositButtonOnDetails(driver);
                walletpage.SendUSDDeposit(driver, fullName, amount, comment);
                walletpage.VerifyUSDDepositOnConfirmationModal(driver, fullName, amount, comment);
                walletpage.ClickOnConfirmUSDModalButton(driver);
                TestProgressLogger.LogCheckPoint(LogMessage.ConfirmationModalVerified);
                withdrawSuccessMsg = UserCommonFunctions.GetTextOfMessage(driver, TestProgressLogger);
                Assert.Equal(LogMessage.USDDepositSuccessMsg, withdrawSuccessMsg);
                ticketID = walletpage.GetDepositUSDTicketID(driver);
                GenericUtils.RefreshPage(driver);
                walletpage.GetHoldAvailablePendingDepositTotalBalanceOnDetailsPage(driver);
                pendingBalanceAfterDeposit         = walletpage.PendingDepositDetailsPage;
                availableBalanceAfterDeposit       = walletpage.AvailableBalanceDetailsPage;
                expectedPendingBalanceAfterDeposit = GenericUtils.GetSumFromStringAfterAddition(pendingBalance, amount);
                Assert.Equal(expectedPendingBalanceAfterDeposit, GenericUtils.RemoveCommaFromString(pendingBalanceAfterDeposit));
                userFunctions.LogOut();
                TestProgressLogger.LogCheckPoint(String.Format(LogMessage.UserLoggedOutSuccessfully, Const.USER15));

                AdminFunctions adminfunctions = new AdminFunctions(TestProgressLogger);
                adminfunctions.AdminLogIn(TestProgressLogger, Const.ADMIN1);

                AdminCommonFunctions admincommonfunctions = new AdminCommonFunctions(TestProgressLogger);
                admincommonfunctions.SelectTicketsMenu();
                admincommonfunctions.NavigateToDepositTicketsTab();
                admincommonfunctions.VerifyStatus(driver, ticketID, ticketStatus);
                TestProgressLogger.LogCheckPoint(LogMessage.VerifiedTicketStatusAsNew);
                admincommonfunctions.DoubleClickOnCreatedDepositTicket(driver, ticketID);
                admincommonfunctions.ClickOnAcceptButtonFromDepositsTicketModal();
                admincommonfunctions.VerifyStatus(driver, ticketID, AcceptedticketStatus);
                TestProgressLogger.LogCheckPoint(LogMessage.VerifiedTicketStatusAsAccepted);
                admincommonfunctions.UserMenuBtn();
                adminfunctions.AdminLogOut();
                TestProgressLogger.LogCheckPoint(String.Format(LogMessage.AdminUserLogoutSuccessfully, Const.ADMIN1));

                userFunctions.LogIn(TestProgressLogger, Const.USER15);
                TestProgressLogger.LogCheckPoint(String.Format(LogMessage.UserLoggedInSuccessfully, Const.USER15));
                UserCommonFunctions.DashBoardMenuButton(driver);
                UserCommonFunctions.NavigateToWallets(driver);
                TestProgressLogger.LogCheckPoint(String.Format(LogMessage.NavigateWalletsPage));
                walletpage.ClickInstrumentDetails(driver, currencyName);
                walletpage.GetHoldAvailablePendingDepositTotalBalanceOnDetailsPage(driver);
                pendingBalance = walletpage.PendingDepositDetailsPage;
                availableBalanceAfterAccept = walletpage.AvailableBalanceDetailsPage;

                expectedPendingBalanceAfterAccept = GenericUtils.GetDifferenceFromStringAfterSubstraction(pendingBalanceAfterDeposit, amount);
                Assert.Equal(expectedPendingBalanceAfterAccept, GenericUtils.RemoveCommaFromString(pendingBalance));
                TestProgressLogger.LogCheckPoint(LogMessage.PendingBalanceVerified);

                expectedAvailableBalanceAfterAccept = GenericUtils.GetSumFromStringAfterAddition(availableBalanceAfterDeposit, amount);
                Assert.Equal(expectedAvailableBalanceAfterAccept, GenericUtils.RemoveCommaFromString(availableBalanceAfterAccept));
                TestProgressLogger.LogCheckPoint(LogMessage.AvailableBalanceVerified);

                userFunctions.LogOut();
                TestProgressLogger.LogCheckPoint(String.Format(LogMessage.UserLoggedOutSuccessfully, Const.USER15));

                TestProgressLogger.EndTest();
                TestProgressLogger.LogCheckPoint(LogMessage.WalletsDepositFiatcurrencyTestPassed);
            }
            catch (Exception e)
            {
                TestProgressLogger.TakeScreenshot();
                TestProgressLogger.Error(LogMessage.WalletsDepositFiatcurrencyTestFailed, e);
                throw e;
            }
        }