Esempio n. 1
0
 public HomeTests(TestFixture fixture)
 {
     this.driver = fixture.Driver;
     links       = new UrlLinks();
     home        = new HomePO(driver);
     login       = new LoginPO(driver);
 }
Esempio n. 2
0
 public UserRegistrationSteps(Context context)
 {
     _driver         = context.Driver;
     homePO          = new HomePO(_driver);
     loginPO         = new LoginPO(_driver);
     createAccountPO = new CreateAccountPO(_driver);
 }
 public ForgotPasswordSteps(Context context)
 {
     _driver          = context.Driver;
     homePO           = new HomePO(_driver);
     loginPO          = new LoginPO(_driver);
     forgotPasswordPO = new ForgotPasswordPO(_driver);
 }
Esempio n. 4
0
        public void AbrirHome()
        {
            //arrange
            var homePO = new HomePO(driver);

            homePO.Visitar();

            //act

            //assert
            Assert.Equal("Home Page - Nexto", driver.Title);
        }
Esempio n. 5
0
        public void openAboutPage()
        {
            if (flag > 0)
            {
                test = extent.StartTest("Test 1: Open About Page");
            }

            HomePO homePO = new HomePO(driver);

            Assert.IsTrue(homePO.goToAboutPage(), "Unable to go to about page");
            test.Log(LogStatus.Pass, "Go to About Page.", "User should redirect to About Page.");
        }
Esempio n. 6
0
        public MenuLowerResolutionTests(TestFixture fixture, ITestOutputHelper output)
        {
            driver      = fixture.Driver;
            this.output = output;

            window = new WindowManagerHelper(driver);
            home   = new HomePO(driver);

            window.SetWindowSize(1000, 890, 1, 1);


            env = new EnvironmentHelper();
        }
Esempio n. 7
0
        public void DadasInfoValidasDeveLevarParaPaginaAgradecimento()
        {
            //arrange - info válidas
            var home = new HomePO(driver);

            home.Registro.PreencheFormulario("Fulano", "*****@*****.**", "123", "123");

            //act - ao registrar: clique do botão
            var agradecimentoPO = home.Registro.SubmeterFormEsperandoSucesso();

            //assert
            Assert.True(agradecimentoPO.TextoAgradecimentoExiste);
        }
Esempio n. 8
0
        public void ShouldBeAbleToLogin()
        {
            var outPutDirectory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);

            _driver = new FirefoxDriver(outPutDirectory);
            var HomePO = new HomePO(_driver);

            HomePO.Visit();
            HomePO.FillForm("standard_user", "secret_sauce");
            HomePO.SubmitForm();

            Assert.IsTrue(_driver.Url.Contains("inventory.html"));
        }
Esempio n. 9
0
        public void ShouldNotBeAbleToLogin()
        {
            var outPutDirectory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);

            _driver = new FirefoxDriver(outPutDirectory);
            var HomePO = new HomePO(_driver);

            HomePO.Visit();
            HomePO.FillForm("WrongUser", "Admin1234");
            HomePO.SubmitForm();

            IWebElement err_message = _driver.FindElement(By.XPath("/html/body/div[2]/div[1]/div/div/form/h3"));

            Assert.IsTrue(err_message.Displayed);
        }
Esempio n. 10
0
        public void DadaInfoLeilaoNaListaDeveExibirMesmasInfoNoDetalhe()
        {
            //arrange
            var proximosLeiloesPO     = new HomePO(driver).ProximosLeiloes;
            var primeiroLeilaoExibido = proximosLeiloesPO.Leiloes.First();

            //act
            var detalhePO = proximosLeiloesPO.VaiParaDetalheDoPrimeiroLeilao();

            //assert
            var leilaoDetalhe = detalhePO.Leilao;

            Assert.Equal(primeiroLeilaoExibido.Id, leilaoDetalhe.Id);
            Assert.Equal(primeiroLeilaoExibido.Titulo, leilaoDetalhe.Titulo);
            Assert.Equal(primeiroLeilaoExibido.Imagem, leilaoDetalhe.Imagem);
        }
Esempio n. 11
0
        public void DadasInfoInvalidasDeveContinuarNaHome(
            string nome,
            string email,
            string senha,
            string confirmacaoSenha)
        {
            //arrange - info válidas
            var home = new HomePO(driver);

            home.Registro.PreencheFormulario(nome, email, senha, confirmacaoSenha);

            //act - ao registrar: clique do botão
            var resultado = home.Registro.SubmeterFormularioEsperandoFracasso();

            //assert
            Assert.True(resultado.ContinuaNaPaginaDeRegistro);
        }
