Revision 3782,
738 bytes
checked in by luiz-fernando, 13 years ago
(diff) |
Ticket #1402 - Mudança no nome dos pacotes das classes
|
Rev | Line | |
---|
[3782] | 1 | package org.expressolivre.cte.pages.common; |
---|
[3663] | 2 | |
---|
| 3 | import org.openqa.selenium.WebDriver; |
---|
| 4 | import org.openqa.selenium.WebElement; |
---|
| 5 | import org.openqa.selenium.support.FindBy; |
---|
| 6 | |
---|
| 7 | /** |
---|
| 8 | * @author L.F.Estivalet (Serpro) |
---|
| 9 | * |
---|
| 10 | * Created on Dec 13, 2010 at 9:30:42 AM |
---|
| 11 | * |
---|
| 12 | */ |
---|
| 13 | public class LoginPage extends Page { |
---|
| 14 | |
---|
| 15 | @FindBy(name = "user") |
---|
| 16 | private WebElement username; |
---|
| 17 | |
---|
| 18 | @FindBy(name = "passwd") |
---|
| 19 | private WebElement password; |
---|
| 20 | |
---|
| 21 | /** |
---|
| 22 | * @param driver |
---|
| 23 | */ |
---|
| 24 | public LoginPage(WebDriver driver) { |
---|
| 25 | super(driver); |
---|
| 26 | } |
---|
| 27 | |
---|
| 28 | /** |
---|
| 29 | * @param username |
---|
| 30 | * @param password |
---|
| 31 | */ |
---|
| 32 | public void login(String username, String password) { |
---|
[3766] | 33 | this.username.clear(); |
---|
[3663] | 34 | this.username.sendKeys(username); |
---|
| 35 | this.password.sendKeys(password); |
---|
| 36 | this.username.submit(); |
---|
| 37 | |
---|
| 38 | } |
---|
| 39 | |
---|
| 40 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.