Exemplo n.º 1
0
        public void EnterAddr2(string address2)

        {
            Address2.Clear();

            Address2.SendKeys(address2);
        }
Exemplo n.º 2
0
        public void EnterUserDetail()
        {
            SignInBtn.Click();
            EmailAddress.SendKeys("*****@*****.**");
            BasePage.driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(10);
            CreateAcccontBtn.Click();

            // AC 4.1 create user account
            Gender.Click();
            FirstName.SendKeys("Nadeem");
            LastName.SendKeys("Digital");
            Password.SendKeys("123qwe");

            SelectElement DropDay = new SelectElement(Day);

            DropDay.SelectByValue("10");
            SelectElement DropMonth = new SelectElement(Month);

            DropMonth.SelectByValue("9");
            SelectElement DropYear = new SelectElement(Year);

            DropYear.SelectByValue("2020");

            CheckedSpecialOffer.Click();
            AddressFirstName.SendKeys("Nadeem");
            AddressLastName.SendKeys("Digital");
            Company.SendKeys("Test Digital Company");
            Address1.SendKeys("Leeds Town");
            Address2.SendKeys("LS1");
            City.SendKeys("Leeds");

            SelectElement DropDown = new SelectElement(State);

            DropDown.SelectByText("Florida");

            PostCode.SendKeys("00012");
            AdditionalInfo.SendKeys("This is first programme of testig");
            MobileNo.SendKeys("123456789");
            AddressFutureRef.SendKeys("NB_Test");
            ClickRegisterUser.Click();

            //AC 4.4 verify account namme
            Assert.AreEqual("Nadeem Digital", VerifyUser.Text);
            Console.WriteLine(VerifyUser.Text + " Displayed");


            Bpage.Imp_wait();
            //AC 4.3 verify user taken to MY ACCOUNT page
            Assert.IsTrue(Pageheading.Displayed);
            Console.WriteLine(Pageheading.Text + " Displayed");

            SignOut.Click();
        }
Exemplo n.º 3
0
 public void FillInfo(ClientInfo clientInfo)
 {
     FirstName.SendKeys(clientInfo.FirstName);
     LastName.SendKeys(clientInfo.LastName);
     Username.SendKeys(clientInfo.Username);
     Email.SendKeys(clientInfo.Email);
     Address1.SendKeys(clientInfo.Address1);
     Address2.SendKeys(clientInfo.Address2);
     Country.SelectByIndex(clientInfo.Country);
     State.SelectByIndex(clientInfo.State);
     Zip.SendKeys(clientInfo.Zip);
     CardName.SendKeys(clientInfo.CardName);
     CardNumber.SendKeys(clientInfo.CardNumber);
     CardExpiration.SendKeys(clientInfo.CardExpiration);
     CardCVV.SendKeys(clientInfo.CardCVV);
     ClickSubmitButton();
 }
Exemplo n.º 4
0
        public void EnterInvalidDetail()
        {
            SignInBtn.Click();

            EmailAddress.SendKeys("*****@*****.**");
            BasePage.driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(10);
            CreateAcccontBtn.Click();
            Gender.Click();

            // first name and last name not entered to get the error
            FirstName.SendKeys("");
            LastName.SendKeys("");
            Password.SendKeys("123qwe");

            SelectElement DropDay = new SelectElement(Day);

            DropDay.SelectByValue("10");
            SelectElement DropMonth = new SelectElement(Month);

            DropMonth.SelectByValue("9");
            SelectElement DropYear = new SelectElement(Year);

            DropYear.SelectByValue("2020");

            CheckedSpecialOffer.Click();
            AddressFirstName.SendKeys("Nadeem");
            AddressLastName.SendKeys("Digital");
            Company.SendKeys("Test Digital Company");
            Address1.SendKeys("Leeds Town");
            Address2.SendKeys("LS1");
            City.SendKeys("Leeds");

            SelectElement DropDown = new SelectElement(State);

            DropDown.SelectByText("Florida");

            PostCode.SendKeys("00012");
            AdditionalInfo.SendKeys("This is first programme of testig");
            MobileNo.SendKeys("123456789");
            AddressFutureRef.SendKeys("NB_Test");
            ClickRegisterUser.Click();

            //AC 4.2 verify the error message
            Assert.IsTrue(CreatAnAccoutError.Displayed);
            Console.WriteLine(CreatAnAccoutError.Text + " Displayed");
        }
Exemplo n.º 5
0
        public void Create_AccountPage()
        {
            Fname.SendKeys("Testing");
            Lname.SendKeys("Guru");
            Email.SendKeys("*****@*****.**");
            TelePhone.SendKeys("07777777");
            Fax.SendKeys("012345");
            Company.SendKeys("IT_Tech");
            Address1.SendKeys("BFD");
            Address2.SendKeys("city road");
            City.SendKeys("Leeds");



            //DropDown list for Country
            SelectElement DropDown2 = new SelectElement(Country_UK);

            DropDown2.SelectByText("United Kingdom");
            BasePage.driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(10);

            //DropDown list for State/Region
            SelectElement DropDown1 = new SelectElement(RegionState);

            DropDown1.SelectByText("West Yorkshire");
            BasePage.driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(10);

            ZipCode.SendKeys("12345");



            CountryDropDownClick.Click();
            //Country_UK.Click();

            LoginName.SendKeys("tguru2713");
            Password.SendKeys("123qwe");
            ConfirmPass.SendKeys("123qwe");
            Suscribe.Click();
            TermsCondition.Click();
            ContinueBtn1.Click();
            ContinueBtn2.Click();
            //Assert.IsTrue
        }