com.iodesystems.selenium.IElExtensions.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of selenium-jquery Show documentation
Show all versions of selenium-jquery Show documentation
SeleniumJQuery is a tool for writing more effective Selenium tests with the power of jQuery selectors and
Kotlin's expressiveness
package com.iodesystems.selenium
import com.iodesystems.selenium.jQuery.IEl
object IElExtensions {
fun IEl.button(text: String): IEl {
return find("button").contains(text)
}
fun IEl.link(text: String): IEl {
return find("a").contains(text)
}
fun IEl.linkTo(href: String): IEl {
return find("a[href='$href']")
}
fun IEl.waitForPageLoaded() {
waitFor("document.readyState === 'complete'") {
if (js("return document.readyState") == "complete") true else null
}
}
}