mirror of
https://github.com/MontFerret/ferret.git
synced 2024-12-14 11:23:02 +02:00
e17ce5a3d5
* Added WAIT_STYLE and WAIT_NO_STYLE * Added WAIT_NO_STYLE and WAIT_NO_STYLE_ALL functions
30 lines
669 B
Plaintext
30 lines
669 B
Plaintext
LET url = @dynamic + "?redirect=/events"
|
|
LET doc = DOCUMENT(url, true)
|
|
LET selector = "#wait-class-btn, #wait-class-random-btn"
|
|
|
|
WAIT_ELEMENT(doc, "#page-events")
|
|
|
|
LET n = (
|
|
FOR el IN ELEMENTS(doc, selector)
|
|
ATTR_SET(el, "style", "color: black")
|
|
|
|
RETURN NONE
|
|
)
|
|
|
|
WAIT_STYLE_ALL(doc, selector, "color", "black", 10000)
|
|
|
|
LET n2 = (
|
|
FOR el IN ELEMENTS(doc, selector)
|
|
ATTR_SET(el, "style", "color: red")
|
|
|
|
RETURN NONE
|
|
)
|
|
|
|
WAIT_NO_STYLE_ALL(doc, selector, "color", "black", 10000)
|
|
|
|
LET results = (
|
|
FOR el IN ELEMENTS(doc, selector)
|
|
RETURN el.style.color
|
|
)
|
|
|
|
RETURN CONCAT(results) == "redred" ? "" : "styles should be updated" |