The following example workflows show how to use the Selenium Nodes. You can download the workflows and import them into KNIME using File → Import KNIME Workflow…
Search results scraping — This workflow shows how to scrape Google search results for a given search query. The workflow simulates a query submission and loops through the result pages to collect more search results than displayed on the first result page. Beside that, it demonstrates how to take screenshots and extract the rendered DOM source of webpages. Download here.
Facebook scraping — This workflow logs into your Facebook account and extracts a list of all your Facebook friends and their profile URLs. As the Facebook friends are rendered through “infinite scrolling”, the workflow repeatedly scrolls down the page in a loop to fetch all data prior to extracting the information. Make sure to provide your credentials before running as workflow variables: Right click on the imported workflow in the “KNIME Explorer” view, choose “Workflow Variables…”). Download here.
Saving files — This workflow demonstrates how to download a binary file within the browser using an XMLHttpRequest, encodes the download to a Base64 string and transfers the content back to KNIME, where it is written to the file system. This workflow is handy when you need to download files from an authenticated environment. See the FAQ for more details, download here.
Get Current URL – This example shows how one can access the currently shown URL in the browser. We use the WebDriver’s
getCurrentUrl method in a Java Snippet node. Download here.