@Target(value=FIELD) @Inherited @Retention(value=RUNTIME) public @interface Page
@RunWith(SpringJUnit4ClassRunner.class)
public class ContactTest{
@Page(url = "www.my-app.com/contact.html")
private ContactPage contactPage;
...
}
@RunWith(SpringJUnit4ClassRunner.class)
public class ContactTest{
@Page(url = "${appUrl}/contact.html")
private ContactPage contactPage;
...
}
@RunWith(SpringJUnit4ClassRunner.class)
public class ContactTest{
@Page(driverName = "firefoxDriver")
private ContactPage contactPage;
...
}
| Modifier and Type | Optional Element and Description |
|---|---|
String |
driverName
beanName of WebDriver-instance, which should handle the
corresponding object |
String |
url
url which should be called for showing corresponding page.
|
public abstract String url
PageUrl annotation of corresponding
PageObject implementation will be used to get the target url.public abstract String driverName
beanName of WebDriver-instance, which should handle the
corresponding objectCopyright © 2016. All rights reserved.