Annotation Type | Description |
---|---|
InFrame |
Specifies that given element, page or page fragment is located inside the frame given by its name or ID or index.
|
InitialPage |
Specifies that given page object should be opened before the test is executed.
|
Location |
Specifies location of the annotated Page Object, relative to the URL of an Arquillian deployment.
|
Page |
This annotation marks the given object to be instantiated and injected as Page object
public class LoginForm {
@FindBy(css = ".login")
WebElement login;
@FindBy(css = ".password")
WebElement password;
@FindBy(css = ".confirmation")
WebElement confirmation;
public void login(String login, String password) {
...
}
}
@RunWith(Arquillian.class)
public class Test {
@Page
LoginForm loginForm;
@Test
public void test() {
loginForm.login("login", "password");
}
//or as a method parameter
@Test
public void test(@Page LoginForm loginFormParam) {
loginFormParam.login("login", "password");
}
}
|
Copyright © 2016 JBoss by Red Hat. All rights reserved.