Beispiel #1
0
        public void WhenISelectTheTradeLinkBasedOnExpectedTrade(string TradeNeed)
        {
            if ((isSearchVin == true) && (TradeNeed.Contains("Yes")))
            {
                //Wait.Until(x => (x.Title != ""));
                Driver.GetDriver().Manage().Timeouts().PageLoad = TimeSpan.FromSeconds(60);

                Console.WriteLine("Going to click trade from window---->" + Driver.GetDriver().Title);
                if (Driver.GetDriver().Title.Contains(Pages.InventoryPage().Title))
                {
                    if (Pages.InventoryPage().inventoryGridRef.Displayed)
                    {
                        Pages.InventoryPage().inventoryGridRef.Click();
                        isTradWindowAppeared = comman.selectActionsOption("Trade", exp_obj.vin);
                    }
                    else
                    {
                        Boolean goBack = Pages.VehicleDetailPage().IsBackToButtonClicked();
                        if (goBack == true)
                        {
                            Console.WriteLine("Successfully clicked on Go back To Inventory link.");
                        }

                        Driver.GetDriver().Manage().Timeouts().PageLoad = TimeSpan.FromSeconds(60);
                    }
                }
                else
                {
                    Console.WriteLine("Current window is not Inventory window to Trade from for this vin : " + exp_obj.vin);
                }

                Console.WriteLine("Trade window popup happened Status....." + isTradWindowAppeared);
            }
        }