Exemplo n.º 1
0
        public void shouldChangeLeadStatusName()
        {
            LoginPage logPage = new LoginPage(driver);
            logPage.open();
            DashboardPage dashPage = logPage.logIn("*****@*****.**", "Password1");
            SettingsPage setPage = dashPage.goToSettingsPage();
            setPage.changeLeadsStatusName("Submitted");

            logPage = setPage.logOut();
            logPage.open();
            dashPage = logPage.logIn("*****@*****.**", "Password1");
            LeadsPage leadPage = dashPage.goToLeadsPage();

            WebDriverWait wait = new WebDriverWait(driver, TimeSpan.FromSeconds(10));
            wait.Until(d => { return d.FindElement(By.LinkText("A BumBum")); });

            leadPage.click(By.LinkText("A BumBum"));

            WebDriverWait wait2 = new WebDriverWait(driver, TimeSpan.FromSeconds(10));
            wait2.Until(d => { return d.FindElement(By.CssSelector("span.lead-status")); });

            IWebElement element = driver.FindElement(By.CssSelector("span.lead-status"));
            string text = element.Text;
            Assert.That(text.Contains("Submitted"));
        }
Exemplo n.º 2
0
 public void shouldLoginToApp()
 {
     LoginPage logPage = new LoginPage(driver);
     logPage.open();
     logPage.logIn("*****@*****.**", "Password1");
     logPage.assertTextPresent("Dashboard");
 }
Exemplo n.º 3
0
 public void SettingStatusName()
 {
     LoginPage logPage = new LoginPage(driver);
     logPage.open();
     DashboardPage dashPage = logPage.logIn("*****@*****.**", "Password1");
     SettingsPage setPage = dashPage.goToSettingsPage();
     setPage.changeLeadsStatusName("New");
     setPage.logOut();
 }
Exemplo n.º 4
0
 public void shouldCreateLead()
 {
     LoginPage logPage = new LoginPage(driver);
     logPage.open();
     DashboardPage dashPage = logPage.logIn("*****@*****.**", "Password1");
     LeadsPage leadsPage = dashPage.goToLeadsPage();
     leadsPage.createLead("Marek", "Lewarek");
     leadsPage.assertLeadCreated("Lewarek");
 }
Exemplo n.º 5
0
 public void shouldNotLoginToApp(
     [Values("Password1", "admin", "ewelina.w.witos")] string user,
     [Values("*****@*****.**", "password1", "")] string password)
 {
     LoginPage logPage = new LoginPage(driver);
     logPage.open();
     logPage.logIn(user, password);
     logPage.assertTextPresent("Wrong email or password");
 }
Exemplo n.º 6
0
        public void shouldSetStatusToNew()
        {
            LoginPage logPage = new LoginPage(driver);
            logPage.open();
            DashboardPage dashPage = logPage.logIn("*****@*****.**", "Password1");
            LeadsPage leadsPage = dashPage.goToLeadsPage();

            WebDriverWait wait = new WebDriverWait(driver, TimeSpan.FromSeconds(10));
            wait.Until(d => { return d.FindElement(By.LinkText("Lead")); });

            leadsPage.createLead("King", "Kong");
            leadsPage.assertLeadCreated("Kong");
            leadsPage.assertLeadStatusSet("New");
        }