balin / com.github.epadronu.balin.core

Package com.github.epadronu.balin.core

Types

Browser

interface Browser : JavaScriptSupport, WaitingSupport, WebDriver

Balin's backbone. The Browser interface binds together the different abstractions that form part of the library.

BrowserTests

class BrowserTests

ClickAndNavigateSupport

interface ClickAndNavigateSupport

This interface defines a method to click on an element and tell the browser it will navigate to a different page as consequence of such action.

Component

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.

ComponentMappingSupport

interface ComponentMappingSupport

This interface defines methods to easily map a WebElementinto a Component.

ComponentTests

class ComponentTests

JavaScriptExecutor

interface JavaScriptExecutor

Describes an easier way to interact with JavascriptExecutor.executeScript & JavascriptExecutor.executeAsyncScript, allowing the execution of synchronous and asynchronous JavaScript code if such functionality is supported by the underlying driver.

JavaScriptSupport

interface JavaScriptSupport

Describes the js property support, which aims to ease the use of JavascriptExecutor.executeScript & JavascriptExecutor.executeAsyncScript.

JavaScriptTests

class JavaScriptTests

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.

PageTests

class PageTests

WaitingSupport

interface WaitingSupport

Describes the waitFor method support, which aims to ease the use of WebDriverWait.

WithAlertTests

class WithAlertTests

WithFrameTests

class WithFrameTests

WithWindowTests

class WithWindowTests

Properties

expectedFeatures

val expectedFeatures: Map<String, String>

Functions

withAlert

fun Browser.withAlert(alertContext: Alert.() -> Unit): Unit

Switches to the currently active modal dialog for this particular driver instance.

withFrame

fun Browser.withFrame(index: Int, iFrameContext: () -> Unit): Unit
fun <T : Page> Browser.withFrame(index: Int, iFrameContext: T.() -> Unit): Unit

Select a frame by its (zero-based) index and switch the driver's context to it.

fun Browser.withFrame(nameOrId: String, iFrameContext: () -> Unit): Unit
fun <T : Page> Browser.withFrame(nameOrId: String, iFrameContext: T.() -> Unit): Unit

Select a frame by its name or ID. Frames located by matching name attributes are always given precedence over those matched by ID.

fun Browser.withFrame(webElement: WebElement, iFrameContext: () -> Unit): Unit
fun <T : Page> Browser.withFrame(webElement: WebElement, iFrameContext: T.() -> Unit): Unit

Select a frame using its previously located WebElement.

withWindow

fun Browser.withWindow(nameOrHandle: String? = null, windowContext: WebDriver.() -> Unit): Unit

Switch the focus of future commands for this driver to the window with the given name/handle.