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 3708)
+++ /devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/pages/email/MailPage.java	(revision 3745)
@@ -120,4 +120,19 @@
 	private WebElement forwardEmail;
 
+	@FindBy(xpath = "//div[@id='exmail_main_body']/div[2]/table/tbody/tr[1]/td/table/tbody/tr[1]/td[3]/span[5]")
+	private WebElement replyEmail;
+
+	@FindBy(xpath = "//div[@id='exmail_main_body']/div[2]/table/tbody/tr[1]/td/table/tbody/tr[2]/td/div/span[1]")
+	private WebElement replyAllEmail;
+
+	@FindBy(xpath = "//div[@id='exmail_main_body']/div[2]/table/tbody/tr[1]/td/table/tbody/tr[2]/td/div/span[2]")
+	private WebElement replyEmailWithoutHistory;
+
+	@FindBy(xpath = "//div[@id='exmail_main_body']/div[2]/table/tbody/tr[1]/td/table/tbody/tr[2]/td/div/span[3]")
+	private WebElement replyAllEmailWithoutHistory;
+
+	@FindBy(xpath = "//div[@id='exmail_main_body']/div[2]/table/tbody/tr[1]/td/table/tbody/tr/td[2]/span[2]/span[1]")
+	private WebElement editEmail;
+
 	/**
 	 * @param driver
@@ -164,4 +179,9 @@
 	}
 
+	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]");
+		this.editEmail.click();
+	}
+
 	/**
 	 * Encaminha uma mensagem.
@@ -178,4 +198,60 @@
 		driver.findElement(By.id("to_" + id)).sendKeys(to);
 		driver.findElement(By.id("send_button_" + id)).click();
+	}
+
+	private void reply(String id) {
+		super.waitForElementById("to_" + id);
+		driver.findElement(By.id("send_button_" + id)).click();
+	}
+
+	/**
+	 * Responde uma mensagem.
+	 * 
+	 * @param id
+	 *            Id da mensagem a ser respondida
+	 */
+	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]");
+		this.replyEmail.click();
+		this.reply(id);
+	}
+
+	/**
+	 * Responde uma mensagem.
+	 * 
+	 * @param id
+	 *            Id da mensagem a ser respondida
+	 */
+	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]");
+		this.replyAllEmailWithoutHistory.click();
+		this.reply(id);
+	}
+
+	/**
+	 * Responde uma mensagem.
+	 * 
+	 * @param id
+	 *            Id da mensagem a ser respondida
+	 */
+	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]");
+		this.replyEmailWithoutHistory.click();
+		this.reply(id);
+	}
+
+	/**
+	 * Responde uma mensagem.
+	 * 
+	 * @param id
+	 *            Id da mensagem a ser respondida
+	 */
+	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]");
+		this.replyAllEmail.click();
+		this.reply(id);
 	}
 
@@ -346,4 +422,8 @@
 	public void sendMail() {
 		this.send.click();
+	}
+
+	public void sendMail(String id) {
+		super.findAndClickElement("send_button_" + id);
 	}
 
