コード例 #1
0
        public void PlaceBuyOrderWithReserveOrderType(string instruments, string ordertype, string ordersize, string limitprice, string displayquantity)
        {
            try
            {
                IWebElement instrumet = driver.FindElement(instrument);
                UserSetFunctions.VerifyWebElement(instrumet);
                UserSetFunctions.SelectDropdown(instrumet, instruments);

                IWebElement ordertyp = driver.FindElement(orderType);
                UserSetFunctions.VerifyWebElement(ordertyp);
                UserSetFunctions.SelectDropdown(ordertyp, ordertype);

                IWebElement ordersiz = driver.FindElement(orderSize);
                UserSetFunctions.VerifyWebElement(ordersiz);
                UserSetFunctions.EnterText(ordersiz, ordersize);

                IWebElement limitpric = driver.FindElement(limitPrice);
                UserSetFunctions.VerifyWebElement(limitpric);
                UserSetFunctions.EnterText(limitpric, limitprice);

                IWebElement displayquntity = driver.FindElement(displayQuntity);
                UserSetFunctions.VerifyWebElement(displayquntity);
                UserSetFunctions.EnterText(displayquntity, displayquantity);


                IWebElement placebuyorder = driver.FindElement(placeByOrder);
                UserSetFunctions.VerifyWebElement(placebuyorder);
                UserSetFunctions.Click(placebuyorder);
            }
            catch (Exception e)
            {
                throw e;
            }
        }
コード例 #2
0
 public Dictionary <string, string> PlaceSellOrderWithReserveOrderType(string orderSize, string limitPrice, string displayQuantity)
 {
     try
     {
         string placeOrderTime;
         string placeOrderTimePlusOneMin;
         string successMsg;
         Dictionary <string, string> reserveSellOrderDict = new Dictionary <string, string>();
         UserSetFunctions.VerifyWebElement(OrderSizeEditBox(driver));
         UserSetFunctions.EnterText(OrderSizeEditBox(driver), orderSize);
         UserSetFunctions.VerifyWebElement(LimitPriceEditBox(driver));
         UserSetFunctions.EnterText(LimitPriceEditBox(driver), limitPrice);
         UserSetFunctions.VerifyWebElement(DisplayQuntityEditBox(driver));
         UserSetFunctions.EnterText(DisplayQuntityEditBox(driver), displayQuantity);
         UserSetFunctions.VerifyWebElement(PlaceSellOrderButton(driver));
         UserSetFunctions.Click(PlaceSellOrderButton(driver));
         successMsg               = UserCommonFunctions.GetTextOfMessage(driver, logger);
         placeOrderTime           = GenericUtils.GetCurrentTime();
         placeOrderTimePlusOneMin = GenericUtils.GetCurrentTimePlusOneMinute();
         Assert.Equal(Const.OrderSuccessMsg, successMsg);
         reserveSellOrderDict.Add("PlaceOrderTime", placeOrderTime);
         reserveSellOrderDict.Add("PlaceOrderTimePlusOneMin", placeOrderTimePlusOneMin);
         Thread.Sleep(2000);
         return(reserveSellOrderDict);
     }
     catch (Exception e)
     {
         throw e;
     }
 }
コード例 #3
0
 public void SelectTimeInForce(string timeInForce)
 {
     try
     {
         UserSetFunctions.VerifyWebElement(TimeInForce(driver));
         UserSetFunctions.SelectDropdown(TimeInForce(driver), timeInForce);
     }
     catch (Exception e)
     {
         throw e;
     }
 }
コード例 #4
0
 public void SelectPegPrice(string pegPriceType)
 {
     try
     {
         UserSetFunctions.VerifyWebElement(PegPriceDropDown(driver));
         UserSetFunctions.SelectDropdown(PegPriceDropDown(driver), pegPriceType);
     }
     catch (Exception e)
     {
         throw e;
     }
 }
コード例 #5
0
 public void SelectInstrumentsAndOrderType(string instruments, string orderType)
 {
     try
     {
         UserSetFunctions.VerifyWebElement(InstrumentDropDown(driver));
         UserSetFunctions.SelectDropdown(InstrumentDropDown(driver), instruments);
         UserSetFunctions.VerifyWebElement(OrderTypeDropDown(driver));
         UserSetFunctions.SelectDropdown(OrderTypeDropDown(driver), orderType);
     }
     catch (Exception e)
     {
         throw e;
     }
 }
コード例 #6
0
 public void PlaceSellOrderWithReserveOrderType(string orderSize, string limitPrice, string displayQuantity)
 {
     try
     {
         UserSetFunctions.VerifyWebElement(OrderSizeEditBox(driver));
         UserSetFunctions.EnterText(OrderSizeEditBox(driver), orderSize);
         UserSetFunctions.VerifyWebElement(LimitPriceEditBox(driver));
         UserSetFunctions.EnterText(LimitPriceEditBox(driver), limitPrice);
         UserSetFunctions.VerifyWebElement(DisplayQuntityEditBox(driver));
         UserSetFunctions.EnterText(DisplayQuntityEditBox(driver), displayQuantity);
         UserSetFunctions.VerifyWebElement(PlaceSellOrderButton(driver));
         UserSetFunctions.Click(PlaceSellOrderButton(driver));
         Thread.Sleep(2000);
     }
     catch (Exception e)
     {
         throw e;
     }
 }