All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.iodesystems.selenium.IElExtensions.kt Maven / Gradle / Ivy

Go to download

SeleniumJQuery is a tool for writing more effective Selenium tests with the power of jQuery selectors and Kotlin's expressiveness

There is a newer version: 3.0.2
Show newest version
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
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy