From 0f884080540cb9b9224ba9d929d65c3a77feabfa Mon Sep 17 00:00:00 2001 From: Tim Voronov Date: Thu, 22 Aug 2019 17:54:52 -0400 Subject: [PATCH] Update input.fql --- examples/input.fql | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/examples/input.fql b/examples/input.fql index be7d1c5f..cacba33a 100644 --- a/examples/input.fql +++ b/examples/input.fql @@ -1,10 +1,12 @@ -LET google = DOCUMENT("https://www.google.com/", { driver: "cdp" }) +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" +}) -INPUT(google, 'input[name="q"]', "ferret", 25) +INPUT(google, 'input[name="q"]', "ferret") CLICK(google, 'input[name="btnK"]') WAIT_NAVIGATION(google) -WAIT_ELEMENT(google, '.g', 5000) FOR result IN ELEMENTS(google, '.g') // filter out extra elements like videos and 'People also ask' @@ -13,4 +15,4 @@ FOR result IN ELEMENTS(google, '.g') title: INNER_TEXT(result, 'h3'), description: INNER_TEXT(result, '.st'), url: INNER_TEXT(result, 'cite') - } \ No newline at end of file + }