0.0.2 • Published 2 years ago

be-summoning v0.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

be-summoning

Playwright Tests

How big is this package in your project?

be-summoning summons all child elements matching an attribute value.

Example 1

<div be-summoning itemscope itemtype="http://schema.org/Movie">
  <h1 itemprop="name">Avatar</h1>
  <span>Director:
    <span itemprop="director">James Cameron</span>
    (born August 16, 1954)</span>
  <span itemprop="genre">Science fiction</span>
  <a href="../movies/avatar-theatrical-trailer.html" itemprop="trailer">
    Trailer
  </a>
   <span slot="my-text">Let's have some different text!</span>
</div>    

What this does:

oDiv.beDecorated.$.itemprops.director returns:

<span itemprop="director">James Cameron</span>

oDiv.beDecorated.$.slots.myText returns:

<span slot="my-text">Let's have some different text!</span>

oDiv.beDecorated.$.itemprops.'*' returns array of all elements with attribute itemprop