public Boolean selectActionsOption(string optionName, string expectedVin)
        {
            Boolean isTradeVehiclePopsup = false;

            try
            {
                Driver.GetDriver().Manage().Timeouts().PageLoad = TimeSpan.FromSeconds(60);


                if (optionName.Contains("Trade"))
                {
                    Console.WriteLine("Window Title after clicking on Trade link....." + Driver.GetDriver().Title);
                    Console.WriteLine("Option for Vehicle==================>" + optionName);
                    if (Driver.GetDriver().Title.Contains(Pages.InventoryPage().Title))
                    {
                        Console.WriteLine("Vin for Trade Vehicle==================>" + expectedVin);

                        isTradeVehiclePopsup = Pages.InventoryPage().selectTradeLink(expectedVin);
                    }
                    else
                    {
                        Console.WriteLine("Not on Inventory Page.");
                    }
                    Console.WriteLine("Trade Vechicle Popup Appeared Status : " + isTradeVehiclePopsup);
                }
            }
            catch (StaleElementReferenceException ex)
            {
                Console.WriteLine(ex.StackTrace);
            }
            return(isTradeVehiclePopsup);
        }
Пример #2
0
        public void WhenIClickOnInventorySummaryTab()
        {
            Console.WriteLine("Current Page Title ====" + Driver.GetDriver().Title);

            if (!Driver.GetDriver().Title.Contains(Pages.InventoryPage().Title))
            {
                Pages.HomePage().InventoryTab.Click();
                Driver.GetDriver().Manage().Timeouts().PageLoad = TimeSpan.FromSeconds(100);
                Console.WriteLine("Page Title when Inventorty Summary tab is clicked:--->" + Driver.GetDriver().Title);
                Wait.Until(x => (x.Title != Pages.InventoryPage().Title));
                //Assert.AreEqual(Pages.InventoryPage().Title, Driver.GetDriver().Title, "Page title is different than " + Pages.InventoryPage().Title);
            }
        }
Пример #3
0
 public void ThenIShouldSeeInventoryHeader()
 {
     Assert.AreEqual(Pages.InventoryPage().Title, Driver.GetDriver().Title, "inventory header is different");
 }