コード例 #1
0
        public void verifyCurrency_US()
        {
            quality.IsTextPresent("$");

            /*
             * Assert.assertTrue("Product List currency verification failed", price.Text.Contains("$"));
             */
        }
コード例 #2
0
        public void verifyDutchText_CustomerNotLoggedIn()
        {
            foreach (string header in this.du_headerText_CustomerNotLoggedIn)
            {
                quality.IsTextPresent(header);

                /*
                 * Assert.assertTrue("Dutch header varification faild", this.headerDiv.getText().contains(header));
                 */
            }
        }
コード例 #3
0
        public void verifyCorrectPageIsDisplayed(String[] subCategories)
        {
            //      div = driver.UnderlyingWebDriver.FindElement(By.Id("side-menu"));
            //To Do: Need to set up validation

            foreach (string subCategory in subCategories)
            {
                quality.IsTextPresent(subCategory);
                //Assert.assertTrue("'One or more sub-categories are missing", div.getText().contains(subCategory));
            }
        }
コード例 #4
0
        /// <summary>
        /// Creates a new username based on the time of day
        /// </summary>
        /// <param name="password">desired password to use</param>
        /// <param name="quality">Instance of the quality check</param>
        /// <returns>The username that was created</returns>
        public string CreateUser(string password)
        {
            string username;
            string windowtitle;

            username = "******" + System.DateTime.Now.TimeOfDay.TotalMinutes;

            /*
             * if (selenium.IsTextPresent("You are signed in as"))
             * {
             *  selenium.Click("id=signOutLink");
             *  selenium.WaitForPageToLoad("30000");
             * }
             */
            quality.Click("id=headerSignInLink");
            selenium.WaitForPageToLoad("30000");
            windowtitle = selenium.UnderlyingWebDriver.Title;

            quality.Click("link=Create your free account");
            Thread.Sleep(3000);

            quality.Type("id=registration:fullNameDecoration:fullName", "Automated Tester");
            quality.Type("id=registration:emailDecoration:email", username + "@fake.com");
            quality.Type("id=registration:usernameDecoration:username", username);
            quality.Type("id=registration:passwordDecoration:password", password);
            quality.Type("id=registration:passwordConfirmDecoration:passwordConfirm", password);
            quality.Type("id=registration:displayNameDecoration:displayName", username);
            //quality.Click("id=registration:myGarminTerms");
            //quality.Click("id=registration:connectTerms");
            quality.Click("id=registration:submitButton");
            quality.WaitForPageToLoad("30000");

            /*
             * quality.SelectWindow("Create An Account");
             *
             * quality.Type("id=name", "automated tester");
             * quality.Type("id=email", username + "@fake.com");
             * quality.Type("id=username", username);
             * quality.Type("id=password", password);
             * quality.Type("id=passwordMatch", password);
             * Thread.Sleep(1000);
             * quality.Click("id=submitBtn");
             * Thread.Sleep(6000);
             * //selenium.WaitForPageToLoad("30000");
             * quality.SelectWindow("Garmin Connect - Register");
             * quality.Type("id=userRegistrationException:displayName", username);
             * quality.Click("id=userRegistrationException:submitButton");
             */
            quality.IsTextPresent(username);

            return(username);
        }
コード例 #5
0
        public void verifyCorrectPageIsDisplayed_US_UK()
        { //Add Validations
            Thread.Sleep(3000);
            div = driver.UnderlyingWebDriver.FindElement(By.PartialLinkText("Account"));

            /*
             *      Assert.assertTrue("'My Personal Info' text is not present on manage-account.ep", div.Text.Contains("My Personal Info"));
             */

            div.Click();
            driver.WaitForPageToLoad("3000");
            quality.IsTextPresent("Personal Information");
            quality.IsTextPresent("Order Information");
        }
コード例 #6
0
//   public void clickToLogin() {
//	   accountLink.click();
//   }

//   public void switchToFrench(){
//	   frenchLink.click();
//   }



        public void verifyDutchText()
        {
            dutchCategories[0] = "du_On the Road";
            dutchCategories[1] = "fr_Maps";
            dutchCategories[2] = "du_Into Sport";
            foreach (string dutchCategory in dutchCategories)
            {
                quality.IsTextPresent(dutchCategory);

                /*
                 *      Assert.assertTrue("Dutch category varification faild", this.categoryDiv.Text.Contains(dutchCategory));
                 */
            }
        }
コード例 #7
0
        public void verifyCorrectPageIsDisplayed_US_UK()
        {
            Thread.Sleep(2000);
            IWebElement iframe = driver.UnderlyingWebDriver.FindElement(By.Id("gauth-widget-frame"));

            driver.UnderlyingWebDriver.SwitchTo().Frame(iframe);
            IWebElement signInDiv = driver.UnderlyingWebDriver.FindElement(By.Id("login-state-default"));

            quality.IsTextPresent("Garmin Account Sign In");
        }
コード例 #8
0
 public void clickContinueButton()
 {
     quality.IsTextPresent("My Order");
     continueBtn = driver.UnderlyingWebDriver.FindElement(By.Name("submit order"));
     continueBtn.Click();
 }