Exemplo n.º 1
0
        public void TestWFMMainPageBringup2()
        {
            WFMUtils.LoadWebPage(driver, WFMMainPageURL);
            Assert.That(driver.Url, Is.EqualTo(WFMMainPageURL));

            Thread.Sleep(2000);
        }
Exemplo n.º 2
0
        public void TestWFMMainPageMenu(string MenuCode)
        {
            WFMUtils.LoadWebPage(this.driver, "https://www.wholefoodsmarket.com/");

            WFMMainPage WFMMainPageObj = new WFMMainPage(driver);

            WFMMainPageObj.DoMenuHover(WFMMainPageObj.NavMenuSelectors[MenuCode]);
        }
Exemplo n.º 3
0
        public void TestTipsAndIdeasClick()
        {
            WFMUtils.LoadWebPage(this.driver, "https://www.wholefoodsmarket.com/");

            WFMMainPage WFMMainPageObj = new WFMMainPage(driver);

            WFMMainPageObj.ClickMenuLink(WFMMainPageObj.NavMenuSelectors["Tips&Ideas"], "Tips & Ideas");
            WFMMainPageObj.Equals("https://inspiration.wholefoodsmarket.com/");
            Thread.Sleep(2000);
        }
Exemplo n.º 4
0
        public void TestWeeklySalesClick()
        {
            WFMUtils.LoadWebPage(this.driver, "https://www.wholefoodsmarket.com/");

            WFMMainPage WFMMainPageObj = new WFMMainPage(driver);

            WFMMainPageObj.ClickMenuLink(WFMMainPageObj.NavMenuSelectors["WeeklySales"], "Weekly Sales");
            WFMMainPageObj.Equals("https://www.wholefoodsmarket.com/sales-flyer");
            Thread.Sleep(2000);
        }
Exemplo n.º 5
0
        public void TestCOVID19UpdateClick()
        {
            WFMUtils.LoadWebPage(this.driver, "https://www.wholefoodsmarket.com/");

            WFMMainPage WFMMainPageObj = new WFMMainPage(driver);

            WFMMainPageObj.ClickMenuLink(WFMMainPageObj.NavMenuSelectors["Covid19Update"], "COVID-19 Update");
            WFMMainPageObj.Equals("https://www.wholefoodsmarket.com/company-info/covid-19-response");
            Thread.Sleep(2000);
        }
Exemplo n.º 6
0
        public void TestBrowseProductsClick()
        {
            WFMUtils.LoadWebPage(this.driver, "https://www.wholefoodsmarket.com/");

            WFMMainPage WFMMainPageObj = new WFMMainPage(driver);

            WFMMainPageObj.ClickMenuLink(WFMMainPageObj.NavMenuSelectors["BrowseProducts"], "Browse Products");
            WFMMainPageObj.Equals("https://products.wholefoodsmarket.com/");
            Thread.Sleep(2000);
        }
Exemplo n.º 7
0
        public void TestStoreLocatorClick()
        {
            WFMUtils.LoadWebPage(this.driver, "https://www.wholefoodsmarket.com/");

            WFMMainPage WFMMainPageObj = new WFMMainPage(driver);

            WFMMainPageObj.ClickMenuLink(WFMMainPageObj.NavMenuSelectors["StoreLocator"], "Store Locator");
            WFMMainPageObj.Equals("https://www.wholefoodsmarket.com/stores");
            Thread.Sleep(2000);
        }
Exemplo n.º 8
0
        public void TestWFMMainPageMenuLinks2(string MenuCode, string DestUrl)
        {
            WFMUtils.LoadWebPage(driver, WFMMainPageURL);
            Assert.That(driver.Url, Is.EqualTo(WFMMainPageURL));

            WFMMainPage WFMMainPageObj = new WFMMainPage(driver);

            driver.FindElement(WFMMainPageObj.NavMenuSelectors[MenuCode]).Click();
            WFMUtils.WaitForCurrPageToFinishLoading(driver);
            Assert.That(driver.Url, Does.StartWith(DestUrl));

            Thread.Sleep(2000);
        }
Exemplo n.º 9
0
        public void TestBrowseProducts_FindStore2()
        {
            WFMUtils.LoadWebPage(driver, WFMMainPageURL);
            Assert.That(driver.Url, Is.EqualTo(WFMMainPageURL));

            WFMMainPage WFMMainPageObj = new WFMMainPage(driver);

            WFMMainPageObj.ClickToBrowseProductsMenu();

            BrowseProductsPage BrowseProductsPageObj = new BrowseProductsPage(driver);

            BrowseProductsPageObj.SetFindStoreSearchBoxText("FindStore", "78758");
            BrowseProductsPageObj.ClickStoreFromSearch("FindStoreSearchResult", "Domain — 11920 Domain Dr, Austin, TX 78758");
            Assert.That(driver.FindElement(BrowseProductsPageObj.PageElements["SavedStoreLocation"]).GetAttribute("innerText"), Is.EqualTo("Domain"));
            WFMUtils.ScreenshotToFilepath(driver, "jeffshot.png");
            Thread.Sleep(2000);
        }
