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