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