Changeset 4902 for devel/testlink/automation2.0/src/test/java/org/expressolivre/cte/pages/calendar/AppointmentViewPage.java
- Timestamp:
- 08/04/11 15:43:12 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/testlink/automation2.0/src/test/java/org/expressolivre/cte/pages/calendar/AppointmentViewPage.java
r4890 r4902 6 6 import org.openqa.selenium.WebElement; 7 7 import org.openqa.selenium.support.FindBy; 8 import org.openqa.selenium.support.PageFactory; 8 9 import org.testng.Assert; 9 10 … … 37 38 private WebElement title; 38 39 39 @FindBy(xpath = "//table[@id='calendar_view_event']/tbody/tr[2]/td[2]")40 private WebElement startTime;41 42 @FindBy(xpath = "//table[@id='calendar_view_event']/tbody/tr[3]/td[2]")43 private WebElement endTime;44 45 @FindBy(xpath = "//table[@id='calendar_view_event']/tbody/tr[4]/td[2]")46 private WebElement priority;47 48 @FindBy(xpath = "//table[@id='calendar_view_event']/tbody/tr[5]/td[2]")49 private WebElement accessType;50 51 @FindBy(xpath = "//table[@id='calendar_view_event']/tbody/tr[6]/td[2]")52 private WebElement participants;53 54 @FindBy(xpath = "//table[@id='calendar_view_event']/tbody/tr[7]/td[2]")55 private WebElement createdBy;56 57 @FindBy(xpath = "//table[@id='calendar_view_event']/tbody/tr[8]/td[2]")58 private WebElement updatedOn;59 60 @FindBy(xpath = "//table[@id='calendar_view_event']/tbody/tr[9]/td[2]")61 private WebElement lastUpdateBy;62 63 @FindBy(xpath = "//table[@id='calendar_view_event']/tbody/tr[10]/td[2]")64 private WebElement attachments;65 66 40 public AppointmentViewPage(WebDriver driver) { 67 41 super(driver); … … 69 43 } 70 44 45 /** 46 * Edita o compromisso previamente selecionado 47 * 48 * @return Retorna pagina de edicao do compromisso. 49 */ 50 public AppointmentEditPage editAppointment() { 51 this.editButton.click(); 52 return PageFactory.initElements(driver, AppointmentEditPage.class); 53 54 } 55 56 /** 57 * Remove um compromisso. 58 */ 71 59 public void removeAppointment() { 72 60 this.removeButton.click(); 73 Alert alert = driver.switchTo().alert(); 74 Assert.assertEquals( 75 alert.getText(), 76 "Tem certeza que deseja remover esta entrada?\nIsto irá remover esta entrada para todos usuários."); 77 alert.accept(); 61 this.removeAlert(); 78 62 } 79 63 64 /** 65 * Remove a serie de compromissos. 66 */ 80 67 public void removeSeriesAppointment() { 81 68 this.removeSeriesButton.click(); 69 this.removeAlert(); 70 } 71 72 /** 73 * Exibe alerta ao tentar remover um compromisso. 74 */ 75 private void removeAlert() { 82 76 Alert alert = driver.switchTo().alert(); 83 77 Assert.assertEquals( … … 94 88 } 95 89 96 /**97 * @return the startTime98 */99 public String getStartTime() {100 return startTime.getText();101 }102 103 /**104 * @return the endTime105 */106 public String getEndTime() {107 return endTime.getText();108 }109 110 /**111 * @return the priority112 */113 public String getPriority() {114 return priority.getText();115 }116 117 /**118 * @return the accessType119 */120 public String getAccessType() {121 return accessType.getText();122 }123 124 /**125 * @return the participants126 */127 public String getParticipants() {128 return participants.getText();129 }130 131 /**132 * @return the createdBy133 */134 public String getCreatedBy() {135 return createdBy.getText();136 }137 138 /**139 * @return the updatedOn140 */141 public String getUpdatedOn() {142 return updatedOn.getText();143 }144 145 /**146 * @return the lastUpdateBy147 */148 public String getLastUpdateBy() {149 return lastUpdateBy.getText();150 }151 152 /**153 * @return the attachments154 */155 public String getAttachments() {156 return attachments.getText();157 }158 159 90 }
Note: See TracChangeset
for help on using the changeset viewer.