Changeset 4902 for devel/testlink/automation2.0/src/test/java/org/expressolivre/cte/pages/common/Page.java
- Timestamp:
- 08/04/11 15:43:12 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/testlink/automation2.0/src/test/java/org/expressolivre/cte/pages/common/Page.java
r4895 r4902 39 39 40 40 /** 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); 49 46 } 50 47 … … 86 83 } 87 84 85 /** 86 * @param e 87 * @return 88 */ 88 89 public boolean isNotDisplayed(RenderedWebElement e) { 89 90 // Up to 10 times … … 104 105 105 106 /** 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 */ 118 128 public RenderedWebElement waitFindElement(By by, long timeout, long interval) { 119 129 long start = System.currentTimeMillis(); … … 175 185 } 176 186 187 /** 188 * @param element 189 * Combo box. 190 * @return Retorna o elemento selecionado da combo box. 191 */ 177 192 public String getComboValue(WebElement element) { 178 193 List<WebElement> options = element.findElements(By.tagName("option"));
Note: See TracChangeset
for help on using the changeset viewer.