1
0
mirror of https://github.com/MontFerret/ferret.git synced 2024-12-14 11:23:02 +02:00
ferret/examples/input.fql
Adam Argo 3829dffb91 Adds function to type value into input (#81)
* adds function to type input

* changes per feedback

* more PR feedback changes

* add context.Background()
2018-10-08 23:07:08 -04:00

21 lines
427 B
Plaintext

LET g = DOCUMENT("https://www.google.com/", true)
INPUT(g, 'input[name="q"]', "ferret", 25)
CLICK(g, 'input[name="btnK"]')
WAIT_NAVIGATION(g)
LET result = (
FOR result IN ELEMENTS(g, '.g')
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
)