github.com/MontFerret/ferret@v0.18.0/e2e/tests/dynamic/doc/wait/attr_by_css.fql (about)

     1  LET url = @lab.cdn.dynamic + "?redirect=/events"
     2  LET doc = DOCUMENT(url, true)
     3  LET selector = "#wait-class-btn"
     4  LET attrName = "data-ferret-x"
     5  LET attrVal = "foobar"
     6  
     7  WAIT_ELEMENT(doc, "#page-events")
     8  
     9  LET el = ELEMENT(doc, selector)
    10  LET prev = el.attributes
    11  
    12  ATTR_SET(el, attrName, attrVal)
    13  WAIT_ATTR(doc, selector, attrName, attrVal, 30000)
    14  
    15  LET curr = el.attributes
    16  
    17  T::NONE(prev[attrName])
    18  T::EQ(attrVal, curr[attrName], "attributes should be updated")
    19  
    20  RETURN TRUE