diff options
Diffstat (limited to '_log/bumblebee.md')
| -rw-r--r-- | _log/bumblebee.md | 34 |
1 files changed, 13 insertions, 21 deletions
diff --git a/_log/bumblebee.md b/_log/bumblebee.md index bbe0490..a5e761d 100644 --- a/_log/bumblebee.md +++ b/_log/bumblebee.md @@ -1,40 +1,32 @@ --- -title: Built a browser automation script synthesizer +title: Built a web script synthesizer date: 2025-04-02 layout: post project: true thumbnail: thumb_sm.png --- -One year at the trading firm. Webscrapers are causing problems. CPUs are -saturated, servers are stalling. +One year at the trading firm. Scripts are saturating CPUs, stalling servers; +Forced to restart them. -2025-02: Built a C# WinForms application to record browser sessions and -automate the synthesis of scripts. +2025-02: Built a tool to record browser sessions and synthesize better scripts. <video style="max-width:100%; margin-bottom: 10px" controls="" poster="poster.png"> <source src="bee.mp4" type="video/mp4"> </video> -Hosted WebView2 (Edge) in the WinForms application to render web content. +Stack: C# WinForms, WebView2 (Edge), Scintilla.NET editor. -Intercepted events by injecting JS hooks to web pages (client-side events) and -listening to WebView events (internal browser events). Converted intercepted -events to Selenium code by sending through if-else blocks. +Injected JS hooks, WebView2 and the editor generate events. If-else blocks +convert them to Selenium code. Optimizer squashes multiple events into single +commands (e.g., calendar clicks → text input), uses heuristics to improve DOM +addressing (xpath, id, element). -Implemented a basic optimizer to squash event sequences into single commands -(e.g., calendar clicks → text input), use heuristics to improve DOM addressing -(xpath, id, element). +Two linear lists store events and code—no ASTs. Mid-session manual edits desync +lists, block optimizer. Workaround: only edit scripts at the end of recording. -Integrated Scintilla.NET editor to allow user more control over the generated -script. - -Events and code are stored in two linear lists. Without ASTs, mid-session -manual edits desync the lists, block the optimizer. As a workaround, only edit -scripts at the end of recording. - -2025-03: Shipped the first iteration. Began work on a key optimization: bypass -the browser, grab data files directly when possible. +2025-03: Shipped the first iteration. Began work on key optimization: bypass +the browser, grab data files directly. 2025-04: Abandoned project. Left the firm. |
