Appearance
Usage
Alumnium wraps your existing browser driver with three natural-language methods: do(), check(), and get(). You write what the browser should do; Alumnium calls the LLM to figure out the exact clicks, types, and reads.
Python (pytest + Selenium)
python
from alumnium import Alumni
from selenium.webdriver import Chrome
from pytest import fixture
@fixture
def driver():
driver = Chrome()
yield driver
driver.quit()
@fixture
def al(driver: Chrome):
al = Alumni(driver)
yield al
al.quit()
def test_search(al: Alumni, driver: Chrome):
driver.get("https://duckduckgo.com")
al.do("search for 'Mercury element' and press Enter")
al.check("page title contains Mercury word")
al.check("search results contain Wikipedia articles")
symbol = al.get("chemical symbol")
assert symbol == "Hg"TypeScript (Mocha + Selenium)
typescript
import { strict as assert } from "assert";
import { Alumni } from "alumnium";
import { Builder, Browser, type WebDriver } from "selenium-webdriver";
describe("TestSearch", () => {
let driver: WebDriver;
let al: Alumni;
before(async () => {
driver = await new Builder().forBrowser(Browser.CHROME).build();
al = new Alumni(driver);
});
after(async () => {
await driver.quit();
await al.quit();
});
it("should search", async () => {
await driver.get("https://duckduckgo.com");
await al.do("search for 'Mercury element' and press Enter");
await al.check("page title contains Mercury word");
await al.check("search results contain Wikipedia articles");
const symbol = await al.get("chemical symbol");
assert.equal(symbol, "Hg");
});
});Java (JUnit 5 + Selenium)
java
import ai.alumnium.Alumni;
import org.junit.jupiter.api.*;
import org.openqa.selenium.chrome.ChromeDriver;
class SearchTest {
private Alumni al;
private ChromeDriver driver;
@BeforeEach
void setUp() {
driver = new ChromeDriver();
al = new Alumni(driver);
}
@AfterEach
void tearDown() {
al.quit();
}
@Test
void shouldSearch() {
driver.get("https://duckduckgo.com");
al.act("search for 'Mercury element' and press Enter");
al.check("page title contains Mercury word");
al.check("search results contain Wikipedia articles");
String symbol = (String) al.get("chemical symbol");
Assertions.assertEquals("Hg", symbol);
}
}Core method reference
| Method | Description |
|---|---|
al.do("instruction") | Perform an action (click, type, navigate, etc.) described in plain English |
al.check("assertion") | Assert something about the page state; raises on failure |
al.get("question") | Return a value extracted from the page (string, number, etc.) |
al.quit() | End the Alumnium session and release LLM resources |
Minimal inline example (Python, no test framework)
python
from alumnium import Alumni
from selenium.webdriver import Chrome
driver = Chrome()
driver.get("https://search.brave.com")
al = Alumni(driver)
al.do("type 'selenium' into the search field, then press Enter")
al.check("page title contains selenium")
driver.quit()
al.quit()Notes
- Each
do(),check(), andget()call makes one or more LLM API requests. OpenAI costs apply per call. - Tests run slower than pure Selenium because of the LLM round-trip (expect 5-30 seconds per step).
- ChromeDriver must match your installed Chrome version. Use
webdriver-manageror the browser's bundled driver.