Ignore:
Timestamp:
06/16/11 17:06:01 (13 years ago)
Author:
luiz-fernando
Message:

Ticket #1771 - Refactoring, criadas novas classes para Pasta, Filtro, Pesquisa

File:
1 edited

Legend:

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

    r4344 r4620  
    151151                        if (option.getText().equals(value)) { 
    152152                                option.setSelected(); 
    153                                 break; 
     153                                return; 
    154154                        } 
    155155                } 
     156 
     157                // TODO Rever o tratamento da excecao quando um valor nao for encontrado 
     158                // na combobox. 
     159 
     160                try { 
     161                        throw new Exception("Valor " + value + " não encontrado em " 
     162                                        + element); 
     163                } catch (Exception e) { 
     164                        // TODO Auto-generated catch block 
     165                        e.printStackTrace(); 
     166                } 
    156167        } 
     168 
     169        public String getComboValue(WebElement element) { 
     170                List<WebElement> options = element.findElements(By.tagName("option")); 
     171                for (WebElement option : options) { 
     172                        if (option.isSelected()) { 
     173                                return option.getText(); 
     174                        } 
     175                } 
     176                return null; 
     177        } 
     178 
    157179} 
Note: See TracChangeset for help on using the changeset viewer.