Changeset 4895 for devel/testlink/automation2.0/src/test/java/org/expressolivre/cte/pages/calendar/CalendarPage.java
- Timestamp:
- 08/03/11 10:09:33 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/testlink/automation2.0/src/test/java/org/expressolivre/cte/pages/calendar/CalendarPage.java
r4890 r4895 17 17 public class CalendarPage extends Page { 18 18 19 /** Como para selecionar mes. */ 19 /** Combo para selecionar categoria. */ 20 @FindBy(name = "cat_id") 21 private WebElement category; 22 23 @FindBy(name = "filter") 24 private WebElement filter; 25 26 @FindBy(name = "owner") 27 private WebElement owner; 28 29 /** Campo para pesquisar agenda. */ 30 @FindBy(xpath = "/html/body/div[@id='divSubContainer']/table/tbody/tr/td[@id='tdAppbox']/div[@id='divAppbox']/table[@id='tableDivAppbox']/tbody/tr/td/table[@id='calendar_head_table']/tbody/tr/td[4]/nobr/form/div/input[9]") 31 private WebElement searchText; 32 33 /** Botao para acionar a pesquisa na agenda. */ 34 @FindBy(xpath = "//table[@id='calendar_head_table']/tbody/tr/td[4]/nobr/form/div/input[@id='']") 35 private WebElement searchButton; 36 37 /** Combo para selecionar mes. */ 20 38 @FindBy(name = "date") 21 39 private WebElement date; 22 40 41 /** Combo para selecionar ano. */ 42 @FindBy(name = "year") 43 private WebElement year; 44 45 /** 46 * @param driver 47 */ 23 48 public CalendarPage(WebDriver driver) { 24 49 super(driver); … … 26 51 } 27 52 53 /** 54 * Abre a visao diaria da agenda. 55 * 56 * @return Pagina da visao diaria da agenda. 57 */ 28 58 public CalendarTodayViewPage openTodayView() { 29 59 super.clickElement(By … … 32 62 } 33 63 64 /** 65 * Abre tela para adicionar novo compromisso. 66 * 67 * @param date 68 * Data do compromisso. 69 */ 34 70 public void openAppointmentPage(String date) { 35 71 driver.get(Constants.URL … … 37 73 } 38 74 75 /** 76 * @param id 77 * @return 78 */ 39 79 public AppointmentViewPage openAppointmentViewPage(String id) { 40 80 driver.get(Constants.URL … … 43 83 } 44 84 85 /** 86 * @param id 87 * @param date 88 * @return 89 */ 45 90 public AppointmentViewPage openAppointmentViewPage(String id, String date) { 46 91 driver.get(Constants.URL 47 92 + "/index.php?menuaction=calendar.uicalendar.view&cal_id=" + id 48 93 + "&date=" + date); 49 System.out50 .println("/index.php?menuaction=calendar.uicalendar.view&cal_id="51 + id + "&date=" + date);52 94 return PageFactory.initElements(driver, AppointmentViewPage.class); 53 95 } 96 97 /** 98 * Coloca um texto para pesquisar na agenda. 99 * 100 * @param searchText 101 * Texto a ser pesquisado. 102 */ 103 public void setSearchText(String searchText) { 104 this.searchText.clear(); 105 this.searchText.sendKeys(searchText); 106 } 107 108 /** 109 * Dispara a pesquisa na agenda. 110 * 111 * @return Pagina de resultados da pesquisa. 112 */ 113 public AppointmentSearchResultPage searchAppointment() { 114 this.searchButton.click(); 115 return PageFactory.initElements(driver, 116 AppointmentSearchResultPage.class); 117 } 118 54 119 }
Note: See TracChangeset
for help on using the changeset viewer.