balin / com.github.epadronu.balin.extensions / org.openqa.selenium.SearchContext

Extensions for org.openqa.selenium.SearchContext

$

fun SearchContext.$(selector: String, index: Int): WebElement

Find the nth element that can be located by the given CSS selector.

fun SearchContext.$(selector: String, range: IntRange): List<WebElement>

Find all the elements that can be located by the given CSS selector, restricted by the specified range.

fun SearchContext.$(selector: String, vararg indices: Int): List<WebElement>

Find all the elements that can be located by the given CSS selector, restricted by the specified indices. (If no index is provided, then all matching elements will be returned.)

find

fun SearchContext.find(selector: String, index: Int): WebElement

Find the nth element that can be located by the given CSS selector.

fun SearchContext.find(selector: String, range: IntRange): List<WebElement>

Find all the elements that can be located by the given CSS selector, restricted by the specified range.

fun SearchContext.find(selector: String, vararg indices: Int): List<WebElement>

Find all the elements that can be located by the given CSS selector, restricted by the specified indices. (If no index is provided, then all matching elements will be returned.)