- Timestamp:
- 08/19/11 16:38:24 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/testlink/automation2.0/src/test/java/org/expressolivre/cte/pages/email/MailPage.java
r4902 r4962 2 2 3 3 import org.apache.commons.lang.StringUtils; 4 import org.expressolivre.cte.pages.calendar.AppointmentEmailPage; 4 5 import org.expressolivre.cte.pages.common.Page; 5 6 import org.openqa.selenium.Alert; … … 311 312 312 313 public String readEmail(String subject) { 313 // waitForElementByXpath("//div[@id='exmail_main_body']/table[1]/tbody[@id='border_tbody']/tr[1]/td[2]/table/tbody/tr/td[1]");314 314 String id = findEmailIdBySubject(subject); 315 315 id = id.substring(id.lastIndexOf("_") + 1); … … 317 317 super.waitForElement(By.id("div_message_scroll_" + id + "_r")); 318 318 return id; 319 } 320 321 /** 322 * @param subject 323 * Procura o email pelo assunto. 324 * @return Id do email. 325 */ 326 public String getEmailId(String subject) { 327 String id = findEmailIdBySubject(subject); 328 return id.substring(id.lastIndexOf("_") + 1); 329 } 330 331 /** 332 * Le um email gerado a partir de um agendamento. 333 * 334 * @param subject 335 * @return 336 */ 337 public AppointmentEmailPage readAppointmentEmail(String subject) { 338 String id = findEmailIdBySubject(subject); 339 id = id.substring(id.lastIndexOf("_") + 1); 340 clickElement(By.id("td_who_" + id)); 341 super.waitForElement(By.id("div_message_scroll_" + id + "_r")); 342 return PageFactory.initElements(driver, AppointmentEmailPage.class); 319 343 } 320 344 … … 961 985 } 962 986 987 /** 988 * O email de notificacao de agendamento tem um "_r" no fim do id. 989 * 990 * @param id 991 * @return 992 */ 993 public Object getAppointmentBody(String id) { 994 waitForElement(By.id("body_" + id + "_r")); 995 return ((JavascriptExecutor) driver) 996 .executeScript("return document.getElementById('body_" + id 997 + "_r" + "').innerHTML;"); 998 } 999 963 1000 public WebElement getReturnReceipt() { 964 1001 return returnReceipt;
Note: See TracChangeset
for help on using the changeset viewer.