public interface BrowserActionBuilder
During an action, the ibello tries to interact with the browser.
If the interaction fails, it will try it again and again, until it successes or the time
runs out. By default, an action uses the ibello
default timeout, but it can be changed with the TimeoutRelated.withTimeout(Enum) or
TimeoutRelated.withTimeout(String) method.
In some cases it is useful to wait a few seconds after an interaction occurred on the page.
The action may change the page structure dynamically, or can navigate to another page.
With the withPageRefreshWait() method, this wait can be performed right after
the action finishes.
During test execution, every action is logged with it's additional information. If an action
fails, then the test will be marked with "error" flag, and not with "failed". This is a
difference between actions and expectations - see hu.ibello.expect.
BrowserActionBuilder instance can be obtained on page objects, with PageObject.doWith(Browser)
method.
Example:
doWith(browser()).acceptAlert();
| Modifier and Type | Method and Description |
|---|---|
void |
acceptAlert()
Closes the alert window with accepting it's content.
|
void |
dismissAlert()
Closes the alert window without accepting it's content.
|
B |
withPageRefreshWait()
If this method is called on the action builder instance, and then an action
is executed successfully, the program will wait until the page is refreshed and
all dynamic changes in the DOM performed.
|
withTimeout, withTimeoutvoid dismissAlert()
During the timeout, this method tries to execute the action until it is successfully performed. If the time runs out and the action was not performed, an exception will be thrown, the error will be logged and the current test will be interrupted and marked as "error".
void acceptAlert()
During the timeout, this method tries to execute the action until it is successfully performed. If the time runs out and the action was not performed, an exception will be thrown, the error will be logged and the current test will be interrupted and marked as "error".
B withPageRefreshWait()
Created by Kornél Simon, 2022