Esempio n. 1
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();
        }
Esempio n. 2
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");
        }