github.com/MontFerret/ferret@v0.18.0/e2e/tests/static/element/siblings/prev.fql (about) 1 LET url = @lab.cdn.static + '/list.html' 2 LET doc = DOCUMENT(url) 3 4 LET current = ELEMENT(doc, '[data-index="1"]') 5 T::NOT::NONE(current) 6 LET prev = current.previousElementSibling 7 T::NOT::NONE(prev) 8 9 LET currentIdx = TO_INT(current.attributes['data-index']) 10 LET prevIdx = TO_INT(prev.attributes['data-index']) 11 T::LT(prevIdx, currentIdx) 12 13 RETURN NONE