- Timestamp:
- 06/16/11 17:06:01 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/testlink/automation2.0/src/test/java/org/expressolivre/cte/pages/common/Page.java
r4344 r4620 151 151 if (option.getText().equals(value)) { 152 152 option.setSelected(); 153 break;153 return; 154 154 } 155 155 } 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 } 156 167 } 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 157 179 }
Note: See TracChangeset
for help on using the changeset viewer.