Index: /devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/pages/email/ExpressoMailPreferencesPage.java
===================================================================
--- /devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/pages/email/ExpressoMailPreferencesPage.java	(revision 3745)
+++ /devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/pages/email/ExpressoMailPreferencesPage.java	(revision 3745)
@@ -0,0 +1,469 @@
+package br.gov.serpro.expresso.cte.pages.email;
+
+import org.openqa.selenium.WebDriver;
+import org.openqa.selenium.WebElement;
+import org.openqa.selenium.support.FindBy;
+
+import br.gov.serpro.expresso.cte.pages.common.Page;
+
+/**
+ * @author L.F.Estivalet (Serpro)
+ * 
+ *         Created on Feb 3, 2011 at 11:03:45 AM
+ * 
+ */
+public class ExpressoMailPreferencesPage extends Page {
+
+	/** Utilizar nome (CN) ao invÃ©s de login (uid) em pastas compartilhadas? */
+	@FindBy(name = "user[uid2cn]")
+	private WebElement userCNInSharedFolders;
+
+	/** VocÃª deseja exibir automaticamente o cabecalho da mensagem? */
+	@FindBy(name = "user[show_head_msg_full]")
+	private WebElement showHeadMsgFull;
+
+	/** Qual o nÃºmero mÃ¡ximo de mensagens por pÃ¡gina? */
+	@FindBy(name = "user[max_email_per_page]")
+	private WebElement maxEmailPerPage;
+
+	/** PrÃ©-visualizar a mensagem na coluna Assunto? */
+	@FindBy(name = "user[preview_msg_subject]")
+	private WebElement previewMsgSubject;
+
+	/** PrÃ©-visualizar a mensagem em uma caixa tool-tip? */
+	@FindBy(name = "user[preview_msg_tip]")
+	private WebElement previewMsgTip;
+
+	/** View extended information about users* */
+	@FindBy(name = "user[extended_info]")
+	private WebElement extendedInfo;
+
+	/** Salvar mensagens excluÃ­das na pasta Lixeira? */
+	@FindBy(name = "user[save_deleted_msg]")
+	private WebElement saveDeletedMsg;
+
+	/** Apagar mensagens apÃ³s quantos dias na lixeira? */
+	@FindBy(name = "user[delete_trash_messages_after_n_days]")
+	private WebElement deleteTrashMessagesAfterNDays;
+
+	/** VocÃª gostaria de usar mensagens locais? */
+	@FindBy(name = "user[use_local_messages]")
+	private WebElement useLocalMessages;
+
+	/** AÃ§Ã£o desejada ao arquivar mensagem nas pastas locais */
+	@FindBy(name = "user[keep_archived_messages]")
+	private WebElement keepArchivedMessages;
+
+	/** Criar automÃ¡ticamente pastas locais padrÃ£o? */
+	@FindBy(name = "user[auto_create_local]")
+	private WebElement autoCreateLocal;
+
+	/** Exibir mensagem anterior, apÃ³s apagar mensagem atual? */
+	@FindBy(name = "user[delete_and_show_previous_message]")
+	private WebElement deleteAndShowPreviousMessage;
+
+	/** VocÃª quer receber um alerta para mensagens novas? */
+	@FindBy(name = "user[alert_new_msg]")
+	private WebElement alertNewMsg;
+
+	/** Exibir resumo do ExpressoMail na tela inicial do Expresso? */
+	@FindBy(name = "user[mainscreen_showmail]")
+	private WebElement mainScreenShowMail;
+
+	/** VocÃª gostaria de usar a funÃ§Ã£o de desanexar? */
+	@FindBy(name = "user[remove_attachments_function]")
+	private WebElement removeAttachmentsFunction;
+
+	/** VocÃª gostaria de usar a flag de importante na ediÃ§Ã£o de emails? */
+	@FindBy(name = "user[use_important_flag]")
+	private WebElement useImportantFlag;
+
+	/** Quer usar o corretor ortogrÃ¡fico no editor de emails? */
+	@FindBy(name = "user[use_SpellChecker]")
+	private WebElement useSpellChecker;
+
+	/** Salvar automaticamente as mensagens enviadas na pasta */
+	@FindBy(name = "user[save_in_folder]")
+	private WebElement saveInFolder;
+
+	/**
+	 * Trocar remetente pelo destinatÃ¡rio na coluna QUEM somente na pasta
+	 * Enviado
+	 */
+	@FindBy(name = "user[from_to_sent]")
+	private WebElement fromToSent;
+
+	/** Ocultar menu das pastas? */
+	@FindBy(name = "user[hide_folders]")
+	private WebElement hideFolders;
+
+	/** Qual o nÃºmero mÃ¡ximo de resultados na busca de e-mails? */
+	@FindBy(name = "user[search_result_number]")
+	private WebElement searchResultNumber;
+
+	/** Qual Ã© o nÃºmero mÃ­nimo de caracteres ao pesquisar contatos? */
+	@FindBy(name = "user[search_characters_number]")
+	private WebElement searchCharactersNumber;
+
+	/** Qual a altura das linhas na lista de mensagens? */
+	@FindBy(name = "user[line_height]")
+	private WebElement lineHeight;
+
+	/**
+	 * VocÃª quer que se aumente o limite de tamanho de emails que sÃ£o mostrados?
+	 */
+	@FindBy(name = "user[max_msg_size]")
+	private WebElement maxMsgSize;
+
+	/** Usar contatos dinÃ¢micos? */
+	@FindBy(name = "user[use_dynamic_contacts]")
+	private WebElement useDynamicContacts;
+
+	/** Usar teclas de atalho? */
+	@FindBy(name = "user[use_shortcuts]")
+	private WebElement useShortcuts;
+
+	/** Salvar rascunhos automaticamente */
+	@FindBy(name = "user[auto_save_draft]")
+	private WebElement autoSaveDraft;
+
+	/** Qual o seu fuso-horÃ¡rio? */
+	@FindBy(name = "user[timezone]")
+	private WebElement timezone;
+
+	/** Aonde a pesquisa rÃ¡pida deve atuar por padrÃ£o? */
+	@FindBy(name = "user[quick_search_default]")
+	private WebElement quickSearchDefault;
+
+	/** Qual o tamanho mÃ¡ximo das imagens inseridas nos emails? */
+	@FindBy(name = "user[image_size]")
+	private WebElement imageSize;
+
+	/** Possibilitar assinar/cifrar digitalmente a mensagem? */
+	@FindBy(name = "user[use_signature_digital_cripto]")
+	private WebElement useSignatureDigitalCripto;
+
+	/** Sempre assinar digitalmente a mensagem? */
+	@FindBy(name = "user[use_signature_digital]")
+	private WebElement useSignatureDigital;
+
+	/** Sempre cifrar digitalmente a mensagem? */
+	@FindBy(name = "user[use_signature_cripto]")
+	private WebElement useSignatureCripto;
+
+	/** Inserir assinatura automaticamente em novas mensagens? */
+	@FindBy(name = "user[use_signature]")
+	private WebElement useSignature;
+
+	/** Tipo de Assinatura */
+	@FindBy(name = "user[type_signature]")
+	private WebElement typeSignature;
+
+	@FindBy(name = "submit")
+	private WebElement savePreferences;
+
+	public ExpressoMailPreferencesPage(WebDriver driver) {
+		super(driver);
+		// TODO Auto-generated constructor stub
+	}
+
+	public void savePreferences() {
+		this.savePreferences.click();
+	}
+
+	/**
+	 * @param userCNInSharedFolders
+	 *            the userCNInSharedFolders to set
+	 */
+	public void setUserCNInSharedFolders(String userCNInSharedFolders) {
+		System.out.println("setting...");
+		super.setComboValue(this.userCNInSharedFolders, userCNInSharedFolders);
+	}
+
+	/**
+	 * @param showHeadMsgFull
+	 *            the showHeadMsgFull to set
+	 */
+	public void setShowHeadMsgFull(String showHeadMsgFull) {
+		super.setComboValue(this.showHeadMsgFull, showHeadMsgFull);
+	}
+
+	/**
+	 * @param maxEmailPerPage
+	 *            the maxEmailPerPage to set
+	 */
+	public void setMaxEmailPerPage(String maxEmailPerPage) {
+		super.setComboValue(this.maxEmailPerPage, maxEmailPerPage);
+	}
+
+	/**
+	 * @param previewMsgSubject
+	 *            the previewMsgSubject to set
+	 */
+	public void setPreviewMsgSubject(String previewMsgSubject) {
+		super.setComboValue(this.previewMsgSubject, previewMsgSubject);
+	}
+
+	/**
+	 * @param previewMsgTip
+	 *            the previewMsgTip to set
+	 */
+	public void setPreviewMsgTip(String previewMsgTip) {
+		super.setComboValue(this.previewMsgTip, previewMsgTip);
+	}
+
+	/**
+	 * @param extendedInfo
+	 *            the extendedInfo to set
+	 */
+	public void setExtendedInfo(String extendedInfo) {
+		super.setComboValue(this.extendedInfo, extendedInfo);
+	}
+
+	/**
+	 * @param saveDeletedMsg
+	 *            the saveDeletedMsg to set
+	 */
+	public void setSaveDeletedMsg(String saveDeletedMsg) {
+		super.setComboValue(this.saveDeletedMsg, saveDeletedMsg);
+	}
+
+	/**
+	 * @param deleteTrashMessagesAfterNDays
+	 *            the deleteTrashMessagesAfterNDays to set
+	 */
+	public void setDeleteTrashMessagesAfterNDays(
+			String deleteTrashMessagesAfterNDays) {
+		super.setComboValue(this.deleteTrashMessagesAfterNDays,
+				deleteTrashMessagesAfterNDays);
+	}
+
+	/**
+	 * @param useLocalMessages
+	 *            the useLocalMessages to set
+	 */
+	public void setUseLocalMessages(String useLocalMessages) {
+		super.setComboValue(this.useLocalMessages, useLocalMessages);
+	}
+
+	/**
+	 * @param keepArchivedMessages
+	 *            the keepArchivedMessages to set
+	 */
+	public void setKeepArchivedMessages(String keepArchivedMessages) {
+		super.setComboValue(this.keepArchivedMessages, keepArchivedMessages);
+	}
+
+	/**
+	 * @param autoCreateLocal
+	 *            the autoCreateLocal to set
+	 */
+	public void setAutoCreateLocal(String autoCreateLocal) {
+		super.setComboValue(this.autoCreateLocal, autoCreateLocal);
+	}
+
+	/**
+	 * @param deleteAndShowPreviousMessage
+	 *            the deleteAndShowPreviousMessage to set
+	 */
+	public void setDeleteAndShowPreviousMessage(
+			String deleteAndShowPreviousMessage) {
+		super.setComboValue(this.deleteAndShowPreviousMessage,
+				deleteAndShowPreviousMessage);
+	}
+
+	/**
+	 * @param alertNewMsg
+	 *            the alertNewMsg to set
+	 */
+	public void setAlertNewMsg(String alertNewMsg) {
+		super.setComboValue(this.alertNewMsg, alertNewMsg);
+	}
+
+	/**
+	 * @param mainScreenShowMail
+	 *            the mainScreenShowMail to set
+	 */
+	public void setMainScreenShowMail(String mainScreenShowMail) {
+		super.setComboValue(this.mainScreenShowMail, mainScreenShowMail);
+	}
+
+	/**
+	 * @param removeAttachmentsFunction
+	 *            the removeAttachmentsFunction to set
+	 */
+	public void setRemoveAttachmentsFunction(String removeAttachmentsFunction) {
+		super.setComboValue(this.removeAttachmentsFunction,
+				removeAttachmentsFunction);
+	}
+
+	/**
+	 * @param useImportantFlag
+	 *            the useImportantFlag to set
+	 */
+	public void setUseImportantFlag(String useImportantFlag) {
+		super.setComboValue(this.useImportantFlag, useImportantFlag);
+	}
+
+	/**
+	 * @param useSpellChecker
+	 *            the useSpellChecker to set
+	 */
+	public void setUseSpellChecker(String useSpellChecker) {
+		super.setComboValue(this.useSpellChecker, useSpellChecker);
+	}
+
+	/**
+	 * @param saveInFolder
+	 *            the saveInFolder to set
+	 */
+	public void setSaveInFolder(String saveInFolder) {
+		super.setComboValue(this.saveInFolder, saveInFolder);
+	}
+
+	/**
+	 * @param fromToSent
+	 *            the fromToSent to set
+	 */
+	public void setFromToSent(String fromToSent) {
+		super.setComboValue(this.fromToSent, fromToSent);
+	}
+
+	/**
+	 * @param hideFolders
+	 *            the hideFolders to set
+	 */
+	public void setHideFolders(String hideFolders) {
+		super.setComboValue(this.hideFolders, hideFolders);
+	}
+
+	/**
+	 * @param searchResultNumber
+	 *            the searchResultNumber to set
+	 */
+	public void setSearchResultNumber(String searchResultNumber) {
+		super.setComboValue(this.searchResultNumber, searchResultNumber);
+	}
+
+	/**
+	 * @param searchCharactersNumber
+	 *            the searchCharactersNumber to set
+	 */
+	public void setSearchCharactersNumber(String searchCharactersNumber) {
+		super.setComboValue(this.searchCharactersNumber, searchCharactersNumber);
+	}
+
+	/**
+	 * @param lineHeight
+	 *            the lineHeight to set
+	 */
+	public void setLineHeight(String lineHeight) {
+		super.setComboValue(this.lineHeight, lineHeight);
+	}
+
+	/**
+	 * @param maxMsgSize
+	 *            the maxMsgSize to set
+	 */
+	public void setMaxMsgSize(String maxMsgSize) {
+		super.setComboValue(this.maxMsgSize, maxMsgSize);
+	}
+
+	/**
+	 * @param useDynamicContacts
+	 *            the useDynamicContacts to set
+	 */
+	public void setUseDynamicContacts(String useDynamicContacts) {
+		super.setComboValue(this.useDynamicContacts, useDynamicContacts);
+	}
+
+	/**
+	 * @param useShortcuts
+	 *            the useShortcuts to set
+	 */
+	public void setUseShortcuts(String useShortcuts) {
+		super.setComboValue(this.useShortcuts, useShortcuts);
+	}
+
+	/**
+	 * @param autoSaveDraft
+	 *            the autoSaveDraft to set
+	 */
+	public void setAutoSaveDraft(String autoSaveDraft) {
+		super.setComboValue(this.autoSaveDraft, autoSaveDraft);
+	}
+
+	/**
+	 * @param timezone
+	 *            the timezone to set
+	 */
+	public void setTimezone(String timezone) {
+		super.setComboValue(this.timezone, timezone);
+	}
+
+	/**
+	 * @param quickSearchDefault
+	 *            the quickSearchDefault to set
+	 */
+	public void setQuickSearchDefault(String quickSearchDefault) {
+		super.setComboValue(this.quickSearchDefault, quickSearchDefault);
+	}
+
+	/**
+	 * @param imageSize
+	 *            the imageSize to set
+	 */
+	public void setImageSize(String imageSize) {
+		super.setComboValue(this.imageSize, imageSize);
+	}
+
+	/**
+	 * @param useSignatureDigitalCripto
+	 *            the useSignatureDigitalCripto to set
+	 */
+	public void setUseSignatureDigitalCripto(String useSignatureDigitalCripto) {
+		super.setComboValue(this.useSignatureDigitalCripto,
+				useSignatureDigitalCripto);
+	}
+
+	/**
+	 * @param useSignatureDigital
+	 *            the useSignatureDigital to set
+	 */
+	public void setUseSignatureDigital(String useSignatureDigital) {
+		super.setComboValue(this.useSignatureDigital, useSignatureDigital);
+	}
+
+	/**
+	 * @param useSignatureCripto
+	 *            the useSignatureCripto to set
+	 */
+	public void setUseSignatureCripto(String useSignatureCripto) {
+		super.setComboValue(this.useSignatureCripto, useSignatureCripto);
+	}
+
+	/**
+	 * @param useSignature
+	 *            the useSignature to set
+	 */
+	public void setUseSignature(String useSignature) {
+		super.setComboValue(this.useSignature, useSignature);
+	}
+
+	/**
+	 * @param typeSignature
+	 *            the typeSignature to set
+	 */
+	public void setTypeSignature(String typeSignature) {
+		super.setComboValue(this.typeSignature, typeSignature);
+	}
+
+	/**
+	 * @param savePreferences
+	 *            the savePreferences to set
+	 */
+	public void setSavePreferences(String savePreferences) {
+		super.setComboValue(this.savePreferences, savePreferences);
+	}
+
+}
Index: vel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/pages/email/HomePage.java
===================================================================
--- /devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/pages/email/HomePage.java	(revision 3663)
+++ 	(revision )
@@ -1,30 +1,0 @@
-package br.gov.serpro.expresso.cte.pages.email;
-
-import org.openqa.selenium.WebDriver;
-import org.openqa.selenium.WebElement;
-import org.openqa.selenium.support.FindBy;
-
-import br.gov.serpro.expresso.cte.pages.common.Page;
-
-/**
- * @author L.F.Estivalet (Serpro)
- * 
- *         Created on Dec 16, 2010 at 9:43:15 AM
- * 
- */
-public class HomePage extends Page {
-	@FindBy(xpath = "//a/img[@id='expressoMail12id']")
-	private WebElement mail;
-
-	/**
-	 * @param driver
-	 */
-	public HomePage(WebDriver driver) {
-		super(driver);
-	}
-
-	public void enterMail() {
-		mail.click();
-		waitForElementByXpath("//table[@id='folders_tbl']/tbody/tr[1]/td/table/tbody/tr[2]/td/div/span");
-	}
-}
Index: vel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/pages/email/LoginPage.java
===================================================================
--- /devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/pages/email/LoginPage.java	(revision 3663)
+++ 	(revision )
@@ -1,41 +1,0 @@
-package br.gov.serpro.expresso.cte.pages.email;
-
-import org.openqa.selenium.WebDriver;
-import org.openqa.selenium.WebElement;
-import org.openqa.selenium.support.FindBy;
-
-import br.gov.serpro.expresso.cte.pages.common.Page;
-
-/**
- * @author L.F.Estivalet (Serpro)
- * 
- *         Created on Dec 13, 2010 at 9:30:42 AM
- * 
- */
-public class LoginPage extends Page {
-
-	@FindBy(name = "user")
-	private WebElement username;
-
-	@FindBy(name = "passwd")
-	private WebElement password;
-
-	/**
-	 * @param driver
-	 */
-	public LoginPage(WebDriver driver) {
-		super(driver);
-	}
-
-	/**
-	 * @param username
-	 * @param password
-	 */
-	public void login(String username, String password) {
-		this.username.sendKeys(username);
-		this.password.sendKeys(password);
-		this.username.submit();
-
-	}
-
-}
Index: /devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/pages/common/HomePage.java
===================================================================
--- /devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/pages/common/HomePage.java	(revision 3745)
+++ /devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/pages/common/HomePage.java	(revision 3745)
@@ -0,0 +1,36 @@
+package br.gov.serpro.expresso.cte.pages.common;
+
+import org.openqa.selenium.WebDriver;
+import org.openqa.selenium.WebElement;
+import org.openqa.selenium.support.FindBy;
+
+/**
+ * @author L.F.Estivalet (Serpro)
+ * 
+ *         Created on Dec 16, 2010 at 9:43:15 AM
+ * 
+ */
+public class HomePage extends Page {
+	@FindBy(xpath = "//a/img[@id='expressoMail12id']")
+	private WebElement mail;
+
+	@FindBy(id = "calendarid")
+	private WebElement calendar;
+
+	/**
+	 * @param driver
+	 */
+	public HomePage(WebDriver driver) {
+		super(driver);
+	}
+
+	public void enterMail() {
+		mail.click();
+		waitForElementByXpath("//table[@id='folders_tbl']/tbody/tr[1]/td/table/tbody/tr[2]/td/div/span");
+	}
+
+	public void enterCalendar() {
+		calendar.click();
+		waitForElementById("divAppbox");
+	}
+}
Index: /devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/pages/common/LoginPage.java
===================================================================
--- /devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/pages/common/LoginPage.java	(revision 3745)
+++ /devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/pages/common/LoginPage.java	(revision 3745)
@@ -0,0 +1,40 @@
+package br.gov.serpro.expresso.cte.pages.common;
+
+import org.openqa.selenium.WebDriver;
+import org.openqa.selenium.WebElement;
+import org.openqa.selenium.support.FindBy;
+
+
+/**
+ * @author L.F.Estivalet (Serpro)
+ * 
+ *         Created on Dec 13, 2010 at 9:30:42 AM
+ * 
+ */
+public class LoginPage extends Page {
+
+	@FindBy(name = "user")
+	private WebElement username;
+
+	@FindBy(name = "passwd")
+	private WebElement password;
+
+	/**
+	 * @param driver
+	 */
+	public LoginPage(WebDriver driver) {
+		super(driver);
+	}
+
+	/**
+	 * @param username
+	 * @param password
+	 */
+	public void login(String username, String password) {
+		this.username.sendKeys(username);
+		this.password.sendKeys(password);
+		this.username.submit();
+
+	}
+
+}
Index: /devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/pages/common/Page.java
===================================================================
--- /devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/pages/common/Page.java	(revision 3708)
+++ /devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/pages/common/Page.java	(revision 3745)
@@ -1,4 +1,5 @@
 package br.gov.serpro.expresso.cte.pages.common;
 
