Beispiel #1
0
        public void BBHomeTestDevSup()
        {
            BBHome hpage = new BBHome(driver);

            hpage.devSup.Click();
            Assert.That(hpage.title, Is.EqualTo("Support"));
        }
        public void bbSignInTest()
        {
            //Construct a home page object and a login page object
            //Get my username and password from a text file
            //In your Test case remember to create your own username and password and set its path
            BBHome    hpage = new BBHome(driver);
            LogInPage lpage = new LogInPage(hpage.driver);

            string[] lines = System.IO.File.ReadAllLines(@"C:\Users\smoodywo\Documents\practiceProjects\WHF_Practice\bestBuyLog.txt");
            hpage.loginBtn.Click();
            Thread.Sleep(2000);

            //Moving over to the title page, send keys acquired from the text file from earlier
            //here we are also asserting that the previous link worked and that we are on the correct page
            string pgTitle = driver.Title;

            Assert.That(pgTitle, Is.EqualTo("Sign In to Developer.BestBuy.com"));
            lpage.loginEmail(lines[0]);
            lpage.loginPassword(lines[1]);
            lpage.logInSnd();
            Thread.Sleep(2000);

            //Here The assert statement test to make sure that the proper page has apeared and that the elements have changed.
            Assert.That(driver.Title, Is.EqualTo("Best Buy | Official Online Store | Shop Now & Save"));
            driver.Url = "https://developer.bestbuy.com/";
            IList <IWebElement> temp = hpage.driver.FindElements(By.LinkText("DASHBOARD"));

            Assert.That(temp.Count, Is.EqualTo(1));
        }
Beispiel #3
0
        public void BBHomeTestPlyGrnd()
        {
            BBHome hpage = new BBHome(driver);

            hpage.plyGrnd.Click();
            Assert.That(hpage.driver.Url, Is.EqualTo("https://github.com/BestBuy/api-playground"));
        }
Beispiel #4
0
        public void BBHomeTestTApi()
        {
            BBHome hpage = new BBHome(driver);

            hpage.tryApi.Click();
            Assert.That(hpage.title, Is.EqualTo("Best Buy APIs :: Query Builder"));
        }
Beispiel #5
0
        public void BBHomeTestDoc()
        {
            BBHome hpage = new BBHome(driver);

            hpage.docBdy.Click();
            Assert.That(hpage.title, Is.EqualTo("Documentation"));
        }
Beispiel #6
0
        public void BBHeaderTest()
        {
            // driver.Url = "https://developer.bestbuy.com/";
            BBHome hpage = new BBHome(driver);

            Assert.That(hpage.title, Is.EqualTo("Best Buy Developer Portal"));
            hpage.documentation.Click();
            Assert.That(hpage.title, Is.EqualTo("Documentation"));
            hpage.support.Click();
            Assert.That(hpage.title, Is.EqualTo("Support"));
            hpage.apiStatus.Click();
            Assert.That(hpage.title, Is.EqualTo("API Status"));
        }
Beispiel #7
0
        public void bbSignInTest()
        {
            BBHome    hpage = new BBHome(driver);
            LogInPage lpage = new LogInPage(hpage.driver);

            string[] lines = System.IO.File.ReadAllLines(@"C:\Users\smoodywo\Documents\practiceProjects\WHF_Practice\bestBuyLog.txt");
            hpage.loginBtn.Click();
            Thread.Sleep(2000);

            string pgTitle = driver.Title;

            Assert.That(pgTitle, Is.EqualTo("Sign In to Developer.BestBuy.com"));
            lpage.loginEmail(lines[0]);
            lpage.loginPassword(lines[1]);
            lpage.logInSnd();
            Thread.Sleep(2000);

            Assert.That(driver.Title, Is.EqualTo("Best Buy | Official Online Store | Shop Now & Save"));
            driver.Url = "https://developer.bestbuy.com/";
            IList <IWebElement> temp = hpage.driver.FindElements(By.LinkText("DASHBOARD"));

            Assert.That(temp.Count, Is.EqualTo(1));
        }