LaVague and Selenium: browser automation setup
Learn how LaVague turns browser instructions into Selenium code, with a Python setup in Google Colab and searches on Hugging Face and Amazon.
Player not loading? Watch on YouTube
LaVague connects natural language instructions to browser actions. This tutorial introduces the open source library through a Python notebook in Google Colab, then demonstrates navigation and searches without manually writing the Selenium code for each action.
Uploaded on March 26, 2024, the video documents a setup from that period; no LaVague version or separate recording date is supplied. The source title names GPT-4, but the speaker says he thinks the demo code uses GPT-3.5. The walkthrough uses an OpenAI API key. He also describes Hugging Face models and local LLM options, though he does not demonstrate those backends.
The setup covers Selenium, a Chrome browser driver downloaded for Linux, installation from the LaVague repository, and a Gradio interface. Users enter a website URL and an instruction, then inspect the generated Selenium code alongside the browser result. On Hugging Face, the demo opens the datasets section and searches for The Stack. On Amazon, it searches for a water bottle; it does not show a completed purchase.
The speaker explains that LaVague updates the displayed URL after an action so follow-up instructions refer to the resulting page. He argues that generated automation can reduce manual code maintenance when website layouts change, but the examples do not establish reliability across arbitrary sites. He also says the interface is optional and LaVague can be used through code.