Ignore:
Timestamp:
08/04/11 15:43:12 (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/common/Page.java

    r4895 r4902  
    3939 
    4040        /** 
    41          * Aguarda elemento aparecer e depois clica. 
    42          *  
    43          * @param id 
    44          *            Id do elemento a ser clicado. 
    45          */ 
    46         public void findAndClickElement(String id) { 
    47                 this.waitForElement(By.id(id)); 
    48                 this.clickElement(By.id(id)); 
     41         * @param by 
     42         */ 
     43        public void findAndClickElement(By by) { 
     44                this.waitForElement(by); 
     45                this.clickElement(by); 
    4946        } 
    5047 
     
    8683        } 
    8784 
     85        /** 
     86         * @param e 
     87         * @return 
     88         */ 
    8889        public boolean isNotDisplayed(RenderedWebElement e) { 
    8990                // Up to 10 times 
     
    104105 
    105106        /** 
    106          * @param id 
    107          * @return 
    108          */ 
    109         public String getElementContent(String id) { 
    110                 return driver.findElement(By.id(id)).getText(); 
    111         } 
    112  
    113         public String getDisplayedElementContent(String id) { 
    114                 waitForElement(By.id(id)); 
    115                 return driver.findElement(By.id(id)).getText(); 
    116         } 
    117  
     107         * @param by 
     108         *            Elemento a ser pesquisado. 
     109         * @return Texto contido no elemento. 
     110         */ 
     111        public String getDisplayedElementContent(By by) { 
     112                waitForElement(by); 
     113                return driver.findElement(by).getText(); 
     114        } 
     115 
     116        /** 
     117         * Aguarda ate o elemento aparecer na tela. 
     118         *  
     119         * @param by 
     120         *            Informa o elemento a ser pesquisado. 
     121         * @param timeout 
     122         *            Tempo limite de espera pelo elemento aparecer. 
     123         * @param interval 
     124         *            Intervalo para fazer uma nova tentativa. 
     125         * @return O elemento se aparecer ou dispara um erro informando que o 
     126         *         elemento nao existe ou nao pode ser exibido. 
     127         */ 
    118128        public RenderedWebElement waitFindElement(By by, long timeout, long interval) { 
    119129                long start = System.currentTimeMillis(); 
     
    175185        } 
    176186 
     187        /** 
     188         * @param element 
     189         *            Combo box. 
     190         * @return Retorna o elemento selecionado da combo box. 
     191         */ 
    177192        public String getComboValue(WebElement element) { 
    178193                List<WebElement> options = element.findElements(By.tagName("option")); 
Note: See TracChangeset for help on using the changeset viewer.