1
0
mirror of https://github.com/MontFerret/ferret.git synced 2025-03-25 22:01:15 +02:00
ferret/examples/input.fql

21 lines
423 B
Plaintext
Raw Normal View History

LET g = DOCUMENT("https://www.google.com/", true)
2018-09-27 21:41:41 -04:00
INPUT(g, 'input[name="q"]', "ferret")
CLICK(g, 'input[name="btnK"]')
WAIT_NAVIGATION(g)
2018-09-27 19:24:58 -04:00
LET result = (
FOR result IN ELEMENTS(g, '.g')
2018-09-27 19:24:58 -04:00
RETURN {
title: ELEMENT(result, 'h3 > a'),
description: ELEMENT(result, '.st'),
url: ELEMENT(result, 'cite')
}
)
RETURN (
FOR i IN result
FILTER i.title != NONE
RETURN i
)