+import java.util.List;
 import java.util.concurrent.TimeUnit;
 
@@ -7,11 +8,6 @@
 import org.openqa.selenium.RenderedWebElement;
 import org.openqa.selenium.WebDriver;
+import org.openqa.selenium.WebElement;
 
-/**
- * @author L.F.Estivalet (Serpro)
- * 
- *         Created on Jan 4, 2011 at 3:50:44 PM
- * 
- */
 /**
  * @author L.F.Estivalet (Serpro)
@@ -40,4 +36,8 @@
 	public void clickElement(String id) {
 		driver.findElement(By.id(id)).click();
+	}
+
+	public void clickElement(By by) {
+		driver.findElement(by).click();
 	}
 
@@ -141,3 +141,16 @@
 	}
 
+	/**
+	 * @param element
+	 * @param value
+	 */
+	public void setComboValue(WebElement element, String value) {
+		List<WebElement> options = element.findElements(By.tagName("option"));
+		for (WebElement option : options) {
+			if (option.getText().equals(value)) {
+				option.setSelected();
+				break;
+			}
+		}
+	}
 }
Index: /devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/pages/common/PreferencesPage.java
===================================================================
--- /devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/pages/common/PreferencesPage.java	(revision 3745)
+++ /devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/pages/common/PreferencesPage.java	(revision 3745)
@@ -0,0 +1,18 @@
+package br.gov.serpro.expresso.cte.pages.common;
+
+import org.openqa.selenium.WebDriver;
+
+/**
+ * @author L.F.Estivalet (Serpro)
+ * 
+ *         Created on Feb 3, 2011 at 11:10:29 AM
+ * 
+ */
+public class PreferencesPage extends Page {
+
+	public PreferencesPage(WebDriver driver) {
+		super(driver);
+		// TODO Auto-generated constructor stub
+	}
+
+}
Index: /devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/pages/calendar/CalendarTodayViewPage.java
===================================================================
--- /devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/pages/calendar/CalendarTodayViewPage.java	(revision 3745)
+++ /devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/pages/calendar/CalendarTodayViewPage.java	(revision 3745)
@@ -0,0 +1,20 @@
+package br.gov.serpro.expresso.cte.pages.calendar;
+
+import org.openqa.selenium.WebDriver;
+
+import br.gov.serpro.expresso.cte.pages.common.Page;
+
+/**
+ * @author L.F.Estivalet (Serpro)
+ * 
+ *         Created on Feb 9, 2011 at 9:58:16 AM
+ * 
+ */
+public class CalendarTodayViewPage extends Page {
+
+	public CalendarTodayViewPage(WebDriver driver) {
+		super(driver);
+		// TODO Auto-generated constructor stub
+	}
+
+}
Index: /devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/pages/calendar/CalendarPage.java
===================================================================
--- /devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/pages/calendar/CalendarPage.java	(revision 3745)
+++ /devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/pages/calendar/CalendarPage.java	(revision 3745)
@@ -0,0 +1,39 @@
+package br.gov.serpro.expresso.cte.pages.calendar;
+
+import org.openqa.selenium.By;
+import org.openqa.selenium.WebDriver;
+import org.openqa.selenium.WebElement;
+import org.openqa.selenium.support.FindBy;
+
+import br.gov.serpro.expresso.cte.common.Constants;
+import br.gov.serpro.expresso.cte.pages.common.Page;
+
+/**
+ * @author L.F.Estivalet (Serpro)
+ * 
+ *         Created on Feb 8, 2011 at 9:13:50 AM
+ * 
+ */
+public class CalendarPage extends Page {
+
+	/** Como para selecionar mes. */
+	@FindBy(name = "date")
+	private WebElement date;
+
+	public CalendarPage(WebDriver driver) {
+		super(driver);
+		// TODO Auto-generated constructor stub
+	}
+
+	public void openTodayView() {
+		super.clickElement(By
+				.xpath("//table[@id='calendar_head_table']/tbody/tr/td[2]/a/img"));
+	}
+
+	public void openAppointmentPage(String date) {
+		System.out.println(Constants.URL
+				+ "/index.php?menuaction=calendar.uicalendar.add&date=" + date);
+		driver.get(Constants.URL
+				+ "/index.php?menuaction=calendar.uicalendar.add&date=" + date);
+	}
+}
Index: /devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/pages/calendar/AppointmentPage.java
===================================================================
--- /devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/pages/calendar/AppointmentPage.java	(revision 3745)
+++ /devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/pages/calendar/AppointmentPage.java	(revision 3745)
@@ -0,0 +1,252 @@
+package br.gov.serpro.expresso.cte.pages.calendar;
+
+import org.openqa.selenium.WebDriver;
+import org.openqa.selenium.WebElement;
+import org.openqa.selenium.support.FindBy;
+
+import br.gov.serpro.expresso.cte.pages.common.Page;
+
+/**
+ * @author L.F.Estivalet (Serpro)
+ * 
+ *         Created on Feb 8, 2011 at 9:19:20 AM
+ * 
+ */
+public class AppointmentPage extends Page {
+
+	/** Tipo do evento. */
+	@FindBy(id = "cal[type]")
+	private WebElement type;
+
+	/** Titulo do evento. */
+	@FindBy(name = "cal[title]")
+	private WebElement title;
+
+	/** DescriÃ§Ã£o completa do evento. */
+	@FindBy(name = "cal[description]")
+	private WebElement description;
+
+	/** Categorias do evento. */
+	@FindBy(name = "categories[]")
+	private WebElement categories;
+
+	/** LocalizaÃ§Ã£o do evento. */
+	@FindBy(name = "cal[location]")
+	private WebElement location;
+
+	/** Data inicial do evento. */
+	@FindBy(name = "start[str]")
+	private WebElement startDate;
+
+	/** Hora inicial do evento. */
+	@FindBy(id = "start_hour")
+	private WebElement startHour;
+
+	/** Minuto inicial do evento; */
+	@FindBy(id = "start_minute")
+	private WebElement startMinute;
+
+	/** Data final do evento. */
+	@FindBy(name = "end[str]")
+	private WebElement endDate;
+
+	/** Hora final do evento. */
+	@FindBy(id = "end_hour")
+	private WebElement endHour;
+
+	/** Minuto final do evento; */
+	@FindBy(id = "end_minute")
+	private WebElement endMinute;
+
+	/** Prioridade do evento. */
+	@FindBy(name = "cal[priority]")
+	private WebElement priority;
+
+	/** Alarme dia. */
+	@FindBy(name = "cal[alarmdays]")
+	private WebElement alarmDays;
+
+	/** Alarme hora. */
+	@FindBy(name = "cal[alarmhours]")
+	private WebElement alarmHours;
+
+	/** Alarme minuto. */
+	@FindBy(name = "cal[alarmminutes]")
+	private WebElement alarmMinutes;
+
+	/** Tipo recursao. */
+	@FindBy(name = "cal[recur_type]")
+	private WebElement recurType;
+
+	@FindBy(name = "cal[rpt_use_end]")
+	private WebElement rptUseEnd;
+
+	@FindBy(name = "recur_enddate[str]")
+	private WebElement recurEndDate;
+
+	/** Domingo, Segunda, TerÃ§a, .... */
+	@FindBy(name = "cal[rpt_day][]")
+	private WebElement rptDay;
+
+	@FindBy(name = "cal[recur_interval]")
+	private WebElement recurInterval;
+
+	/** Observacao. */
+	@FindBy(name = "cal[#ObservaÃ§Ã£o]")
+	private WebElement notes;
+
+	/** Salvar. */
+	@FindBy(id = "submit_button")
+	private WebElement save;
+
+	public AppointmentPage(WebDriver driver) {
+		super(driver);
+		// TODO Auto-generated constructor stub
+	}
+
+	/**
+	 * @param type
+	 *            the type to set
+	 */
+	public void setType(String type) {
+		super.setComboValue(this.type, type);
+	}
+
+	/**
+	 * @param title
+	 *            the title to set
+	 */
+	public void setTitle(String title) {
+		this.title.sendKeys(title);
+	}
+
+	/**
+	 * @param description
+	 *            the description to set
+	 */
+	public void setDescription(String description) {
+		this.description.sendKeys(description);
+	}
+
+	/**
+	 * @param categories
+	 *            the categories to set
+	 */
+	public void setCategories(String categories) {
+		this.categories.sendKeys(categories);
+	}
+
+	/**
+	 * @param location
+	 *            the location to set
+	 */
+	public void setLocation(String location) {
+		this.location.sendKeys(location);
+	}
+
+	/**
+	 * @param startDate
+	 *            the start to set
+	 */
+	public void setStartDate(String startDate) {
+		this.startDate.clear();
+		this.startDate.sendKeys(startDate);
+	}
+
+	/**
+	 * @param startHour
+	 *            the startHour to set
+	 */
+	public void setStartHour(String startHour) {
+		this.startHour.clear();
+		this.startHour.sendKeys(startHour);
+	}
+
+	/**
+	 * @param startMinute
+	 *            the startMinute to set
+	 */
+	public void setStartMinute(String startMinute) {
+		this.startMinute.clear();
+		this.startMinute.sendKeys(startMinute);
+	}
+
+	/**
+	 * @param endDate
+	 *            the end to set
+	 */
+	public void setEndDate(String endDate) {
+		this.endDate.clear();
+		this.endDate.sendKeys(endDate);
+	}
+
+	/**
+	 * @param endHour
+	 *            the endHour to set
+	 */
+	public void setEndHour(String endHour) {
+		this.endHour.clear();
+		this.endHour.sendKeys(endHour);
+	}
+
+	/**
+	 * @param endMinute
+	 *            the endMinute to set
+	 */
+	public void setEndMinute(String endMinute) {
+		this.endMinute.clear();
+		this.endMinute.sendKeys(endMinute);
+	}
+
+	/**
+	 * @param priority
+	 *            the priority to set
+	 */
+	public void setPriority(String priority) {
+		super.setComboValue(this.priority, priority);
+	}
+
+	/**
+	 * @param notes
+	 *            the notes to set
+	 */
+	public void setNotes(String notes) {
+		this.notes.sendKeys(notes);
+	}
+
+	/**
+	 * @param alarmDays
+	 *            the alarmDays to set
+	 */
+	public void setAlarmDays(String alarmDays) {
+		super.setComboValue(this.alarmDays, alarmDays);
+	}
+
+	/**
+	 * @param alarmHours
+	 *            the alarmHours to set
+	 */
+	public void setAlarmHours(String alarmHours) {
+		super.setComboValue(this.alarmHours, alarmHours);
+	}
+
+	/**
+	 * @param alarmMinutes
+	 *            the alarmMinutes to set
+	 */
+	public void setAlarmMinutes(String alarmMinutes) {
+		super.setComboValue(this.alarmMinutes, alarmMinutes);
+	}
+
+	/**
+	 * @param recurType
+	 *            the recurType to set
+	 */
+	public void setRecurType(String recurType) {
+		super.setComboValue(this.recurType, recurType);
+	}
+
+	public void saveAppointment() {
+		this.save.click();
+	}
+}
Index: /devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/email/compor/EnviarEmailAnexoTestCase.java
===================================================================
--- /devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/email/compor/EnviarEmailAnexoTestCase.java	(revision 3663)
+++ /devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/email/compor/EnviarEmailAnexoTestCase.java	(revision 3745)
@@ -15,9 +15,8 @@
 	@Test
 	public void test() {
-		mp.composeEmail("luiz-fernando.estivalet@cte.serpro.gov.br",
-				"assunto anexo", "texto anexo");
-		mp.addAttachment("/home/luiz/Desktop/arquivo.txt");
+		mp.composeEmail(EMAIL_TESTE_1, EMAIL_ASSUNTO_ANEXO, EMAIL_TEXTO_ANEXO);
+		mp.addAttachment(ANEXO_1);
 		mp.sendMail();
-		mp.assertMessage("Sua mensagem foi enviada e salva.");
+		mp.assertMessage(MSG_EMAIL_ENVIADO);
 	}
 
