Ignore:
Timestamp:
08/02/11 10:01:56 (13 years ago)
Author:
luiz-fernando
Message:

Ticket #1771 - Adicionado testes automatizados para modulo da agenda

File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/testlink/automation2.0/src/test/java/org/expressolivre/cte/pages/calendar/AppointmentPage.java

    r4864 r4890  
    11package org.expressolivre.cte.pages.calendar; 
    22 
     3import java.util.List; 
     4 
    35import org.expressolivre.cte.pages.common.Page; 
     6import org.openqa.selenium.By; 
    47import org.openqa.selenium.WebDriver; 
    58import org.openqa.selenium.WebElement; 
     
    8891        private WebElement recurEndDate; 
    8992 
    90         /** Domingo, Segunda, Terça, .... */ 
    91         @FindBy(name = "cal[rpt_day][]") 
    92         private WebElement rptDay; 
    93  
    9493        @FindBy(name = "cal[recur_interval]") 
    9594        private WebElement recurInterval; 
     
    257256        } 
    258257 
     258        public void setRptUseEnd(String finalDate) { 
     259                this.rptUseEnd.click(); 
     260                this.recurEndDate.clear(); 
     261                this.recurEndDate.sendKeys(finalDate); 
     262        } 
     263 
     264        /** 
     265         * Valores para os dias da semana: 
     266         *  
     267         * <pre> 
     268         * 1 - Domingo 
     269         * 2 - Segunda 
     270         * 4 - Terça 
     271         * 8 - Quarta 
     272         * 16 - Quinta 
     273         * 32 - Sexta 
     274         * 64 - Sabado 
     275         * </pre> 
     276         *  
     277         * @param values 
     278         */ 
     279        public void setRecurDays(List<String> values) { 
     280                List<WebElement> elements = driver.findElements(By 
     281                                .name("cal[rpt_day][]")); 
     282 
     283                for (WebElement e : elements) { 
     284                        if (values.contains(e.getValue())) { 
     285                                e.click(); 
     286                        } 
     287                } 
     288        } 
     289 
    259290        public void saveAppointment() { 
    260291                this.save.click(); 
Note: See TracChangeset for help on using the changeset viewer.