Esempio n. 12
0
        public void Registration()
        {
            ExtentReports extent = new ExtentReports(Constants.REPORT_PATH + "Registration_Tests_" + DateTime.Now.ToString("dd_MM_yyyy_HH-mm-ss") + ".html", true);

            ExtentTest test = new ExtentTest("Test Case Name", "Test Case description");

            try
            {
                driver = utility.getDriverInstance(driver);

                List <UserData> userData = utility.GetTestData("Yes", "Register");

                foreach (UserData item in userData)
                {
                    test = extent.StartTest("Test Case 001", "Sample description");

                    test.Log(LogStatus.Info, "Application Launched Successfully !!!");

                    home   = new HomePO(driver);
                    driver = home.navigateToAuthenticationPage(driver);

                    authenticate = new AuthenticationPO(driver);
                    driver       = authenticate.enterEmailAddress(item, driver, test);


                    register = new RegistrationPO(driver);
                    driver   = register.enterUserDetails(item, utility, driver, test);

                    myAccount = new MyAccountPO(driver);
                    driver    = myAccount.returnBackToAuthenticationPage(driver);

                    extent.EndTest(test);
                }
                extent.Flush();
            }

            catch (Exception e)
            {
                Console.WriteLine(e);
            }

            driver.Quit();
        }
Esempio n. 13
0
        public void ContactItemOwnerSuccessfull()
        {
            HomePO homePO = new HomePO(driver);

            //Check search box is present and visible
            Assert.True(homePO.SearchPO.SearchBoxIsReady(), "Search box is not ready");
            // Search element "proyector" at "Esparreguera" location
            SearchResultPO searchResultPO = homePO.SearchPO.SearchItemLocation("proyector", "Esparreguera");

            // Filter by price to 60€
            searchResultPO.FilterBoxPO.PriceTo(60);
            // Click "Aplicar Filtros" button
            searchResultPO.FilterBoxPO.ClickApplyFilters();

            GridElementPO gridElementPO = searchResultPO.SearchResultGridPO.ElementWithName("Proyector");

            // Check element "Proyector" exist
            Assert.NotNull(gridElementPO, "There is no Element with name \"Proyector\"");

            // Check element "Proyector" price is 60€ and location is "Esparreguera"
            Assert.True(gridElementPO.GetElementPrice().Equals("60€", StringComparison.InvariantCultureIgnoreCase), "The element does not have the expected price ");
            Assert.True(gridElementPO.GetElementLocation().Equals("Esparreguera", StringComparison.InvariantCultureIgnoreCase), "The element does not have the expected location ");

            // Click element "Proyector"
            ElementDetailPO elementDetailPO = gridElementPO.ClickElementSubjectName();

            //Click "Enviar mensaje" button to open the contact form
            elementDetailPO.OpenContactForm();
            // Fill contact form
            elementDetailPO.FillMessageBox("VibboSeleniumTest");
            elementDetailPO.FillMessageInfo("fernando", "*****@*****.**");
            elementDetailPO.ClickAcceptConditions();
            // Click "Enviar mensaje" button
            elementDetailPO.ClickSubmitMessage();
            Wait(TimeSpan.FromSeconds(1));
            // Check "Tu mensaje ha sido enviado." message is displayed after submit the contact form
            Assert.True(elementDetailPO.CheckMessageSent(), "The message has not been sent correctly");
        }
Esempio n. 14
0
 public SearchSteps(Context context)
 {
     _driver = context.Driver;
     homePO  = new HomePO(_driver);
 }
Esempio n. 15
0
 public CategoryFilterTests(TestFixture fixture)
 {
     this.driver = fixture.Driver;
     home        = new HomePO(driver);
     products    = new ProductAreaPO(driver);
 }
Esempio n. 16
0
 public LoginTests(TestFixture fixture)
 {
     this.driver = fixture.Driver;
     login       = new LoginPO(driver);
     home        = new HomePO(driver);
 }
Esempio n. 17
0
 public static void Setup()
 {
     homePage = new HomePO(GetDriverInstance());
     formPage = new FormPO(GetDriverInstance());
 }
Esempio n. 18
0
 public UserLoginSteps(Context context)
 {
     _driver = context.Driver;
     homePO  = new HomePO(_driver);
     loginPO = new LoginPO(_driver);
 }
Esempio n. 19
0
 public HomePT()
 {
     homePageObject = new HomePO();
 }
 public FilterProductsSteps(Context context)
 {
     _driver         = context.Driver;
     homePO          = new HomePO(_driver);
     womenCategoryPO = new WomenCategoryPO(_driver);
 }