Annotation Type SeleniumElement
-
@Target(FIELD) @Retention(RUNTIME) public @interface SeleniumElement
Binds the annotated field as a Selenium element. A getter is generated which returns the field's type.
Usage example:@Page class MyPage { @SeleniumElement(id="TestText") TextField testText }
@Page public class MyPage { @SeleniumElement(id="TestText") private TextField testText; public TextField getTestText() { return testText; } }
- Since:
- 2.0.0
- Author:
- Oliver Libutzki <[email protected]>
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description java.lang.String
className
Find elements based on the value of the "class" attribute.java.lang.String
css
Find elements via the driver's underlying W3 Selector engine.java.lang.String
id
Locate elements by the value of the "id" attribute.java.lang.String
linkText
Locate elements by the exact text they display.java.lang.String
name
Locate elements by the value of the "name" attribute.java.lang.String
partialLinkText
Locate elements that contain the given link text.java.lang.String
tagName
Locate elements by their tag name.java.lang.String
xpath
Locate elements via XPath.
-
-
-
-
className
java.lang.String className
Find elements based on the value of the "class" attribute. If an element has many classes then this will match against each of them. For example if the value is "one two onone", then the following "className"s will match: "one" and "two"- Returns:
- the value of the "class" attribute to search for
- Since:
- 2.0.0
- Default:
- ""
-
-
-
css
java.lang.String css
Find elements via the driver's underlying W3 Selector engine. If the browser does not implement the Selector API, a best effort is made to emulate the API. In this case, we strive for at least CSS2 support, but offer no guarantees.- Returns:
- the selector css expression
- Since:
- 2.0.0
- Default:
- ""
-
-