Skip to content

Release Notes - v0.1.0

Initial release of the W3Pilot Client SDK.

Highlights

Go client for W3Pilot browser automation platform with full feature parity with JavaScript and Python clients.

This SDK provides a native Go interface to the W3Pilot browser automation platform, which uses the WebDriver BiDi protocol for bidirectional communication with the browser.

Features

Browser Control

  • Browser.Launch() - Launch browser with configurable options (headless, port, executable path)
  • Launch() / LaunchHeadless() - Convenience functions for common launch patterns
  • Quit() - Graceful browser shutdown
  • Go(url) - Navigate to URL with automatic wait for page load
  • Reload() - Reload current page
  • Back() / Forward() - Browser history navigation
  • URL() / Title() - Get current page URL and title
  • WaitForNavigation() - Wait for navigation to complete

Element Interaction

  • Find(selector) - Find element by CSS selector with actionability waits
  • FindAll(selector) - Find all matching elements
  • MustFind(selector) - Find or panic (for concise test code)
  • Click() - Click with automatic actionability checks (visible, stable, enabled)
  • Type(text) - Type text with editability checks
  • Text() - Get element text content
  • GetAttribute(name) - Get element attribute value
  • BoundingBox() / Center() - Get element geometry

Screenshots & JavaScript

  • Screenshot() - Capture page as PNG
  • Evaluate(script) - Execute JavaScript in page context

Debug Logging

  • Set W3PILOT_DEBUG=1 to enable structured JSON logging via Go's slog package

Installation

go get github.com/agentplexus/w3pilot

Prerequisites

The W3Pilot clicker binary is required. Set W3PILOT_CLICKER_PATH to point to the binary.

Quick Example

package main

import (
    "context"
    "log"

    "github.com/agentplexus/w3pilot"
)

func main() {
    ctx := context.Background()

    pilot, err := w3pilot.Launch(ctx)
    if err != nil {
        log.Fatal(err)
    }
    defer pilot.Quit(ctx)

    if err := pilot.Go(ctx, "https://example.com"); err != nil {
        log.Fatal(err)
    }

    link, err := pilot.Find(ctx, "a", nil)
    if err != nil {
        log.Fatal(err)
    }

    if err := link.Click(ctx, nil); err != nil {
        log.Fatal(err)
    }
}

Feature Parity

Feature JS Python Go
browser.Launch()
pilot.Go(url)
pilot.Screenshot()
pilot.Find(selector)
pilot.FindAll(selector)
pilot.Evaluate(script)
pilot.Reload()
pilot.Back() / pilot.Forward()
pilot.Quit()
element.Click()
element.Type(text)
element.Text()
element.GetAttribute()
element.BoundingBox()
Actionability waits
Debug logging

Documentation