mirror of
https://github.com/MontFerret/ferret.git
synced 2024-12-12 11:15:14 +02:00
d0caef8be7
* Added possibility to wait for an element or a class absence
20 lines
460 B
Plaintext
20 lines
460 B
Plaintext
LET url = @dynamic + "?redirect=/events"
|
|
LET doc = DOCUMENT(url, true)
|
|
|
|
WAIT_ELEMENT(doc, "#page-events")
|
|
|
|
// with fixed timeout
|
|
LET b1 = ELEMENT(doc, "#wait-no-class-btn")
|
|
LET c1 = ELEMENT(doc, "#wait-no-class-content")
|
|
|
|
CLICK(b1)
|
|
WAIT_NO_CLASS(c1, "alert-success")
|
|
|
|
// with random timeout
|
|
LET b2 = ELEMENT(doc, "#wait-no-class-random-btn")
|
|
LET c2 = ELEMENT(doc, "#wait-no-class-random-content")
|
|
|
|
CLICK(b2)
|
|
WAIT_NO_CLASS(c2, "alert-success", 10000)
|
|
|
|
RETURN "" |