Beispiel #1
0
        public void TestPromoCodeCompany()
        {
            ChromeOptions options = new ChromeOptions();

            options.AddArguments("--user-data-dir=C:/Users/fernanda.winter/AppData/Local/Google/Chrome/User Data/");

            ChromeDriver driver = new ChromeDriver(options);

            driver.Url = "file:///C:/Users/fernanda.winter/Desktop/Version%202/index.html";

            HeaderPageObject hearderPageObject = new HeaderPageObject(driver);


            NavBarPageObject navBarPageObject = hearderPageObject.Login("paul", "paul");

            ClientsPageObject formPageObject = navBarPageObject.clickInsert();

            formPageObject.preencherClientType("Company");
            formPageObject.preencherPromoCode();
            formPageObject.preencherEmail("*****@*****.**");
            formPageObject.preencherName("Fernanda Company");

            AddressPageObject addressPageObject = formPageObject.ApertaBtnNext();

            Address address = new Address();

            addressPageObject.FillAddressMainForm(address);

            addressPageObject.FillAddressBillingForm(address);

            addressPageObject.VerifySuccessMessage();
        }
Beispiel #2
0
        public void TestPromoCodeCompanyCNPJInvalido()
        {
            ChromeOptions options = new ChromeOptions();

            options.AddArguments("--user-data-dir=C:/Users/fernanda.winter/AppData/Local/Google/Chrome/User Data/");
            ChromeDriver driver = new ChromeDriver(options);

            driver.Url = "file:///C:/Users/fernanda.winter/Desktop/Version%202/index.html";

            HeaderPageObject hearderPageObject = new HeaderPageObject(driver);

            NavBarPageObject navBarPageObject = hearderPageObject.Login("paul", "paul");

            ClientsPageObject formPageObject = navBarPageObject.clickInsert();

            formPageObject.preencherClientType("Company");
            formPageObject.TextPromoCode.SendKeys("00000000");
            driver.FindElement(By.Id("name_companyname")).Click();
            IAlert alert = driver.SwitchTo().Alert();

            if (alert != null)
            {
                string alertText = alert.Text;
                Assert.AreEqual("Invalid Promotional Code", alertText);
                alert.Accept();
                driver.Quit();
            }
        }
Beispiel #3
0
        public void TestPromoCodePerson()
        {
            ChromeOptions options = new ChromeOptions();

            options.AddArguments("--user-data-dir=C:/Users/fernanda.winter/AppData/Local/Google/Chrome/User Data");

            ChromeDriver driver = new ChromeDriver(options);

            driver.Url = "file:///C:/Users/fernanda.winter/Desktop/Version%202/index.html";

            driver.Manage().Timeouts().ImplicitWait.TotalSeconds.Equals(60);

            HeaderPageObject headerPageObject = new HeaderPageObject(driver);

            NavBarPageObject navBarPageObject = headerPageObject.Login("paul", "paul");



            ClientsPageObject formPageObject = navBarPageObject.clickInsert();

            formPageObject.preencherClientType("Person");
            formPageObject.preencherPromoCode();
            formPageObject.preencherEmail("*****@*****.**");
            formPageObject.preencherName("Fernanda Company");
            formPageObject.preencherBirthDate("23081995");
            formPageObject.preencherGender("Female");
            formPageObject.preencherMaritalStatus("not Facebook official");

            AddressPageObject addressPageObject = formPageObject.ApertaBtnNext();

            Address address = new Address();

            addressPageObject.FillAddressMainForm(address);

            addressPageObject.FillAddressBillingForm(address);

            addressPageObject.VerifySuccessMessage();
        }