Database |> Language |> Keywords |> 

ENTER

Note: For a high level of where this keyword fits into, check out our browser docs.

One of the fundamental interactions for the web is entering text into things. The ENTER keyword allows you to define a text entering interaction as a qualifier for the page state you’re interested in querying from. The below shows how to grab search results from Brave search.

brave_search <| https://search.brave.com/search?q=lsd |
container <| div.snippet |
link <| a@href |

FROM brave_search
|> GROUP BY container
|> SELECT link

You could do the same specific URL crafting for obtaining results from Google however, like how CLICK’ing can provide an altered page state to pluck from, you can do the same to ENTER INTO an element on a page some text.

search_input <| textarea[name="q"] |
google <| https://google.com |
query_to_try <| "What is LSD.so?" |
search_button <| form center:nth-child(2) input[value="Google Search"] |
search_item_container <| div#search a |
search_item_link <| div#search a@href |

FROM google
|> ENTER INTO search_input query_to_try
|> CLICK ON search_button
|> GROUP BY search_item_container
|> SELECT query_to_try, search_item_link

For a video of the above query being run, see this Tweet.