skrape.it icon indicating copy to clipboard operation
skrape.it copied to clipboard

[FEATURE] add support for DOM tree relevant assertions made with strikt

Open skrapeit opened this issue 6 years ago • 0 comments

skrape{it} should support well-known assertion libraries by adding custom matchers that are relevant when expecting things in the DOM tree. Strikt is an well-known and nicely extendable assertion library we want to support.

Please add the following custom matchers that can be used on Element objects

  • isPresent
  • isNotPresent
  • isPresentTimes(n)
  • hasText("")
  • hasTextContainig("")
  • hasTextStartingWith("")
  • hasTextEndingWith("")
  • hasClass("")
  • hasClassContainig("")
  • hasClassStartingWith("")
  • hasClassEndingWith("")
  • hasAttribute("" to "")
  • hasId("")
  • hasIdContainig("")
  • hasIdStartingWith("")
  • hasIdEndingWith("")
  • isDisabled
    • check if element has attribute disabled
  • hasSrc("")
  • hasSrcContaining("")
  • hasSrcStartingWith("")
  • hasSrcEndingWith("")
  • hasTitle("")
  • hasTitleContainig("")
  • hasTitleStartingWith("")
  • hasTitleEndingWith("")
  • hasHref("")
  • hasHrefContainig("")
  • hasHrefStartingWith("")
  • hasHrefEndingWith("")

skrapeit avatar Sep 26 '19 12:09 skrapeit