INPUT example, strange result on google
Ferret is a web scraping system
Brought to you by:
hationlove
Originally created by: PierreBrisorgueil
Hum, during my research I came across a strange issue in an example: https://github.com/MontFerret/ferret/blob/master/examples/input.fql
FILTER TRIM(result.attributes.class) == 'g' => line 20:47 extraneous input '<EOF>' expecting {'FOR', 'RETURN', 'FILTER', 'SORT', 'LIMIT', 'LET', 'COLLECT', Identifier, NamespaceSegment}
But that's not the problem if you remove the end and do something like this :
LET google = DOCUMENT("https://www.google.com/", {
driver: "cdp",
userAgent: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.87 Safari/537.36"
})
HOVER(google, 'input[name="q"]')
WAIT(RAND(100))
INPUT(google, 'input[name="q"]', @criteria, 30)
WAIT(RAND(100))
WAIT_ELEMENT(google, '.UUbT9')
WAIT(3000)
CLICK(google, 'input[name="btnK"]')
WAIT_NAVIGATION(google)
WAIT(5000)
RETURN ""
CLICK(google, 'input[name="btnK"]')
will not click on the button but X pixel on the top and launch the search request on the last item of suggestions. I'm not sure if it's about ferret or google, but it's strange.