Ignore:
Timestamp:
02/22/11 16:57:17 (13 years ago)
Author:
luiz-fernando
Message:

Ticket #1402 - Novos casos de teste para Salvar Email no Rascunho

File:
1 edited

Legend:

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

    r3782 r3799  
    1111import org.openqa.selenium.support.FindBy; 
    1212 
    13  
    1413/** 
    1514 * @author L.F.Estivalet (Serpro) 
     
    184183                super.waitForElement(By 
    185184                                .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] 
    186186                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)); 
    187195        } 
    188196 
     
    445453        } 
    446454 
     455        /** 
     456         * @param checkAlert 
     457         */ 
    447458        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 
    449469                if (checkAlert) { 
    450470                        Alert closeAlert = driver.switchTo().alert(); 
     
    538558                assert message.equals(getDisplayedElementContent("em_div_write_msg")); 
    539559        } 
     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 
    540602} 
Note: See TracChangeset for help on using the changeset viewer.