Ejemplo n.º 1
0
        public void ClientTestPage()
        {
            // TODO: think how to avoid duplicating the same username and password in each test. Also what if another environment the credentials are different?
            var userName = "******";
            var password = "******";
            var customer = new Customer();

            using (var driver = new ChromeDriver())
            {
                driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(5);

                URLs.OpenUrl(driver);
                var loginPage          = new LoginPage(driver);
                var navigationMenuPage = new NavigationMenuPage(driver);
                var addClientPage      = new AddClientPage(driver);

                loginPage.Login(userName, password);

                navigationMenuPage.AddClientButtonClick();
                addClientPage.AddClientHeader().ShouldContain("Add Client");
                addClientPage.FillOutContactInformation(customer);

                addClientPage.GetClientHeader().ShouldContain("Client");
            }
        }