interface WaitingSupport
Describes the waitFor
method support, which aims to ease the use of
WebDriverWait.
// Given the selector of an element that should be present
val locator = By.cssSelector(".global-header-logo")
try {
Browser.drive(driverFactory) {
// When I navigate to the Kotlin's page URL
to("https://kotlinlang.org/")
// And I wait for the element located by such selector to be present
waitFor { ExpectedConditions.presenceOfElementLocated(locator) }
}
} catch (ignore: TimeoutException) {
// Then I should wait until the element appears in the page
fail("An unexpected exception was thrown")
}
abstract val configurationSetup: ConfigurationSetup
The configuration setup used to customized Balin's behavior. |
|
abstract val driver: WebDriver
The driver to be used when evaluating |
open fun <T> waitFor(timeOutInSeconds: Long = configurationSetup.waitForTimeOutTimeInSeconds, sleepInMillis: Long = configurationSetup.waitForSleepTimeInMilliseconds, isTrue: () -> ExpectedCondition<T>): T
Repeatedly applies the underlying driver to the given function until one of the following occurs: |
interface Browser : JavaScriptSupport, WaitingSupport, WebDriver
Balin's backbone. The |
|
abstract class Component : ClickAndNavigateSupport, ComponentMappingSupport, JavaScriptSupport, SearchContext, WaitingSupport
A component is a reusable piece of functionality that can be shared among several pages, and which interaction can be performed independently of other pieces in the web page. |
|
abstract class Page : ClickAndNavigateSupport, ComponentMappingSupport, JavaScriptSupport, SearchContext, WaitingSupport
This class is the corner stone for Balin's implementation of the Page Object Design Pattern. All classes that model a Web page/view most extend this one. |