Browser Use: Browser API documents `networkidle`, but waitForLoadState rejects it
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.4k
- PR merge metrics
- PR metrics pending
Description
What version of the Codex App are you using (From “About Codex” dialog)?
26.825.32147
What subscription do you have?
Plus
What platform is your computer?
Darwin 25.5.0 arm64 arm
What issue are you seeing?
The Browser runtime documentation advertises networkidle as a supported load state:
type LoadState = "load" | "domcontentloaded" | "networkidle";
type PageWaitForLoadStateOptions = {
state?: LoadState;
timeoutMs?: number;
};
It also exposes:
waitForLoadState(options: PageWaitForLoadStateOptions): Promise<void>;
However, the runtime rejects the documented value immediately:
Error: playwright_wait_for_load_state does not support networkidle
This is a mismatch between the generated Browser API documentation/type contract and the runtime implementation.
What steps can reproduce the bug?
- Start Browser Use in the Codex macOS app and select the in-app browser.
- Create a tab and navigate to a normal page.
- Let codex call
waitForLoadStatewith the documentednetworkidlevalue:
const tab = await browser.tabs.new();
await tab.goto("https://example.com/");
await tab.playwright.waitForLoadState({
state: "networkidle",
timeoutMs: 10000
});
- The agent receives the following runtime error:
Error: playwright_wait_for_load_state does not support networkidle
What is the expected behavior?
Either:
waitForLoadState({ state: "networkidle" })should work as documented, ornetworkidleshould be removed from theLoadStatetype used by methods that do not support it.
The generated documentation and runtime validation should expose the same supported values.
Additional information
Environment details:
- Codex macOS app: 26.825.32147
- Bundled Browser plugin: 26.825.32147
- Bundled Codex CLI: 0.150.0-alpha.12.2
- macOS: 26.5.2 (25F84)
- Reproduction target: https://example.com/
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the Browser runtime entry point named playwright_wait_for_load_state and inspect the generated LoadState and PageWaitForLoadStateOptions declarations. Run the provided waitForLoadState reproduction with networkidle, then verify that the runtime behavior and generated contract expose the same supported values.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- playwright, rust, typescript
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 66/100