Index: /devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/email/compor/EnviarEmailTestCase.java
===================================================================
--- /devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/email/compor/EnviarEmailTestCase.java	(revision 3708)
+++ /devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/email/compor/EnviarEmailTestCase.java	(revision 3745)
@@ -15,4 +15,5 @@
 	@Test
 	public void test() {
+		System.out.println("test enviar email");
 		mp.composeEmail(EMAIL_TESTE_1, EMAIL_ASSUNTO, EMAIL_TEXTO);
 		mp.sendMail();
Index: /devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/email/compor/EnviarEmailRascunhoTestCase.java
===================================================================
--- /devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/email/compor/EnviarEmailRascunhoTestCase.java	(revision 3745)
+++ /devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/email/compor/EnviarEmailRascunhoTestCase.java	(revision 3745)
@@ -0,0 +1,24 @@
+package br.gov.serpro.expresso.cte.email.compor;
+
+import org.testng.annotations.Test;
+
+import br.gov.serpro.expresso.cte.common.BaseEmailTestCase;
+
+/**
+ * @author L.F.Estivalet (Serpro)
+ * 
+ *         Created on Feb 3, 2011 at 9:23:16 AM
+ * 
+ */
+public class EnviarEmailRascunhoTestCase extends BaseEmailTestCase {
+
+	@Test
+	public void test() {
+		mp.openFolder("lINBOX/Draftstree_folders");
+		mp.waitForElementByXpath("//div[@id='divScrollMain_0']/table[@id='table_box']/tbody[@id='tbody_box']/tr[1]/td[1]/input[1]");
+		String id = mp.readEmail(EMAIL_ASSUNTO_SALVAR);
+		mp.editEmail();
+		mp.sendMail(id);
+		mp.assertMessage(MSG_EMAIL_ENVIADO);
+	}
+}
Index: /devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/email/compor/SalvarEmailTestCase.java
===================================================================
--- /devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/email/compor/SalvarEmailTestCase.java	(revision 3663)
+++ /devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/email/compor/SalvarEmailTestCase.java	(revision 3745)
@@ -15,8 +15,7 @@
 	@Test
 	public void test() {
-		mp.composeEmail("luiz-fernando.estivalet@cte.serpro.gov.br",
-				"assunto salvar", "texto salvar");
+		mp.composeEmail(EMAIL_TESTE_1, EMAIL_ASSUNTO_SALVAR, EMAIL_TEXTO_SALVAR);
 		mp.saveEmail();
-		mp.assertMessage("Sua mensagem foi salva como rascunho na pasta Rascunhos.");
+		mp.assertMessage(MSG_EMAIL_RASCUNHO);
 	}
 
Index: /devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/email/responder/EncaminharEmailAnexoTestCase.java
===================================================================
--- /devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/email/responder/EncaminharEmailAnexoTestCase.java	(revision 3745)
+++ /devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/email/responder/EncaminharEmailAnexoTestCase.java	(revision 3745)
@@ -0,0 +1,20 @@
+package br.gov.serpro.expresso.cte.email.responder;
+
+import org.testng.annotations.Test;
+
+import br.gov.serpro.expresso.cte.common.BaseEmailTestCase;
+
+/**
+ * @author L.F.Estivalet (Serpro)
+ * 
+ *         Created on Jan 26, 2011 at 9:15:31 AM
+ * 
+ */
+public class EncaminharEmailAnexoTestCase extends BaseEmailTestCase {
+
+	@Test
+	public void test() {
+		String id = mp.readEmail(EMAIL_ASSUNTO_ANEXO);
+		mp.forwardEmail(id, EMAIL_TESTE_1);
+	}
+}
Index: /devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/email/responder/ResponderEmailTestCase.java
===================================================================
--- /devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/email/responder/ResponderEmailTestCase.java	(revision 3745)
+++ /devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/email/responder/ResponderEmailTestCase.java	(revision 3745)
@@ -0,0 +1,21 @@
+package br.gov.serpro.expresso.cte.email.responder;
+
+import org.testng.annotations.Test;
+
+import br.gov.serpro.expresso.cte.common.BaseEmailTestCase;
+
+/**
+ * @author L.F.Estivalet (Serpro)
+ * 
+ *         Created on Jan 26, 2011 at 9:22:08 AM
+ * 
+ */
+public class ResponderEmailTestCase extends BaseEmailTestCase {
+
+	@Test
+	public void test() {
+		String id = mp.readEmail(EMAIL_ASSUNTO);
+		mp.replyEmail(id);
+	}
+
+}
Index: /devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/email/responder/ResponderTodosEmailSemHistoricoTestCase.java
===================================================================
--- /devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/email/responder/ResponderTodosEmailSemHistoricoTestCase.java	(revision 3745)
+++ /devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/email/responder/ResponderTodosEmailSemHistoricoTestCase.java	(revision 3745)
@@ -0,0 +1,21 @@
+package br.gov.serpro.expresso.cte.email.responder;
+
+import org.testng.annotations.Test;
+
+import br.gov.serpro.expresso.cte.common.BaseEmailTestCase;
+
+/**
+ * @author L.F.Estivalet (Serpro)
+ * 
+ *         Created on Jan 26, 2011 at 9:27:24 AM
+ * 
+ */
+public class ResponderTodosEmailSemHistoricoTestCase extends BaseEmailTestCase {
+
+	@Test
+	public void test() {
+		String id = mp.readEmail(EMAIL_ASSUNTO);
+		mp.replyAllEmailWithoutHistory(id);
+	}
+
+}
Index: /devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/email/responder/ResponderEmailSemHistoricoTestCase.java
===================================================================
--- /devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/email/responder/ResponderEmailSemHistoricoTestCase.java	(revision 3745)
+++ /devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/email/responder/ResponderEmailSemHistoricoTestCase.java	(revision 3745)
@@ -0,0 +1,21 @@
+package br.gov.serpro.expresso.cte.email.responder;
+
+import org.testng.annotations.Test;
+
+import br.gov.serpro.expresso.cte.common.BaseEmailTestCase;
+
+/**
+ * @author L.F.Estivalet (Serpro)
+ * 
+ *         Created on Jan 26, 2011 at 9:27:24 AM
+ * 
+ */
+public class ResponderEmailSemHistoricoTestCase extends BaseEmailTestCase {
+
+	@Test
+	public void test() {
+		String id = mp.readEmail(EMAIL_ASSUNTO);
+		mp.replyEmailWithoutHistory(id);
+	}
+
+}
Index: /devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/email/responder/ResponderTodosEmailTestCase.java
===================================================================
--- /devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/email/responder/ResponderTodosEmailTestCase.java	(revision 3745)
+++ /devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/email/responder/ResponderTodosEmailTestCase.java	(revision 3745)
@@ -0,0 +1,21 @@
+package br.gov.serpro.expresso.cte.email.responder;
+
+import org.testng.annotations.Test;
+
+import br.gov.serpro.expresso.cte.common.BaseEmailTestCase;
+
+/**
+ * @author L.F.Estivalet (Serpro)
+ * 
+ *         Created on Jan 26, 2011 at 9:40:55 AM
+ * 
+ */
+public class ResponderTodosEmailTestCase extends BaseEmailTestCase {
+
+	@Test
+	public void test() {
+		String id = mp.readEmail(EMAIL_ASSUNTO);
+		mp.replyAllEmail(id);
+	}
+
+}
Index: /devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/email/ExpressoMailPreferencesTestCase.java
===================================================================
--- /devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/email/ExpressoMailPreferencesTestCase.java	(revision 3745)
+++ /devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/email/ExpressoMailPreferencesTestCase.java	(revision 3745)
@@ -0,0 +1,55 @@
+package br.gov.serpro.expresso.cte.email;
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
+import org.apache.commons.lang.StringUtils;
+import org.testng.annotations.AfterClass;
+import org.testng.annotations.Test;
+
+import br.gov.serpro.expresso.cte.common.BaseEmailTestCase;
+import br.gov.serpro.expresso.cte.common.Config;
+import br.gov.serpro.expresso.cte.pages.email.ExpressoMailPreferencesPage;
+
+/**
+ * @author L.F.Estivalet (Serpro)
+ * 
+ *         Created on Feb 3, 2011 at 11:07:04 AM
+ * 
+ */
+public class ExpressoMailPreferencesTestCase extends BaseEmailTestCase {
+	ExpressoMailPreferencesPage prefs;
+
+	@Test
+	public void gotoEmailPreferencesPage() {
+		openPreferencesPage();
+		prefs = openEmailPreferencesPage();
+	}
+
+	@Test
+	public void test() throws IllegalArgumentException, IllegalAccessException,
+			InvocationTargetException {
+
+		Method[] methods = ExpressoMailPreferencesPage.class.getMethods();
+		for (Method method : methods) {
+			if (method.getName().startsWith("set")
+					&& !method.getName().equals("setComboValue")
+					&& !method.getName().equals("setSavePreferences")) {
+				String name = StringUtils.uncapitalize(method.getName()
+						.substring(3));
+				System.out.println(name);
+				String[] values = Config.getInstance().getEmailPreference(name)
+						.split(",");
+				System.out.println(name + " " + values[0]);
+				method.invoke(prefs, values[0]);
+			}
+		}
+
+	}
+
+	@AfterClass
+	public void savePreferences() {
+		prefs.savePreferences();
+	}
+
+}
Index: /devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/common/BaseCalendarTestCase.java
===================================================================
--- /devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/common/BaseCalendarTestCase.java	(revision 3745)
+++ /devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/common/BaseCalendarTestCase.java	(revision 3745)
@@ -0,0 +1,44 @@
+package br.gov.serpro.expresso.cte.common;
+
+import org.openqa.selenium.support.PageFactory;
+import org.testng.annotations.Test;
+
+import br.gov.serpro.expresso.cte.pages.calendar.AppointmentPage;
+import br.gov.serpro.expresso.cte.pages.calendar.CalendarPage;
+import br.gov.serpro.expresso.cte.pages.calendar.CalendarTodayViewPage;
+import br.gov.serpro.expresso.cte.pages.common.HomePage;
+
+/**
+ * @author L.F.Estivalet (Serpro)
+ * 
+ *         Created on Feb 8, 2011 at 9:16:54 AM
+ * 
+ */
+public class BaseCalendarTestCase extends BaseTestCase {
+
+	protected CalendarPage cp;
+
+	/**
+	 * Antes dos demais testes do modulo do calendario serem iniciados, este
+	 * teste eh executado. Ele faz o login no Expresso e vai direto para a
+	 * pagina incial. Depois clica-se no modulo Calendario para entao
+	 * inicializar componentes da pagina.
+	 */
+	@Test
+	public void init() {
+		super.login();
+		HomePage hp = PageFactory.initElements(driver, HomePage.class);
+		hp.enterCalendar();
+		cp = PageFactory.initElements(driver, CalendarPage.class);
+	}
+
+	public CalendarTodayViewPage openTodayView() {
+		cp.openTodayView();
+		return PageFactory.initElements(driver, CalendarTodayViewPage.class);
+	}
+
+	public AppointmentPage newAppointment(String date) {
+		cp.openAppointmentPage(date);
+		return PageFactory.initElements(driver, AppointmentPage.class);
+	}
+}
Index: /devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/common/config.properties
===================================================================
--- /devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/common/config.properties	(revision 3663)
+++ /devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/common/config.properties	(revision 3745)
@@ -4,5 +4,7 @@
 #url=https://homologaexpresso.serpro.gov.br
 #user=88758559000
-#passwd=q1w2e3r4
+#passwd=t5y6u7i8
+url.preferences=https://cte.serpro.gov.br/preferences
+url.preferences.email=https://cte.serpro.gov.br/preferences/preferences.php?appname=expressoMail1_2
 waitPage=30000
 # timeout em segundos
Index: /devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/common/email.preferences.properties
===================================================================
--- /devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/common/email.preferences.properties	(revision 3745)
+++ /devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/common/email.preferences.properties	(revision 3745)
@@ -0,0 +1,35 @@
+userCNInSharedFolders=usar o padrão,Não,Sim
+showHeadMsgFull=usar o padrão,Não,Sim
+maxEmailPerPage=usar o padrão,25,50,75,100
+previewMsgSubject=usar o padrão,Não,Sim
+previewMsgTip=usar o padrão,Não,Sim
+extendedInfo=usar o padrão,Não,Sim
+saveDeletedMsg=usar o padrão,Não,Sim
+deleteTrashMessagesAfterNDays=usar o padrão,1 Dia,2 Dias,3 Dias,4 Dias,5 Dias
+useLocalMessages=usar o padrão,Não,Sim
+keepArchivedMessages=usar o padrão,Copiar,Mover
+autoCreateLocal=usar o padrão,Não,Sim
+deleteAndShowPreviousMessage=usar o padrão,Não,Sim
+alertNewMsg=usar o padrão,Não,Sim
+mainScreenShowMail=usar o padrão,Não,Sim
+removeAttachmentsFunction=usar o padrão,Não,Sim
+useImportantFlag=usar o padrão,Não,Sim
+useSpellChecker=usar o padrão,Não,Sim
+saveInFolder=usar o padrão,Selecionar no envio da mensagem,Caixa de Entrada,Enviados,Lixeira
+fromToSent=usar o padrão,Não,Sim
+hideFolders=usar o padrão,Não,Sim
+searchResultNumber=usar o padrão,50,100,150,200,300,400,Sem limite
+searchCharactersNumber=usar o padrão,Sem limite,2,3,4,5
+lineHeight=usar o padrão,Sem limite,2,3,4,5
+maxMsgSize=usar o padrão,Não,Sim
+useDynamicContacts=usar o padrão,Não,Sim
+useShortcuts=usar o padrão,Não,Sim
+autoSaveDraft=usar o padrão,Não,Sim
+timezone=usar o padrão
+quickSearchDefault=usar o padrão,Contatos,E-mail
+imageSize=usar o padrão,Sem limite,640,768,800,1024,1080
+useSignatureDigitalCripto=usar o padrão,Não,Sim
+useSignatureDigital=usar o padrão,Não,Sim
+useSignatureCripto=usar o padrão,Não,Sim
+useSignature=usar o padrão,Não,Sim
+typeSignature=usar o padrão,Texto Simples,Texto Rico
Index: /devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/common/Config.java
===================================================================
--- /devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/common/Config.java	(revision 3663)
+++ /devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/common/Config.java	(revision 3745)
@@ -18,4 +18,5 @@
 	private Properties campos;
 	private Properties valores;
+	private Properties emailPreferences;
 
 	private Config() {
@@ -29,4 +30,6 @@
 			this.valores = this
 					.load("br/gov/serpro/expresso/cte/common/valores.properties");
+			this.emailPreferences = this
+					.load("br/gov/serpro/expresso/cte/common/email.preferences.properties");
 		} catch (Exception e) {
 			e.printStackTrace();
@@ -59,4 +62,8 @@
 	}
 
+	public String getEmailPreference(String key) {
+		return this.emailPreferences.getProperty(key);
+	}
+
 	private Properties load(String propsName) throws Exception {
 		Properties props = new Properties();
Index: /devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/common/BaseTestCase.java
===================================================================
--- /devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/common/BaseTestCase.java	(revision 3708)
+++ /devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/common/BaseTestCase.java	(revision 3745)
@@ -7,5 +7,6 @@
 import org.testng.annotations.BeforeClass;
 
-import br.gov.serpro.expresso.cte.pages.email.LoginPage;
+import br.gov.serpro.expresso.cte.pages.common.LoginPage;
+import br.gov.serpro.expresso.cte.pages.common.PreferencesPage;
 
 /**
@@ -27,4 +28,9 @@
 		LoginPage page = PageFactory.initElements(driver, LoginPage.class);
 		page.login(USER, PASS);
+	}
+
+	public PreferencesPage openPreferencesPage() {
+		driver.get(URL_PREFERENCES);
+		return PageFactory.initElements(driver, PreferencesPage.class);
 	}
 
Index: /devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/common/Constants.java
===================================================================
--- /devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/common/Constants.java	(revision 3708)
+++ /devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/common/Constants.java	(revision 3745)
@@ -3,4 +3,8 @@
 public interface Constants {
 	public static final String URL = Config.getInstance().getConfig("url");
+	public static final String URL_PREFERENCES = Config.getInstance()
+			.getConfig("url.preferences");
+	public static final String URL_PREFERENCES_EMAIL = Config.getInstance()
+			.getConfig("url.preferences.email");
 	public static final String USER = Config.getInstance().getConfig("user");
 	public static final String PASS = Config.getInstance().getConfig("passwd");
@@ -14,25 +18,38 @@
 	public static final String EMAIL_ASSUNTO = Config.getInstance().getValor(
 			"assunto");
+	public static final String EMAIL_ASSUNTO_SALVAR = Config.getInstance()
+			.getValor("assunto.salvar");
 	public static final String EMAIL_ASSUNTO_COPIA_OCULTA = Config
 			.getInstance().getValor("assunto.somente.copia.oculta");
 	public static final String EMAIL_ASSUNTO_COPIA = Config.getInstance()
 			.getValor("assunto.somente.copia");
+	public static final String EMAIL_ASSUNTO_ANEXO = Config.getInstance()
+			.getValor("assunto.anexo");
 	public static final String EMAIL_ASSUNTO_MULTIPLOS_ANEXOS = Config
 			.getInstance().getValor("assunto.multiplos.anexos");
 	public static final String EMAIL_ASSUNTO_MULTIPLOS_DESTINATARIOS = Config
 			.getInstance().getValor("assunto.multiplos.destinatarios");
+
 	public static final String EMAIL_TEXTO = Config.getInstance().getValor(
 			"texto.email");
+	public static final String EMAIL_TEXTO_SALVAR = Config.getInstance()
+			.getValor("texto.email.salvo");
 	public static final String EMAIL_TEXTO_COPIA_OCULTA = Config.getInstance()
 			.getValor("texto.email.copia.oculta");
 	public static final String EMAIL_TEXTO_COPIA = Config.getInstance()
 			.getValor("texto.email.copia");
+	public static final String EMAIL_TEXTO_ANEXO = Config.getInstance()
+			.getValor("texto.email.anexo");
 	public static final String EMAIL_TEXTO_MULTIPLOS_ANEXOS = Config
 			.getInstance().getValor("texto.email.multiplos.anexos");
 	public static final String EMAIL_TEXTO_MULTIPLOS_DESTINATARIOS = Config
 			.getInstance().getValor("texto.email.multiplos.destinatarios");
+	public static final String ANEXO_1 = Config.getInstance().getValor(
+			"anexo.1");
 
 	public static final String MSG_EMAIL_ENVIADO = Config.getInstance()
 			.getMensagem("email.enviado");
+	public static final String MSG_EMAIL_RASCUNHO = Config.getInstance()
+			.getMensagem("salva.rascunho");
 	public static final String MSG_EMAIL_APAGAR_MENSAGEM = Config.getInstance()
 			.getMensagem("apagar.uma.mensagem");
Index: /devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/common/BaseEmailTestCase.java
===================================================================
--- /devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/common/BaseEmailTestCase.java	(revision 3663)
+++ /devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/common/BaseEmailTestCase.java	(revision 3745)
@@ -4,5 +4,6 @@
 import org.testng.annotations.Test;
 
-import br.gov.serpro.expresso.cte.pages.email.HomePage;
+import br.gov.serpro.expresso.cte.pages.common.HomePage;
+import br.gov.serpro.expresso.cte.pages.email.ExpressoMailPreferencesPage;
 import br.gov.serpro.expresso.cte.pages.email.MailPage;
 
@@ -26,4 +27,5 @@
 	@Test
 	public void init() {
+		System.out.println("init base email test case");
 		super.login();
 		HomePage hp = PageFactory.initElements(driver, HomePage.class);
@@ -31,3 +33,10 @@
 		mp = PageFactory.initElements(driver, MailPage.class);
 	}
+
+	public ExpressoMailPreferencesPage openEmailPreferencesPage() {
+		driver.get(URL_PREFERENCES_EMAIL);
+		return PageFactory.initElements(driver,
+				ExpressoMailPreferencesPage.class);
+	}
+
 }
Index: /devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/calendar/AdicionarCompromisso.java
===================================================================
--- /devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/calendar/AdicionarCompromisso.java	(revision 3745)
+++ /devel/testlink/automation2.0/src/test/java/br/gov/serpro/expresso/cte/calendar/AdicionarCompromisso.java	(revision 3745)
@@ -0,0 +1,43 @@
+package br.gov.serpro.expresso.cte.calendar;
+
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+
+import org.testng.annotations.Parameters;
+import org.testng.annotations.Test;
+
+import br.gov.serpro.expresso.cte.common.BaseCalendarTestCase;
+import br.gov.serpro.expresso.cte.pages.calendar.AppointmentPage;
+
+/**
+ * @author L.F.Estivalet (Serpro)
+ * 
+ *         Created on Feb 8, 2011 at 9:36:08 AM
+ * 
+ */
+public class AdicionarCompromisso extends BaseCalendarTestCase {
+
+	@Parameters({ "titulo", "horaInicial", "minutoInicial", "horaFinal",
+			"minutoFinal" })
+	@Test(dependsOnMethods = { "init" })
+	public void test(String titulo, String horaInicial, String minutoInicial,
+			String horaFinal, String minutoFinal) {
+
+		// Pega data corrente.
+		Calendar cal = Calendar.getInstance();
+		SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
+		SimpleDateFormat sdf2 = new SimpleDateFormat("dd/MM/yyyy");
+
+		// Adiciona um compromisso para data atual.
+		AppointmentPage ap = super.newAppointment(sdf.format(cal.getTime()));
+		ap.setTitle(titulo);
+		ap.setStartDate(sdf2.format(cal.getTime()));
+		ap.setStartHour(horaInicial);
+		ap.setStartMinute(minutoInicial);
+		ap.setEndDate(sdf2.format(cal.getTime()));
+		ap.setEndHour(horaFinal);
+		ap.setEndMinute(minutoFinal);
+
+		ap.saveAppointment();
+	}
+}
Index: /devel/testlink/automation2.0/src/test/java/testng.xml
===================================================================
--- /devel/testlink/automation2.0/src/test/java/testng.xml	(revision 3663)
+++ /devel/testlink/automation2.0/src/test/java/testng.xml	(revision 3745)
@@ -2,4 +2,5 @@
   
 <suite name="Suite" >
+<!-- 
   <test name="Test" preserve-order="true">
     <classes>
@@ -9,3 +10,17 @@
     </classes>
   </test>
+ -->
+
+  <parameter name="titulo"  value="[Selenium] Compromisso hoje!"/>
+  <parameter name="horaInicial"  value="16"/>
+  <parameter name="minutoInicial"  value="00"/>
+  <parameter name="horaFinal"  value="17"/>
+  <parameter name="minutoFinal"  value="30"/>
+  <test name="Agendamento data corrente">
+    <classes>
+       <class name="br.gov.serpro.expresso.cte.calendar.AdicionarCompromisso" />
+    </classes>
+  </test>
+
+  
 </suite>
