Beispiel #1
0
        public void AdvanceLimitOrderIOC()
        {
            driver.Navigate().GoToUrl("https://apexwebqa.azurewebsites.net/exchange");
            driver.Manage().Window.Maximize();
            driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(5);

            UserFunctionality objUserFunctionality = new UserFunctionality(output);

            objUserFunctionality.LogIn();

            AdvanceBuyLimitOrderIOCPage objAdvanceBuyLimitOrderIOCPage = new AdvanceBuyLimitOrderIOCPage(driver, output);
        }
Beispiel #2
0
        public void AdvanceSellOrder()
        {
            driver.Navigate().GoToUrl("https://apexwebqa.azurewebsites.net/exchange");
            driver.Manage().Window.Maximize();
            driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(5);

            UserFunctionality objUserFunctionality = new UserFunctionality(output);

            objUserFunctionality.LogIn();

            AdvanceSellOrderPage objAdvanceSellOrderPage = new AdvanceSellOrderPage(driver, output);

            objAdvanceSellOrderPage.VerifyAdvanceSellOrder(selectInstrument, driver, enterOrderSize);
        }
        public void VerifyBuyMarketOrder()
        {
            driver.Navigate().GoToUrl("https://apexwebqa.azurewebsites.net/exchange");
            driver.Manage().Window.Maximize();
            driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(5);

            UserFunctionality objUserFunctionality = new UserFunctionality(output);

            objUserFunctionality.LogIn();

            BuyAndVerifyMarketOrderPage objBuyAndVerifyMarketOrderPage = new BuyAndVerifyMarketOrderPage(driver, output);

            objBuyAndVerifyMarketOrderPage.BuyAndVerifyMarketOrderFlow("BTCUSD", driver, "1");
        }
        public void VerifySellStopOrder()
        {
            driver.Navigate().GoToUrl("https://apexwebqa.azurewebsites.net/exchange");
            driver.Manage().Window.Maximize();
            driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(5);

            UserFunctionality objUserFunctionality = new UserFunctionality(output);

            objUserFunctionality.LogIn();

            MarketSellStopOrderPage objMarketSellStopOrderPage = new MarketSellStopOrderPage(driver, output);

            objMarketSellStopOrderPage.StopSellOrder(instrumentText, driver, sellStopAmount, sellStopPrice);
        }
        public void VerifyPricePersistancy()
        {
            driver.Navigate().GoToUrl("https://apexwebqa.azurewebsites.net/exchange");
            driver.Manage().Window.Maximize();
            driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(5);

            UserFunctionality objUserFunctionality = new UserFunctionality(output);

            objUserFunctionality.LogIn();

            MarketBuyAmountPersistencePage ObjPricePersistValuesPage = new MarketBuyAmountPersistencePage(driver, output);

            if (ObjPricePersistValuesPage.VerifyingPersistantAmount("20"))
            {
                logger.Info("MarketBuyAmountPersistenceTest Passed");
            }
            else
            {
                logger.Info("MarketBuyAmountPersistenceTest Failed");
                //logger.Error();
            }
        }
        public bool BuyAndVerifyFilledOrdersTab(string instrument, string side, double size)
        {
            var flag = false;

            driver.Navigate().GoToUrl("https://apexwebqa.azurewebsites.net/exchange");
            driver.Manage().Window.Maximize();
            driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(5);

            UserFunctionality objUserFunctionality = new UserFunctionality(output);

            objUserFunctionality.LogIn();

            UserHomePage selectExchange = new UserHomePage(driver, output);

            selectExchange.SelectInstrumentFromExchange(instrument);

            GenericUtils gen            = new GenericUtils(output);
            string       buyAmountValue = gen.ConvertToDecimal(size);

            BuyOrderEntry boe = new BuyOrderEntry(driver, output);
            string        buyMarketOrderTime    = boe.PlaceMaketBuyOrder(0.07);
            string        lastPrice             = boe.GetLastPrice();
            double        doubleLastPrice       = Convert.ToDouble(lastPrice);
            string        totalAmountCalculated = gen.FilledOrdersTotalAmount(size, doubleLastPrice);

            driver.FindElement(selectFilledOrdersTab).Click();

            string expectedRow = instrument + " || " + side + " || " + size + " || " + lastPrice + " || " + totalAmountCalculated + " || " + buyMarketOrderTime;

            output.WriteLine("expectedRow********* " + expectedRow);

            if (GetListOfFilledOrders().Contains(expectedRow))
            {
                output.WriteLine("Matched Expected -> " + expectedRow + " Actual -> ");
                flag = true;
            }
            return(flag);
        }