- Timestamp:
- 02/22/11 16:57:17 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/testlink/automation2.0/src/test/java/org/expressolivre/cte/pages/email/MailPage.java
r3782 r3799 11 11 import org.openqa.selenium.support.FindBy; 12 12 13 14 13 /** 15 14 * @author L.F.Estivalet (Serpro) … … 184 183 super.waitForElement(By 185 184 .xpath("//div[@id='exmail_main_body']/div[2]/table/tbody/tr[1]/td/table/tbody/tr/td[2]/span[2]/span[1]")); 185 // div[@id='exmail_main_body']/div[@id='content_id_9_r']/table/tbody/tr[1]/td/table/tbody/tr/td[2]/span[1] 186 186 this.editEmail.click(); 187 } 188 189 public void editEmail(String id) { 190 super.waitForElement(By 191 .xpath("//div[@id='exmail_main_body']/div[2]/table/tbody/tr[1]/td/table/tbody/tr/td[2]/span[2]/span[1]")); 192 // div[@id='exmail_main_body']/div[@id='content_id_9_r']/table/tbody/tr[1]/td/table/tbody/tr/td[2]/span[1] 193 this.editEmail.click(); 194 waitForElement(By.id("content_id_" + id)); 187 195 } 188 196 … … 445 453 } 446 454 455 /** 456 * @param checkAlert 457 */ 447 458 public void closeMail(boolean checkAlert) { 448 super.clickElement(By.xpath("//td[@id='border_id_1']/div/div[2]/img")); 459 460 // Na versao Serpro: 461 // td[@id='border_id_1']/table/tbody/tr/td[2]/img 462 463 // Na versao Comunidade: 464 // td[@id='border_id_1']/div/div[2]/img 465 466 // Resolvi usando o xpath abaixo: 467 super.clickElement(By.xpath("//td[@id='border_id_1']//img")); 468 449 469 if (checkAlert) { 450 470 Alert closeAlert = driver.switchTo().alert(); … … 538 558 assert message.equals(getDisplayedElementContent("em_div_write_msg")); 539 559 } 560 561 /** 562 * @return the to 563 */ 564 public WebElement getTo(String id) { 565 waitForElement(By.id("to_" + id)); 566 // findAndClickElement("to_" + id); 567 // return getDisplayedElementContent(id); 568 return driver.findElement(By.id("to_" + id)); 569 } 570 571 /** 572 * @return the subject 573 */ 574 public WebElement getSubject(String id) { 575 waitForElement(By.id("subject_" + id)); 576 return driver.findElement(By.id("subject_" + id)); 577 } 578 579 /** 580 * @return the blindCarbonCopy 581 */ 582 public WebElement getBlindCarbonCopy(String id) { 583 waitForElement(By.id("cco_" + id)); 584 return driver.findElement(By.id("cco_" + id)); 585 } 586 587 /** 588 * @return the carbonCopy 589 */ 590 public WebElement getCarbonCopy(String id) { 591 waitForElement(By.id("cc_" + id)); 592 return driver.findElement(By.id("cc_" + id)); 593 } 594 595 public Object getBody(String id) { 596 waitForElement(By.id("body_" + id)); 597 return ((JavascriptExecutor) driver) 598 .executeScript("return document.getElementById('body_" + id 599 + "').contentWindow.document.body.innerHTML;"); 600 } 601 540 602 }
Note: See TracChangeset
for help on using the changeset viewer.