1
0
mirror of https://github.com/MontFerret/ferret.git synced 2024-12-14 11:23:02 +02:00
ferret/e2e/tests/doc_wait_attr_d.fql
Tim Voronov 82f7317ebe
Feature/#250 wait style (#257)
* Added WAIT_ATTR functions
2019-03-13 22:50:29 -04:00

18 lines
493 B
Plaintext

LET url = @dynamic + "?redirect=/events"
LET doc = DOCUMENT(url, true)
LET selector = "#wait-class-btn"
LET attrName = "data-ferret-x"
LET attrVal = "foobar"
WAIT_ELEMENT(doc, "#page-events")
LET el = ELEMENT(doc, selector)
LET prev = el.attributes
ATTR_SET(el, attrName, attrVal)
WAIT_ATTR(doc, selector, attrName, attrVal, 30000)
//WAIT_ATTR(el, attrName, attrVal)
LET curr = el.attributes
RETURN prev[attrName] == NONE && curr[attrName] == attrVal ? "" : "attributes should be updated"