Ignore:
Timestamp:
02/10/11 14:58:57 (13 years ago)
Author:
luiz-fernando
Message:

Ticket #1402 - Novos casos de teste implementados usando WebDriver?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/pages/email/MailPage.java

    r3708 r3745  
    120120        private WebElement forwardEmail; 
    121121 
     122        @FindBy(xpath = "//div[@id='exmail_main_body']/div[2]/table/tbody/tr[1]/td/table/tbody/tr[1]/td[3]/span[5]") 
     123        private WebElement replyEmail; 
     124 
     125        @FindBy(xpath = "//div[@id='exmail_main_body']/div[2]/table/tbody/tr[1]/td/table/tbody/tr[2]/td/div/span[1]") 
     126        private WebElement replyAllEmail; 
     127 
     128        @FindBy(xpath = "//div[@id='exmail_main_body']/div[2]/table/tbody/tr[1]/td/table/tbody/tr[2]/td/div/span[2]") 
     129        private WebElement replyEmailWithoutHistory; 
     130 
     131        @FindBy(xpath = "//div[@id='exmail_main_body']/div[2]/table/tbody/tr[1]/td/table/tbody/tr[2]/td/div/span[3]") 
     132        private WebElement replyAllEmailWithoutHistory; 
     133 
     134        @FindBy(xpath = "//div[@id='exmail_main_body']/div[2]/table/tbody/tr[1]/td/table/tbody/tr/td[2]/span[2]/span[1]") 
     135        private WebElement editEmail; 
     136 
    122137        /** 
    123138         * @param driver 
     
    164179        } 
    165180 
     181        public void editEmail() { 
     182                super.waitForElementByXpath("//div[@id='exmail_main_body']/div[2]/table/tbody/tr[1]/td/table/tbody/tr/td[2]/span[2]/span[1]"); 
     183                this.editEmail.click(); 
     184        } 
     185 
    166186        /** 
    167187         * Encaminha uma mensagem. 
     
    178198                driver.findElement(By.id("to_" + id)).sendKeys(to); 
    179199                driver.findElement(By.id("send_button_" + id)).click(); 
     200        } 
     201 
     202        private void reply(String id) { 
     203                super.waitForElementById("to_" + id); 
     204                driver.findElement(By.id("send_button_" + id)).click(); 
     205        } 
     206 
     207        /** 
     208         * Responde uma mensagem. 
     209         *  
     210         * @param id 
     211         *            Id da mensagem a ser respondida 
     212         */ 
     213        public void replyEmail(String id) { 
     214                super.waitForElementByXpath("//div[@id='exmail_main_body']/div[2]/table/tbody/tr[1]/td/table/tbody/tr[1]/td[3]/span[5]"); 
     215                this.replyEmail.click(); 
     216                this.reply(id); 
     217        } 
     218 
     219        /** 
     220         * Responde uma mensagem. 
     221         *  
     222         * @param id 
     223         *            Id da mensagem a ser respondida 
     224         */ 
     225        public void replyAllEmailWithoutHistory(String id) { 
     226                super.findAndClickElement("msg_opt_reply_options_" + id + "_r"); 
     227                super.waitForElementByXpath("//div[@id='exmail_main_body']/div[2]/table/tbody/tr[1]/td/table/tbody/tr[2]/td/div/span[3]"); 
     228                this.replyAllEmailWithoutHistory.click(); 
     229                this.reply(id); 
     230        } 
     231 
     232        /** 
     233         * Responde uma mensagem. 
     234         *  
     235         * @param id 
     236         *            Id da mensagem a ser respondida 
     237         */ 
     238        public void replyEmailWithoutHistory(String id) { 
     239                super.findAndClickElement("msg_opt_reply_options_" + id + "_r"); 
     240                super.waitForElementByXpath("//div[@id='exmail_main_body']/div[2]/table/tbody/tr[1]/td/table/tbody/tr[2]/td/div/span[2]"); 
     241                this.replyEmailWithoutHistory.click(); 
     242                this.reply(id); 
     243        } 
     244 
     245        /** 
     246         * Responde uma mensagem. 
     247         *  
     248         * @param id 
     249         *            Id da mensagem a ser respondida 
     250         */ 
     251        public void replyAllEmail(String id) { 
     252                super.findAndClickElement("msg_opt_reply_options_" + id + "_r"); 
     253                super.waitForElementByXpath("//div[@id='exmail_main_body']/div[2]/table/tbody/tr[1]/td/table/tbody/tr[2]/td/div/span[1]"); 
     254                this.replyAllEmail.click(); 
     255                this.reply(id); 
    180256        } 
    181257 
     
    346422        public void sendMail() { 
    347423                this.send.click(); 
     424        } 
     425 
     426        public void sendMail(String id) { 
     427                super.findAndClickElement("send_button_" + id); 
    348428        } 
    349429 
Note: See TracChangeset for help on using the changeset viewer.