Index: devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/pages/email/MailPage.java
===================================================================
--- devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/pages/email/MailPage.java	(revision 3745)
+++ devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/pages/email/MailPage.java	(revision 3766)
@@ -144,5 +144,5 @@
 	public void createNewEmail() {
 		this.newEmail.click();
-		waitForElementById("to_1");
+		waitForElement(By.id("to_1"));
 	}
 
@@ -173,12 +173,15 @@
 
 	public String readEmail(String subject) {
+		// waitForElementByXpath("//div[@id='exmail_main_body']/table[1]/tbody[@id='border_tbody']/tr[1]/td[2]/table/tbody/tr/td[1]");
 		String id = findEmailIdBySuject(subject);
-		clickElement(id);
-		return id.substring(id.lastIndexOf("_") + 1);
-		// waitForElementByXpath("//div[@id='exmail_main_body']/table[1]/tbody[@id='border_tbody']/tr[1]/td[2]/table/tbody/tr/td[1]");
+		id = id.substring(id.lastIndexOf("_") + 1);
+		clickElement(By.id("td_who_" + id));
+		super.waitForElement(By.id("div_message_scroll_" + id + "_r"));
+		return id;
 	}
 
 	public void editEmail() {
-		super.waitForElementByXpath("//div[@id='exmail_main_body']/div[2]/table/tbody/tr[1]/td/table/tbody/tr/td[2]/span[2]/span[1]");
+		super.waitForElement(By
+				.xpath("//div[@id='exmail_main_body']/div[2]/table/tbody/tr[1]/td/table/tbody/tr/td[2]/span[2]/span[1]"));
 		this.editEmail.click();
 	}
