github.com/MontFerret/ferret@v0.18.0/e2e/tests/dynamic/element/attrs/set.fql (about)

     1  LET url = @lab.cdn.dynamic + "?redirect=/events"
     2  LET doc = DOCUMENT(url, true)
     3  LET pageSelector = "#page-events"
     4  LET elemSelector = "#wait-no-style-content"
     5  LET attrName = "data-e2e-test"
     6  
     7  WAIT_ELEMENT(doc, pageSelector)
     8  
     9  LET el = ELEMENT(doc, elemSelector)
    10  ATTR_SET(el, attrName, "true")
    11  
    12  LET prev = el.attributes[attrName]
    13  
    14  T::EQ(prev, "true")
    15  
    16  ATTR_SET(el, attrName, "false")
    17  
    18  LET curr = el.attributes[attrName]
    19  
    20  T::EQ(curr, "false")
    21  
    22  RETURN TRUE