Exemplo n.º 10
0
        public void TestSearchProducts()
        {
            WFMUtils.LoadWebPage(this.driver, "https://products.wholefoodsmarket.com/");

            BrowseProductsPage BrowseProductsPageObj = new BrowseProductsPage(driver);

            BrowseProductsPageObj.SetFindStoreSearchBoxText("FindStore", "78758");
            BrowseProductsPageObj.ClickElementAfterSearch("FindStoreSearchResult", "Domain — 11920 Domain Dr, Austin, TX 78758");
            Thread.Sleep(2000);
            Assert.AreEqual(this.driver.FindElement(BrowseProductsPageObj.PageElements["SavedStoreLocation"]).GetAttribute("innerText"), "Domain");
            Thread.Sleep(2000);
            BrowseProductsPageObj.SetProductSearchBoxText("ProductSearchBox", "Apple");
            Thread.Sleep(2000);
            Assert.That(this.driver.FindElement(BrowseProductsPageObj.PageElements["ProductCardName"]).GetAttribute("innerText"), Contains.Substring("Apple"));
            BrowseProductsPageObj.DoMenuHoverThenClickProductCard(BrowseProductsPageObj.PageElements["ProductCard"]);
            Thread.Sleep(3000);
            Assert.That(this.driver.FindElement(BrowseProductsPageObj.PageElements["ProductHeader"]).GetAttribute("innerText"), Contains.Substring("Apple"));
        }
Exemplo n.º 11
0
        public void TestPrescriptiveMainPage_ClickToOtherPages()
        {
            WFMUtils.LoadWebPage(driver, WFMMainPageURL);
            Assert.That(driver.Url, Is.EqualTo(WFMMainPageURL));

            PrescriptiveMainPage PrescriptiveMainPageObj = new PrescriptiveMainPage(driver);

            // PrescriptiveMainPageObj.ClickMenu_ToWeeklySalesPage();
            // PrescriptiveMainPageObj.ClickToHomePage();
            // PrescriptiveMainPageObj.ClickMenu_ToTipsAndIdeasPage();
            // PrescriptiveMainPageObj.ClickToHomePage();
            // PrescriptiveMainPageObj.ClickMenu_ToStoreLocatorPage();
            // PrescriptiveMainPageObj.ClickToHomePage();
            PrescriptiveMainPageObj.ClickMenu_ToBrowseProductsPage();

            PrescriptiveBrowseProductsPage PrescriptiveBrowseProductsPageObj = new PrescriptiveBrowseProductsPage(driver);

            PrescriptiveBrowseProductsPageObj.ClickToHomePage();
            // PrescriptiveMainPageObj.ClickMenu_ToCovid19UpdatePage();
            // PrescriptiveMainPageObj.ClickToHomePage();
            Thread.Sleep(2000);
        }
Exemplo n.º 12
0
 public void ClickToTipsAndIdeasMenu(int MaxWaitTimeInSecs = 10)
 {
     driver.FindElement(NavMenuSelectors["Tips&Ideas"]).Click();
     WFMUtils.WaitForCurrPageToFinishLoading(driver, MaxWaitTimeInSecs);
     Assert.That(driver.Url, Does.StartWith("https://inspiration.wholefoodsmarket.com/"));
 }
Exemplo n.º 13
0
 public void ClickToBrowseProductsMenu(int MaxWaitTimeInSecs = 10)
 {
     driver.FindElement(NavMenuSelectors["BrowseProducts"]).Click();
     WFMUtils.WaitForCurrPageToFinishLoading(driver, MaxWaitTimeInSecs);
     Assert.That(driver.Url, Does.StartWith("https://products.wholefoodsmarket.com/"));
 }
Exemplo n.º 14
0
 public void ClickToCovid19UpdateMenu(int MaxWaitTimeInSecs = 10)
 {
     driver.FindElement(NavMenuSelectors["Covid19Update"]).Click();
     WFMUtils.WaitForCurrPageToFinishLoading(driver, MaxWaitTimeInSecs);
     Assert.That(driver.Url, Does.StartWith("https://www.wholefoodsmarket.com/company-info/covid-19-response"));
 }
Exemplo n.º 15
0
 public void Setup()
 {
     this.driver = WFMUtils.InitDriver("Chrome", "C:\\Users\\bshort\\WebDriver");
 }
 public void ClickToHomePage(int MaxWaitTimeInSecs = 10)
 {
     ClickEltByName("HomeLogoLink");
     WFMUtils.WaitForCurrPageToFinishLoading(driver, MaxWaitTimeInSecs);
     Assert.That(driver.Url, Does.StartWith("https://www.wholefoodsmarket.com/"));
 }
Exemplo n.º 17
0
 public void ClickToStoreLocatorMenu(int MaxWaitTimeInSecs = 10)
 {
     driver.FindElement(NavMenuSelectors["StoreLocator"]).Click();
     WFMUtils.WaitForCurrPageToFinishLoading(driver, MaxWaitTimeInSecs);
     Assert.That(driver.Url, Does.StartWith("https://www.wholefoodsmarket.com/stores"));
 }