1
0
mirror of https://github.com/MontFerret/ferret.git synced 2024-12-16 11:37:36 +02:00
ferret/examples/while.fql
Tim Voronov bd07b84736
Feature/#262 while loop (#567)
* Added new syntax and iterator

* Added FOR-WHILE loop

* Added 'FOR-DO-WHILE loop'
2020-11-10 19:16:22 -05:00

15 lines
424 B
Plaintext

let page = document("https://github.com/marketplace/category/api-management", { driver: "cdp"})
LET nextButtonSelector = '[data-test-selector="pagination"] .btn:nth-child(2)'
LET resultsSelector = 'a[data-hydro-click*="search_result.click"]'
FOR c WHILE attr(element(nextButtonSelector), 'disabled') == none
NEXT click(nextButtonSelector)
FOR el IN ELEMENTS(page, resultsSelector)
RETURN el.innerText