Revision 4895,
764 bytes
checked in by luiz-fernando, 13 years ago
(diff) |
Ticket #1771 - Adicionado testes automatizados para modulo da agenda
|
Line | |
---|
1 | package org.expressolivre.cte.pages.calendar; |
---|
2 | |
---|
3 | import org.openqa.selenium.WebDriver; |
---|
4 | |
---|
5 | /** |
---|
6 | * @author L.F.Estivalet (Serpro) |
---|
7 | * |
---|
8 | * Created on Feb 9, 2011 at 9:58:16 AM |
---|
9 | * |
---|
10 | */ |
---|
11 | public class CalendarTodayViewPage extends CalendarPage { |
---|
12 | |
---|
13 | public CalendarTodayViewPage(WebDriver driver) { |
---|
14 | super(driver); |
---|
15 | // TODO Auto-generated constructor stub |
---|
16 | } |
---|
17 | |
---|
18 | /** |
---|
19 | * Procura o "id" do compromisso baseado no titulo do mesmo. |
---|
20 | * |
---|
21 | * @param title |
---|
22 | * Titulo do compromisso. |
---|
23 | * @return "id" do compromisso. |
---|
24 | */ |
---|
25 | public String getAppointmentId(String title) { |
---|
26 | String source = driver.getPageSource(); |
---|
27 | int i = source.indexOf("\"title\":\"" + title); |
---|
28 | int j = source.indexOf("\"id\":", i); |
---|
29 | return source.substring(j + 5, source.indexOf(",", j)); |
---|
30 | } |
---|
31 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.