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

im.yagni.driveby.conditions.ElementExists.scala Maven / Gradle / Ivy

The newest version!
package im.yagni.driveby.conditions

import im.yagni.driveby.browser.UnSafeBrowser
import im.yagni.driveby.{By, Condition, Describer}

object ElementExists {
  import Describer._

  def apply(by: By) = new Condition {
    def expectation = expect("ElementExists", List(by.toString, true.toString))
    def isSatisfied(browser: UnSafeBrowser) = { browser.exists(by) == true }
    def describeFailure(browser: UnSafeBrowser) = { expectation + butWas(() => browser.exists(by).toString) }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy