public interface PageObjectTool
There is no need to use this interface directly. The ibello dependency injection system automatically instantiates and injects an instance into page objects.
PageObject| Modifier and Type | Method and Description |
|---|---|
Browser |
browser(String windowId)
Returns a
Browser instance which can be used for different browser-specific actions,
including element search and opening URL. |
WebElementChecker |
checkThat(WebElement element)
Returns a
WebElementChecker instance which can be used to inspect a WebElement's state and have
some boolean result about it. |
BrowserActionBuilder |
doWith(Browser browser)
Returns an
BrowserActionBuilder instance which can be used to manager browser window related actions. |
WebElementActionBuilder |
doWith(WebElement element)
Returns an
WebElementActionBuilder instance which can be used to perform an action on the web element. |
ExpectationBuilder |
expectations(String windowId)
Returns an
ExpectationBuilder instance which can be used to build and execute an expectation. |
SearchTool |
find(String windowId)
Returns a
SearchTool instance which is used to search elements on the page. |
WebElementGetter |
get(WebElement element)
Returns a
WebElementGetter instance which can be used to get some property of the given WebElement. |
Value |
getConfigurationValue(String name)
Returns a configuration property as a
Value. |
String |
getMergedURL(String url)
Returns an URL which is merged with the
ibello.url.base configuration property. |
KeyHelper |
keys()
Returns a
KeyHelper instance, which offers special keys and key modifiers. |
TaskRepeater |
repeat(Task task)
Returns a
TaskRepeater instance which will run the given task multiple times. |
TestDataBuilder |
testData()
Starts a new test data loading.
|
BrowserActionBuilder |
tryWith(Browser browser)
Returns an
BrowserActionBuilder instance which can be used to manager browser window related actions. |
WebElementActionBuilder |
tryWith(WebElement element)
Returns an
WebElementActionBuilder instance which can be used to perform an action on the web element. |
SearchTool find(String windowId)
Returns a SearchTool instance which is used to search elements on the page.
The returned instance offers a fluent interface for element search. Example:
WebElement image = ...; WebElement child = find().using(By.TAG_NAME, "span").leftFrom(image).first();
windowId - identifier of the browser windowValue getConfigurationValue(String name)
Value. The returned value offers some public methods to
transform the configuration property into different java types.
This method always has a non-null result, even if the configuration value does not exist - in this case,
the wrapped value will be null.name - name of the configuration parameterValue instanceString getMergedURL(String url)
ibello.url.base configuration property.
If the given URL is an absolute one with protocol, then it will be returned (without any changes).
If the URL is relative, then it will be concatenated to the configuration property, and the result will be returned.
url - the absolute or relative URLBrowser browser(String windowId)
Browser instance which can be used for different browser-specific actions,
including element search and opening URL.windowId - identifier of the browser windowWebElementActionBuilder doWith(WebElement element)
WebElementActionBuilder instance which can be used to perform an action on the web element.
If the action fails then the test execution stops.element - we want to perform an action with this elementsWebElementActionBuilder tryWith(WebElement element)
WebElementActionBuilder instance which can be used to perform an action on the web element.
If the action fails then the test execution continues.element - we want to perform an action with this elementsBrowserActionBuilder doWith(Browser browser)
BrowserActionBuilder instance which can be used to manager browser window related actions.
If the action fails then test execution stops.browser - the browser instance, can be obtained with the PageObject.browser() methodBrowserActionBuilder tryWith(Browser browser)
BrowserActionBuilder instance which can be used to manager browser window related actions.
If the action fails then test execution continues.browser - the browser instance, can be obtained with the PageObject.browser() methodTaskRepeater repeat(Task task)
TaskRepeater instance which will run the given task multiple times.
The methods of this instance are customizing the exit condition of this repeat process.task - the task we want to repeatWebElementChecker checkThat(WebElement element)
WebElementChecker instance which can be used to inspect a WebElement's state and have
some boolean result about it. The investigation holds until the element is accessible (or the time runs out).element - the element we need to investigateWebElementGetter get(WebElement element)
WebElementGetter instance which can be used to get some property of the given WebElement.
The operation waits until the element is accessible (or the time runs out).element - the elementExpectationBuilder expectations(String windowId)
Returns an ExpectationBuilder instance which can be used to build and execute an expectation.
The returned instance offers a fluent interface for element search. Example:
WebElement okButton = ...;
WebElements buttons = ...;
expectations().expect(okButton).toBe().visible();
expectations().expect(buttons).toHave().size(5);
expectations().expect(browser()).toHave().url("http://localhost/page");
windowId - identifier of the browser windowExpectationBuilder instance which is configured to run expectationsKeyHelper keys()
KeyHelper instance, which offers special keys and key modifiers.
Those can be used in WebElementActionBuilder.sendKeys(CharSequence...) and
WebElementActionBuilder.sendKeys(hu.ibello.actions.KeyModifier, CharSequence...) methods.KeyHelper instanceTestDataBuilder testData()
TestDataBuilder instance which can be used
to configure and perform the test loading operation.TestDataBuilderCreated by Kornél Simon, 2022