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(); } }
public void VerifySellStopOrder() { try { VerifyOrdersTab objVerifyOrdersTab = new VerifyOrdersTab(driver, output); Assert.True(objVerifyOrdersTab.VerifyOpenOrdersTab(instrumentText, "Sell", 5, 35)); logger.Info("Verified sell stop Order test passed successfully"); } catch (Exception e) { logger.Error("Verify Sell Stop Order Failed"); logger.Error(e.StackTrace); throw e; } finally { UserFunctions userFunctionality = new UserFunctions(output); userFunctionality.LogOut(); } }
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(); } }
public void TC8_VerifySellStopOrder() { 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("TC8_OrderSize"); limitPrice = TestData.GetData("TC8_LimitPrice"); timeInForce = TestData.GetData("TimeInForce"); sellStopPrice = TestData.GetData("TC8_StopPrice"); Dictionary <string, string> placeStopSellOrder; UserFunctions userFunctions = new UserFunctions(TestProgressLogger); UserCommonFunctions userCommonFunction = new UserCommonFunctions(TestProgressLogger); OrderEntryPage orderEntryPage = new OrderEntryPage(driver, TestProgressLogger); VerifyOrdersTab objVerifyOrdersTab = new VerifyOrdersTab(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, orderSize, limitPrice, timeInForce, Const.USER10, Const.USER11); TestProgressLogger.LogCheckPoint(String.Format(LogMessage.PlaceOrderToSetMarketEnd, limitPrice)); // Place Limit Buy order to set the market userFunctions.LogIn(TestProgressLogger, Const.USER11); userCommonFunction.CancelAndPlaceLimitBuyOrder(driver, instrument, buyTab, orderSize, limitPrice, timeInForce); TestProgressLogger.LogCheckPoint(String.Format(LogMessage.MarketSetupEnd, buyTab, orderSize, limitPrice)); userFunctions.LogIn(TestProgressLogger, Const.USER5); // Place Stop Buy order with Stop Price < market price placeStopSellOrder = orderEntryPage.PlaceStopSellOrder(instrument, sellTab, Double.Parse(orderSize), Double.Parse(feeComponent), Double.Parse(sellStopPrice)); // Verify that the order is present in the Open Orders tab Assert.True(objVerifyOrdersTab.VerifyOpenOrdersTab(placeStopSellOrder["Instrument"], placeStopSellOrder["Side"], type, Double.Parse(placeStopSellOrder["SellAmount"]), placeStopSellOrder["StopPrice"], placeStopSellOrder["PlaceOrderTime"], placeStopSellOrder["PlaceOrderTimePlusOneMin"])); TestProgressLogger.LogCheckPoint(string.Format(LogMessage.BuyStopOrderSuccessMsg, sellTab)); // This cancels all the previous open orders UserCommonFunctions.LoginAndCancelAllOrders(TestProgressLogger, driver, instrument, Const.USER11); UserCommonFunctions.LoginAndCancelAllOrders(TestProgressLogger, driver, instrument, Const.USER5); } catch (NoSuchElementException ex) { TestProgressLogger.TakeScreenshot(); TestProgressLogger.LogCheckPoint(ex.Message + ex.StackTrace); TestProgressLogger.LogError(String.Format(LogMessage.StopOrderTestFailed, sellTab), ex); throw ex; } catch (Exception e) { TestProgressLogger.TakeScreenshot(); TestProgressLogger.LogCheckPoint(e.Message + e.StackTrace); TestProgressLogger.LogError(String.Format(LogMessage.StopOrderTestFailed, sellTab), e); throw e; } finally { TestProgressLogger.EndTest(); } }
public void TC5_VerifyBuyLimitOrder() { try { string type; string buyOrderFeeValue; string sellOrderFeeValue; Dictionary <string, string> placeLimitBuyOrder; Dictionary <string, string> placeLimitSellOrder; string orderSizeDifference; instrument = TestData.GetData("Instrument"); orderType = TestData.GetData("OrderType"); menuTab = TestData.GetData("MenuTab"); buyTab = TestData.GetData("BuyTab"); sellTab = TestData.GetData("SellTab"); buyOrderSize = TestData.GetData("TC5_BuyOrderSize"); sellOrderSize = TestData.GetData("TC5_SellOrderSize"); incSellOrderSize = TestData.GetData("TC5_IncreasedSellOrderSize"); decSellOrderSize = TestData.GetData("TC5_DecreasedSellOrderSize"); limitPrice = TestData.GetData("TC5_LimitPrice"); timeInForce = TestData.GetData("TC5_TimeInForce"); feeComponent = TestData.GetData("FeeComponent"); type = Const.Limit; // Get fee for buy order based on buy amount and fee component buyOrderFeeValue = GenericUtils.FeeAmount(buyOrderSize, feeComponent); // Get fee for sell order based on buy amount, limit price and fee component 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); // Place buy and sell order to set the last price TestProgressLogger.LogCheckPoint(String.Format(LogMessage.PlaceOrderToSetMarketBegin, limitPrice)); userCommonFunction.PlaceOrdersToSetLastPrice(driver, instrument, buyTab, sellTab, buyOrderSize, limitPrice, timeInForce, Const.USER10, Const.USER11); TestProgressLogger.LogCheckPoint(String.Format(LogMessage.PlaceOrderToSetMarketEnd, limitPrice)); // Scenario 1: Sell order S1 with same price is available and S1 quantity is = B1. userFunctions.LogIn(TestProgressLogger, Const.USER8); // Place Buy order to set the market placeLimitBuyOrder = orderEntryPage.PlaceLimitBuyOrder(instrument, buyTab, buyOrderSize, limitPrice, timeInForce); // Verify that the order is present in the Open Orders tab Assert.True(objVerifyOrdersTab.VerifyOpenOrdersTab(instrument, buyTab, type, Double.Parse(buyOrderSize), limitPrice, placeLimitBuyOrder["PlaceOrderTime"], placeLimitBuyOrder["PlaceOrderTimePlusOneMin"])); TestProgressLogger.LogCheckPoint(string.Format(LogMessage.LimitOrderSuccessMsg, buyTab, buyOrderSize, limitPrice)); userFunctions.LogIn(TestProgressLogger, Const.USER9); // Place Limit sell order with the same price and quantity as Buy order to verify the order gets filled placeLimitSellOrder = orderEntryPage.PlaceLimitSellOrder(instrument, sellTab, sellOrderSize, limitPrice, timeInForce); // Verify sell order is present in Filled Orders tab Assert.True(objVerifyOrdersTab.VerifyFilledOrdersTab(instrument, sellTab, Double.Parse(sellOrderSize), sellOrderFeeValue, placeLimitSellOrder["PlaceOrderTime"], placeLimitSellOrder["PlaceOrderTimePlusOneMin"])); TestProgressLogger.LogCheckPoint(string.Format(LogMessage.LimitOrderSuccessMsg, sellTab, sellOrderSize, limitPrice)); userFunctions.LogIn(TestProgressLogger, Const.USER8); orderEntryPage.NavigateToHomePage(instrument); // Verify buy order is present in Filled Orders tab Assert.True(objVerifyOrdersTab.VerifyFilledOrdersTab(instrument, buyTab, Double.Parse(buyOrderSize), buyOrderFeeValue, placeLimitSellOrder["PlaceOrderTime"], placeLimitSellOrder["PlaceOrderTimePlusOneMin"])); // Scenario 2: Sell order S1 with same price is available and S1 quantity is > B1. userFunctions.LogIn(TestProgressLogger, Const.USER8); // Place Buy order to set the market Dictionary <string, string> placeLimitBuyOrderS2 = orderEntryPage.PlaceLimitBuyOrder(instrument, buyTab, buyOrderSize, limitPrice, timeInForce); // Verify that the order is present in the Open Orders tab Assert.True(objVerifyOrdersTab.VerifyOpenOrdersTab(instrument, buyTab, type, Double.Parse(buyOrderSize), limitPrice, placeLimitBuyOrderS2["PlaceOrderTime"], placeLimitBuyOrderS2["PlaceOrderTimePlusOneMin"])); TestProgressLogger.LogCheckPoint(string.Format(LogMessage.LimitOrderSuccessMsg, buyTab, buyOrderSize, limitPrice)); userFunctions.LogIn(TestProgressLogger, Const.USER9); // Place Limit sell order with the same price and quantity > Buy order to verify the order gets filled Dictionary <string, string> placeLimitSellOrderS2 = orderEntryPage.PlaceLimitSellOrder(instrument, sellTab, incSellOrderSize, limitPrice, timeInForce); // Verify sell order is present in Filled Orders tab Assert.True(objVerifyOrdersTab.VerifyFilledOrdersTab(instrument, sellTab, Double.Parse(buyOrderSize), sellOrderFeeValue, placeLimitSellOrderS2["PlaceOrderTime"], placeLimitSellOrderS2["PlaceOrderTimePlusOneMin"])); TestProgressLogger.LogCheckPoint(string.Format(LogMessage.LimitOrderSuccessMsg, sellTab, buyOrderSize, limitPrice)); userFunctions.LogIn(TestProgressLogger, Const.USER8); orderEntryPage.NavigateToHomePage(instrument); // Verify buy order is present in Filled Orders tab Assert.True(objVerifyOrdersTab.VerifyFilledOrdersTab(instrument, buyTab, Double.Parse(buyOrderSize), buyOrderFeeValue, placeLimitSellOrderS2["PlaceOrderTime"], placeLimitSellOrderS2["PlaceOrderTimePlusOneMin"])); // Scenario 3: Sell order S1 with same price is available and S1 quantity is < B1. UserCommonFunctions.LoginAndCancelAllOrders(TestProgressLogger, driver, instrument, Const.USER9); userFunctions.LogIn(TestProgressLogger, Const.USER8); // Place Buy order to set the market Dictionary <string, string> placeLimitBuyOrderS3 = orderEntryPage.PlaceLimitBuyOrder(instrument, buyTab, buyOrderSize, limitPrice, timeInForce); // Verify that the order is present in the Open Orders tab Assert.True(objVerifyOrdersTab.VerifyOpenOrdersTab(instrument, buyTab, type, Double.Parse(buyOrderSize), limitPrice, placeLimitBuyOrderS3["PlaceOrderTime"], placeLimitBuyOrderS3["PlaceOrderTimePlusOneMin"])); TestProgressLogger.LogCheckPoint(string.Format(LogMessage.LimitOrderSuccessMsg, buyTab, buyOrderSize, limitPrice)); userFunctions.LogIn(TestProgressLogger, Const.USER9); sellOrderFeeValue = GenericUtils.SellFeeAmount(decSellOrderSize, limitPrice, feeComponent); // Place Limit sell order with the same price and quantity < Buy order to verify the order gets filled Dictionary <string, string> placeLimitSellOrderS3 = orderEntryPage.PlaceLimitSellOrder(instrument, sellTab, decSellOrderSize, limitPrice, timeInForce); // Verify order is present in Filled Orders tab Assert.True(objVerifyOrdersTab.VerifyFilledOrdersTab(instrument, sellTab, Double.Parse(decSellOrderSize), sellOrderFeeValue, placeLimitSellOrderS3["PlaceOrderTime"], placeLimitSellOrderS3["PlaceOrderTimePlusOneMin"])); TestProgressLogger.LogCheckPoint(string.Format(LogMessage.LimitOrderSuccessMsg, sellTab, decSellOrderSize, limitPrice)); userFunctions.LogIn(TestProgressLogger, Const.USER8); orderEntryPage.NavigateToHomePage(instrument); // This will get the fee value based on decreased order size buyOrderFeeValue = GenericUtils.FeeAmount(decSellOrderSize, feeComponent); // Get the difference between the buy and sell order sizes orderSizeDifference = GenericUtils.GetDifferenceFromStringAfterSubstraction(buyOrderSize, decSellOrderSize); // Verify that the order is present in the Open Orders tab Assert.True(objVerifyOrdersTab.VerifyOpenOrdersTab(instrument, buyTab, type, Double.Parse(orderSizeDifference), limitPrice, placeLimitSellOrderS3["PlaceOrderTime"], placeLimitSellOrderS3["PlaceOrderTimePlusOneMin"])); // Verify order is present in Filled Orders tab Assert.True(objVerifyOrdersTab.VerifyFilledOrdersTab(instrument, buyTab, Double.Parse(decSellOrderSize), buyOrderFeeValue, placeLimitSellOrderS3["PlaceOrderTime"], placeLimitSellOrderS3["PlaceOrderTimePlusOneMin"])); // This step cancels the remaining order and verifies the same in Open orders tab UserCommonFunctions.CancelOrderBookBuyOrder(driver); UserCommonFunctions.OpenOrderTab(driver); // Verify that the order is not present in the Open Orders tab Assert.False(objVerifyOrdersTab.VerifyOpenOrdersTab(instrument, buyTab, type, Double.Parse(orderSizeDifference), limitPrice, placeLimitSellOrderS3["PlaceOrderTime"], placeLimitSellOrderS3["PlaceOrderTimePlusOneMin"])); } catch (NoSuchElementException ex) { TestProgressLogger.TakeScreenshot(); TestProgressLogger.LogCheckPoint(ex.Message + ex.StackTrace); TestProgressLogger.LogError(String.Format(LogMessage.LimitOrderTestFailed, buyTab), ex); throw ex; } catch (Exception e) { TestProgressLogger.TakeScreenshot(); TestProgressLogger.LogCheckPoint(e.Message + e.StackTrace); TestProgressLogger.LogError(String.Format(LogMessage.LimitOrderTestFailed, buyTab), e); throw e; } finally { TestProgressLogger.EndTest(); } }