示例#1
0
        public void register()
        {
            //Populate the excel data
            ExcelLib.PopulateInCollection(Base.ExcelPath, "SignUp");
            GlobalDefinitions.NavigateUrl();
            //Click on Join button
            Join.Click();

            //Enter FirstName
            FirstName.SendKeys(ExcelLib.ReadData(2, "FirstName"));

            //Enter LastName
            LastName.SendKeys(ExcelLib.ReadData(2, "LastName"));

            //Enter Email
            Email.SendKeys(ExcelLib.ReadData(2, "Email"));

            //Enter Password
            Password.SendKeys(ExcelLib.ReadData(2, "Password"));

            //Enter Password again to confirm
            ConfirmPassword.SendKeys(ExcelLib.ReadData(2, "ConfirmPswd"));

            //Click on Checkbox
            Terms.Click();

            //Click on join button to Sign Up
            SubmitButton.Click();
        }
示例#2
0
 public void OrderTshirt()
 {
     Terms.Click();
     CartCheckouttwo.Click();
     Thread.Sleep(10000);
     Paymentoption.Click();
     Confirmbtn.Click();
     Thread.Sleep(10000);
     Assert.AreEqual(CartSummSuccessMsg.Text.ToString(), "Your order on My Store is complete.");
 }
示例#3
0
        internal void Navigateregister()
        {
            ExcelLib.PopulateInCollection(Base.ExcelPath, "Register");

            // Navigating to Login page using value from Excel
            Driver.driver.Navigate().GoToUrl(ExcelLib.ReadData(2, "url"));

            //Click on the Subscribe button
            Subscribe.Click();

            Driver.wait(2);
            //Read FirstName
            FirstName.SendKeys(ExcelLib.ReadData(2, "FirstName"));

            //Read LastName
            LastName.SendKeys(ExcelLib.ReadData(2, "LastName"));

            //Read Email
            Email.SendKeys(ExcelLib.ReadData(2, "Email"));

            Driver.wait(2);
            //Read Password
            Password.SendKeys(ExcelLib.ReadData(2, "Password"));

            //Read the password and again enter the password
            RePassword.SendKeys(ExcelLib.ReadData(2, "Password"));

            //SelectAuckland  Region from the dropdown list
            RegDropdown.Click();
            IWebElement Reg = Driver.driver.FindElement(By.XPath("//*[@id='register_default_area_id']"));

            Thread.Sleep(4000);
            IList <IWebElement> RegList = Reg.FindElements(By.TagName("div"));

            for (int i = 0; i < RegList.Count; i++)
            {
                if (RegList[i].Text == ExcelLib.ReadData(7, "InputValue").Trim())
                {
                    Thread.Sleep(3000);
                    RegList[i].Click();
                    Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Info, "Region Auckland Selected");
                }
            }
            Thread.Sleep(3000);

            //Click on Terms and Conditions
            Terms.Click();

            //Click on Register button
            RegisterButton.Click();
        }
示例#4
0
 internal void Register()
 {
     Commondriver.Excellib.PopulateInCollection(Base.Excelpath, "Signup");
     //Click on join
     Commondriver.Wait(2);
     Jointab.Click();
     //Enter firstname
     Firstname.SendKeys(Commondriver.Excellib.ReadData(2, "Frist Name"));
     //Enter lastname
     Lastname.SendKeys(Commondriver.Excellib.ReadData(2, "Last name"));
     //Enter email
     Email.SendKeys(Commondriver.Excellib.ReadData(2, "Email"));
     //Enter password
     Password.SendKeys(Commondriver.Excellib.ReadData(2, "Password"));
     //Confirm password
     Confirm.SendKeys(Commondriver.Excellib.ReadData(2, "Confirm password"));
     //Click on terms checkbox
     Terms.Click();
     //click on join
     Join.Click();
 }