@@ -193,7 +196,8 @@
 	 */
 	public void forwardEmail(String id, String to) {
-		super.waitForElementByXpath("//div[@id='exmail_main_body']/div[2]/table/tbody/tr[1]/td/table/tbody/tr[1]/td[3]/span[3]");
+		super.waitForElement(By
+				.xpath("//div[@id='exmail_main_body']/div[2]/table/tbody/tr[1]/td/table/tbody/tr[1]/td[3]/span[3]"));
 		this.forwardEmail.click();
-		super.waitForElementById("to_" + id);
+		super.waitForElement(By.id("to_" + id));
 		driver.findElement(By.id("to_" + id)).sendKeys(to);
 		driver.findElement(By.id("send_button_" + id)).click();
@@ -201,5 +205,5 @@
 
 	private void reply(String id) {
-		super.waitForElementById("to_" + id);
+		super.waitForElement(By.id("to_" + id));
 		driver.findElement(By.id("send_button_" + id)).click();
 	}
@@ -212,5 +216,6 @@
 	 */
 	public void replyEmail(String id) {
-		super.waitForElementByXpath("//div[@id='exmail_main_body']/div[2]/table/tbody/tr[1]/td/table/tbody/tr[1]/td[3]/span[5]");
+		super.waitForElement(By
+				.xpath("//div[@id='exmail_main_body']/div[2]/table/tbody/tr[1]/td/table/tbody/tr[1]/td[3]/span[5]"));
 		this.replyEmail.click();
 		this.reply(id);
@@ -225,5 +230,6 @@
 	public void replyAllEmailWithoutHistory(String id) {
 		super.findAndClickElement("msg_opt_reply_options_" + id + "_r");
-		super.waitForElementByXpath("//div[@id='exmail_main_body']/div[2]/table/tbody/tr[1]/td/table/tbody/tr[2]/td/div/span[3]");
+		super.waitForElement(By
+				.xpath("//div[@id='exmail_main_body']/div[2]/table/tbody/tr[1]/td/table/tbody/tr[2]/td/div/span[3]"));
 		this.replyAllEmailWithoutHistory.click();
 		this.reply(id);
@@ -238,5 +244,6 @@
 	public void replyEmailWithoutHistory(String id) {
 		super.findAndClickElement("msg_opt_reply_options_" + id + "_r");
-		super.waitForElementByXpath("//div[@id='exmail_main_body']/div[2]/table/tbody/tr[1]/td/table/tbody/tr[2]/td/div/span[2]");
+		super.waitForElement(By
+				.xpath("//div[@id='exmail_main_body']/div[2]/table/tbody/tr[1]/td/table/tbody/tr[2]/td/div/span[2]"));
 		this.replyEmailWithoutHistory.click();
 		this.reply(id);
@@ -251,5 +258,6 @@
 	public void replyAllEmail(String id) {
 		super.findAndClickElement("msg_opt_reply_options_" + id + "_r");
-		super.waitForElementByXpath("//div[@id='exmail_main_body']/div[2]/table/tbody/tr[1]/td/table/tbody/tr[2]/td/div/span[1]");
+		super.waitForElement(By
+				.xpath("//div[@id='exmail_main_body']/div[2]/table/tbody/tr[1]/td/table/tbody/tr[2]/td/div/span[1]"));
 		this.replyAllEmail.click();
 		this.reply(id);
@@ -263,6 +271,8 @@
 	 */
 	public void openFolder(String folder) {
-		clickElement(folder);
-		waitForElementById("divScrollMain_0");
+		clickElement(By.id(folder));
+		waitForElement(By.id("divScrollMain_0"));
+		waitForElement(By
+				.xpath("//div[@id='divScrollMain_0']/table[@id='table_box']/tbody[@id='tbody_box']/tr[1]/td[1]/input[1]"));
 	}
 
@@ -275,5 +285,5 @@
 	public void openFolder(WebElement folder) {
 		folder.click();
-		waitForElementById("divScrollMain_0");
+		waitForElement(By.id("divScrollMain_0"));
 	}
 
@@ -305,5 +315,6 @@
 	public void editFolder() {
 		this.toolsMenu.click();
-		this.waitForElementByXpath("//div[@id='menu_tools']/table/tbody/tr[4]/td");
+		this.waitForElement(By
+				.xpath("//div[@id='menu_tools']/table/tbody/tr[4]/td"));
 		this.editFolder.click();
 	}
@@ -337,15 +348,18 @@
 
 	public void setImportantFlag() {
-		this.waitForElementByXpath("//div[@id='exmail_main_body']/div[2]/table/tbody/tr[1]/td/table/tbody/tr[1]/td[2]/span[3]");
+		this.waitForElement(By
+				.xpath("//div[@id='exmail_main_body']/div[2]/table/tbody/tr[1]/td/table/tbody/tr[1]/td[2]/span[3]"));
 		this.importantFlag.click();
 	}
 
 	public void setNormalFlag() {
-		this.waitForElementByXpath("//div[@id='exmail_main_body']/div[2]/table/tbody/tr[1]/td/table/tbody/tr[1]/td[2]/span[3]");
+		this.waitForElement(By
+				.xpath("//div[@id='exmail_main_body']/div[2]/table/tbody/tr[1]/td/table/tbody/tr[1]/td[2]/span[3]"));
 		this.normalFlag.click();
 	}
 
 	public void setNotReadFlag() {
-		this.waitForElementByXpath("//div[@id='exmail_main_body']/div[2]/table/tbody/tr[1]/td/table/tbody/tr[1]/td[2]/span[2]");
+		this.waitForElement(By
+				.xpath("//div[@id='exmail_main_body']/div[2]/table/tbody/tr[1]/td/table/tbody/tr[1]/td[2]/span[2]"));
 		this.notReadFlag.click();
 	}
@@ -422,4 +436,19 @@
 	public void sendMail() {
 		this.send.click();
+	}
+
+	/**
+	 * Fecha aba do email sendo composto e confirma que email nao esta salvo.
+	 */
+	public void closeMail() {
+		this.closeMail(true);
+	}
+
+	public void closeMail(boolean checkAlert) {
+		super.clickElement(By.xpath("//td[@id='border_id_1']/div/div[2]/img"));
+		if (checkAlert) {
+			Alert closeAlert = driver.switchTo().alert();
+			closeAlert.accept();
+		}
 	}
 
@@ -461,5 +490,5 @@
 		if (select) {
 			// Marca checkbox correspondente ao id da mensagem.
-			clickElement("check_box" + id.substring(1));
+			clickElement(By.id("check_box" + id.substring(1)));
 		}
 		return id;
