PageRenderTime 23ms CodeModel.GetById 14ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 0ms

/tests/src/test/java/org/sigmah/endtoend/page/LoginPage.java

http://sigma-h.googlecode.com/
Java | 26 lines | 15 code | 7 blank | 4 comment | 0 complexity | 5c7f5df6095bbebb5658cf5cb17522a7 MD5 | raw file
 1/*
 2 * All Sigmah code is released under the GNU General Public License v3
 3 * See COPYRIGHT.txt and LICENSE.txt.
 4 */
 5
 6package org.sigmah.endtoend.page;
 7
 8import org.openqa.selenium.WebElement;
 9import org.openqa.selenium.support.FindBy;
10import org.openqa.selenium.support.How;
11
12public class LoginPage {
13
14    @FindBy(how = How.NAME, using="email")
15    private WebElement emailElement;
16
17    @FindBy(how = How.NAME, using="password")
18    private WebElement passwordElement;
19
20    public void login(String email, String password) {
21        emailElement.sendKeys(email);
22        passwordElement.sendKeys(password);
23        passwordElement.submit();
24    }
25
26}