From 3ba717b3e653cedadb5eba24c23bdc5133c3261e Mon Sep 17 00:00:00 2001 From: Mike MacCana Date: Tue, 2 Oct 2018 18:32:22 +0100 Subject: [PATCH] Unminify demo code Because `ELEMENTS(g, '.g')` is a little confusing --- README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 9fcf9b73..b402df80 100644 --- a/README.md +++ b/README.md @@ -18,15 +18,15 @@ Once the page gets loaded, we iterate over all elements in search results and as The final for loop filters out empty elements that might be because of inaccurate use of selectors. ```aql -LET g = DOCUMENT("https://www.google.com/", true) +LET google = DOCUMENT("https://www.google.com/", true) -INPUT(g, 'input[name="q"]', "ferret") -CLICK(g, 'input[name="btnK"]') +INPUT(google, 'input[name="q"]', "ferret") +CLICK(google, 'input[name="btnK"]') -WAIT_NAVIGATION(g) +WAIT_NAVIGATION(google) LET result = ( - FOR result IN ELEMENTS(g, '.g') + FOR result IN ELEMENTS(google, '.g') RETURN { title: ELEMENT(result, 'h3 > a'), description: ELEMENT(result, '.st'), @@ -35,9 +35,9 @@ LET result = ( ) RETURN ( - FOR i IN result - FILTER i.title != NONE - RETURN i + FOR page IN result + FILTER page.title != NONE + RETURN page ) ```