The base class to be used for making blocks of elements.
To make a class that will represent a block of elements (e.g. web form) create a descendant of this class, annotate it with {@link ru.yandex.qatools.htmlelements.annotations.Block} and{@link ru.yandex.qatools.htmlelements.annotations.Name} annotations if necessary and fill it with elements.
For example:
@Name("Search Form") @Block(@FindBy(css = "form_css")) public class SearchForm extends HtmlElement { @Name("Request Input") @FindBy(css = "request_input_css") private TextInput requestInput; @Name("Search Button") @FindBy(css = "search_button_css") private Button searchButton; public TextInput getRequestInput() { return requestInput; } public Button getSearchButton() { return searchButton; } }
Then you can use created blocks as fields of page objects or you can also initialize them directly with methods of {@link ru.yandex.qatools.htmlelements.loader.HtmlElementLoader} class.
Note that this class implements {@link WebElement} interface so you can substitute instances of your block classesfor {@code WebElements} where it's necessary.
@author Artem Eroshenko eroshenkoam@yandex-team.ru
@author Artem Koshelev artkoshelev@yandex-team.ru
@author Alexander Tolmachev starlight@yandex-team.ru