Tutorials

Left Click and Upload: Driving a File Picker

A short workflow that navigates to a page with a file upload widget, builds a GPALFile from a list of local paths, and uses LeftClickAndUpload to drive the native file picker dialog before clicking the upload button. Good first stop for any workflow that needs to attach files through a browser.

Left-Click and Download a File

A workflow that closes an ad nested inside an iframe using a persistent selector, then left-clicks a download link and saves the resulting PDF to disk. Covers GPALFile as a download target, LeftClickAndDownload, and persistent selectors for nags that can reappear at any time.

Downloading Files with a Right-Click

Some links only offer a file when you right-click and choose Save Link As, rather than a normal left-click download. RightClickAndDownload drives that context-menu flow for you, and GPALFile.ReturnFilenames tells you exactly what landed on disk and where.

Drag and Drop with Image-Based Selectors

DragAndDrop performs a hardware-level drag from one element to another, using offsets and deltas to land precisely. This tutorial walks through closing a popup with LeftClick and then dragging a map element using a selector built from CSS, XPath, text, an image, and pixel offsets.

Driving Native Dropdowns with SelectClick

Native HTML select elements don't behave like ordinary clickable elements. SelectClick gives GPAL a vocabulary for them - left-click an option, jump to the next or previous option, wrap around at the ends, or pick at random - and WithHardware drives the dropdown the way a real user would, with actual OS-level input.

Driving Native Dropdown Menus with SelectClick

Standard HTML <select> dropdowns render as OS-level popups that scripted clicks often can't reach. This tutorial shows how to target an <option> with a hardware-emulated selector and use SelectClick to choose it directly or step through the list - next, previous, random, and wrap-around.

Automating a Login Flow with a Native Menu Selection

A common real-world pattern: before you can log in, you have to pick an option from a dropdown menu (like choosing which portal to log into), then fill in a username and password. This tutorial walks through clicking a native menu, selecting an option, filling in credentials, and using StealthLeftClick on the final submit button.

Image Matching and Selectors Inside Iframes

Two advanced selector techniques in one workflow: matching an element by a saved screenshot with WithImage and offsets, and reaching into nested iframes with InIframe before clicking an element that only exists inside the frame's own DOM.

Cross-Site Workflow: Find a Book, Then Search for It Elsewhere

A workflow that pulls a random, highly-rated book from one site, then opens a second site in a new tab to search for it and scrape the price. Covers persistent selectors for cookie/login popups, NewTab and CloseTab, and reacting to search results with CallIfFound and InElement.

Handling Cookie Banners and Popups with Persistent Selectors

Cookie banners, newsletter popups, and other nags can appear at any point during a workflow, not just on the first page. WithPersistentSelector and PersistentCallIfFound register a selector and a callback that GPAL checks for on every navigation, so your main workflow can stay focused on the task at hand.

Walking Sitemaps and Capturing Page Digests

GetSiteMapUrls walks a site's sitemap.xml so you can discover pages without hand-coding URLs, and GetHydratedData / GetLLMDigest pull structured and LLM-friendly summaries out of each page you visit. This tutorial crawls a sitemap, captures a modern framework's hydration data, and saves an LLM digest for every page using GPALFile.Next.

Reading, Writing, and Clearing Browser Storage

GPALUrl carries storage definitions - cookies, localStorage, sessionStorage, cache, and indexedDb - that you describe up front with WithStorageType and friends, then execute against the active browser with RunGet, RunSet, and RunDelete. This tutorial walks a cookie and a localStorage entry through a full get/set/delete cycle, then shows how the same verbs extend to indexedDb.

Testing Stealth Against Anti-Bot Detection Sites

AntibotTester walks a list of bot-detection pages, captures a sequence of screenshots on each, and reacts to a few page-specific quirks along the way. It demonstrates nesting BrowserType and AutomationEngine loops with continue-based filtering, a global CallIfNotFound handler with an ignore list, and per-site conditional logic driven by UrlHelper.AreEquivalent.

💬 Ask GPAL