1 | package org.expressolivre.cte.pages.calendar; |
---|
2 | |
---|
3 | import org.expressolivre.cte.pages.common.Page; |
---|
4 | import org.openqa.selenium.WebDriver; |
---|
5 | import org.openqa.selenium.WebElement; |
---|
6 | import org.openqa.selenium.support.FindBy; |
---|
7 | |
---|
8 | |
---|
9 | /** |
---|
10 | * @author L.F.Estivalet (Serpro) |
---|
11 | * |
---|
12 | * Created on Feb 8, 2011 at 9:19:20 AM |
---|
13 | * |
---|
14 | */ |
---|
15 | public class AppointmentPage extends Page { |
---|
16 | |
---|
17 | /** Tipo do evento. */ |
---|
18 | @FindBy(id = "cal[type]") |
---|
19 | private WebElement type; |
---|
20 | |
---|
21 | /** Titulo do evento. */ |
---|
22 | @FindBy(name = "cal[title]") |
---|
23 | private WebElement title; |
---|
24 | |
---|
25 | /** Descrição completa do evento. */ |
---|
26 | @FindBy(name = "cal[description]") |
---|
27 | private WebElement description; |
---|
28 | |
---|
29 | /** Categorias do evento. */ |
---|
30 | @FindBy(name = "categories[]") |
---|
31 | private WebElement categories; |
---|
32 | |
---|
33 | /** Localização do evento. */ |
---|
34 | @FindBy(name = "cal[location]") |
---|
35 | private WebElement location; |
---|
36 | |
---|
37 | /** Data inicial do evento. */ |
---|
38 | @FindBy(name = "start[str]") |
---|
39 | private WebElement startDate; |
---|
40 | |
---|
41 | /** Hora inicial do evento. */ |
---|
42 | @FindBy(id = "start_hour") |
---|
43 | private WebElement startHour; |
---|
44 | |
---|
45 | /** Minuto inicial do evento; */ |
---|
46 | @FindBy(id = "start_minute") |
---|
47 | private WebElement startMinute; |
---|
48 | |
---|
49 | /** Data final do evento. */ |
---|
50 | @FindBy(name = "end[str]") |
---|
51 | private WebElement endDate; |
---|
52 | |
---|
53 | /** Hora final do evento. */ |
---|
54 | @FindBy(id = "end_hour") |
---|
55 | private WebElement endHour; |
---|
56 | |
---|
57 | /** Minuto final do evento; */ |
---|
58 | @FindBy(id = "end_minute") |
---|
59 | private WebElement endMinute; |
---|
60 | |
---|
61 | /** Prioridade do evento. */ |
---|
62 | @FindBy(name = "cal[priority]") |
---|
63 | private WebElement priority; |
---|
64 | |
---|
65 | /** Alarme dia. */ |
---|
66 | @FindBy(name = "cal[alarmdays]") |
---|
67 | private WebElement alarmDays; |
---|
68 | |
---|
69 | /** Alarme hora. */ |
---|
70 | @FindBy(name = "cal[alarmhours]") |
---|
71 | private WebElement alarmHours; |
---|
72 | |
---|
73 | /** Alarme minuto. */ |
---|
74 | @FindBy(name = "cal[alarmminutes]") |
---|
75 | private WebElement alarmMinutes; |
---|
76 | |
---|
77 | /** Tipo recursao. */ |
---|
78 | @FindBy(name = "cal[recur_type]") |
---|
79 | private WebElement recurType; |
---|
80 | |
---|
81 | @FindBy(name = "cal[rpt_use_end]") |
---|
82 | private WebElement rptUseEnd; |
---|
83 | |
---|
84 | @FindBy(name = "recur_enddate[str]") |
---|
85 | private WebElement recurEndDate; |
---|
86 | |
---|
87 | /** Domingo, Segunda, Terça, .... */ |
---|
88 | @FindBy(name = "cal[rpt_day][]") |
---|
89 | private WebElement rptDay; |
---|
90 | |
---|
91 | @FindBy(name = "cal[recur_interval]") |
---|
92 | private WebElement recurInterval; |
---|
93 | |
---|
94 | /** Observacao. */ |
---|
95 | @FindBy(name = "cal[#Observação]") |
---|
96 | private WebElement notes; |
---|
97 | |
---|
98 | /** Salvar. */ |
---|
99 | @FindBy(id = "submit_button") |
---|
100 | private WebElement save; |
---|
101 | |
---|
102 | public AppointmentPage(WebDriver driver) { |
---|
103 | super(driver); |
---|
104 | // TODO Auto-generated constructor stub |
---|
105 | } |
---|
106 | |
---|
107 | /** |
---|
108 | * @param type |
---|
109 | * the type to set |
---|
110 | */ |
---|
111 | public void setType(String type) { |
---|
112 | super.setComboValue(this.type, type); |
---|
113 | } |
---|
114 | |
---|
115 | /** |
---|
116 | * @param title |
---|
117 | * the title to set |
---|
118 | */ |
---|
119 | public void setTitle(String title) { |
---|
120 | this.title.sendKeys(title); |
---|
121 | } |
---|
122 | |
---|
123 | /** |
---|
124 | * @param description |
---|
125 | * the description to set |
---|
126 | */ |
---|
127 | public void setDescription(String description) { |
---|
128 | this.description.sendKeys(description); |
---|
129 | } |
---|
130 | |
---|
131 | /** |
---|
132 | * @param categories |
---|
133 | * the categories to set |
---|
134 | */ |
---|
135 | public void setCategories(String categories) { |
---|
136 | this.categories.sendKeys(categories); |
---|
137 | } |
---|
138 | |
---|
139 | /** |
---|
140 | * @param location |
---|
141 | * the location to set |
---|
142 | */ |
---|
143 | public void setLocation(String location) { |
---|
144 | this.location.sendKeys(location); |
---|
145 | } |
---|
146 | |
---|
147 | /** |
---|
148 | * @param startDate |
---|
149 | * the start to set |
---|
150 | */ |
---|
151 | public void setStartDate(String startDate) { |
---|
152 | this.startDate.clear(); |
---|
153 | this.startDate.sendKeys(startDate); |
---|
154 | } |
---|
155 | |
---|
156 | /** |
---|
157 | * @param startHour |
---|
158 | * the startHour to set |
---|
159 | */ |
---|
160 | public void setStartHour(String startHour) { |
---|
161 | this.startHour.clear(); |
---|
162 | this.startHour.sendKeys(startHour); |
---|
163 | } |
---|
164 | |
---|
165 | /** |
---|
166 | * @param startMinute |
---|
167 | * the startMinute to set |
---|
168 | */ |
---|
169 | public void setStartMinute(String startMinute) { |
---|
170 | this.startMinute.clear(); |
---|
171 | this.startMinute.sendKeys(startMinute); |
---|
172 | } |
---|
173 | |
---|
174 | /** |
---|
175 | * @param endDate |
---|
176 | * the end to set |
---|
177 | */ |
---|
178 | public void setEndDate(String endDate) { |
---|
179 | this.endDate.clear(); |
---|
180 | this.endDate.sendKeys(endDate); |
---|
181 | } |
---|
182 | |
---|
183 | /** |
---|
184 | * @param endHour |
---|
185 | * the endHour to set |
---|
186 | */ |
---|
187 | public void setEndHour(String endHour) { |
---|
188 | this.endHour.clear(); |
---|
189 | this.endHour.sendKeys(endHour); |
---|
190 | } |
---|
191 | |
---|
192 | /** |
---|
193 | * @param endMinute |
---|
194 | * the endMinute to set |
---|
195 | */ |
---|
196 | public void setEndMinute(String endMinute) { |
---|
197 | this.endMinute.clear(); |
---|
198 | this.endMinute.sendKeys(endMinute); |
---|
199 | } |
---|
200 | |
---|
201 | /** |
---|
202 | * @param priority |
---|
203 | * the priority to set |
---|
204 | */ |
---|
205 | public void setPriority(String priority) { |
---|
206 | super.setComboValue(this.priority, priority); |
---|
207 | } |
---|
208 | |
---|
209 | /** |
---|
210 | * @param notes |
---|
211 | * the notes to set |
---|
212 | */ |
---|
213 | public void setNotes(String notes) { |
---|
214 | this.notes.sendKeys(notes); |
---|
215 | } |
---|
216 | |
---|
217 | /** |
---|
218 | * @param alarmDays |
---|
219 | * the alarmDays to set |
---|
220 | */ |
---|
221 | public void setAlarmDays(String alarmDays) { |
---|
222 | super.setComboValue(this.alarmDays, alarmDays); |
---|
223 | } |
---|
224 | |
---|
225 | /** |
---|
226 | * @param alarmHours |
---|
227 | * the alarmHours to set |
---|
228 | */ |
---|
229 | public void setAlarmHours(String alarmHours) { |
---|
230 | super.setComboValue(this.alarmHours, alarmHours); |
---|
231 | } |
---|
232 | |
---|
233 | /** |
---|
234 | * @param alarmMinutes |
---|
235 | * the alarmMinutes to set |
---|
236 | */ |
---|
237 | public void setAlarmMinutes(String alarmMinutes) { |
---|
238 | super.setComboValue(this.alarmMinutes, alarmMinutes); |
---|
239 | } |
---|
240 | |
---|
241 | /** |
---|
242 | * @param recurType |
---|
243 | * the recurType to set |
---|
244 | */ |
---|
245 | public void setRecurType(String recurType) { |
---|
246 | super.setComboValue(this.recurType, recurType); |
---|
247 | } |
---|
248 | |
---|
249 | public void saveAppointment() { |
---|
250 | this.save.click(); |
---|
251 | } |
---|
252 | } |
---|