mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-11 02:54:31 +00:00
fix(browser): accept fill fields without explicit type
Default missing fill field type to 'text' in /act route to avoid spurious 'fields are required' failures from relay/tool callers. Add regression test for fill payloads with ref+value only.
This commit is contained in:
@@ -69,6 +69,17 @@ describe("browser control server", () => {
|
||||
fields: [{ ref: "6", type: "textbox", value: "hello" }],
|
||||
});
|
||||
|
||||
const fillWithoutType = await postJson<{ ok: boolean }>(`${base}/act`, {
|
||||
kind: "fill",
|
||||
fields: [{ ref: "7", value: "world" }],
|
||||
});
|
||||
expect(fillWithoutType.ok).toBe(true);
|
||||
expect(pwMocks.fillFormViaPlaywright).toHaveBeenCalledWith({
|
||||
cdpUrl: state.cdpBaseUrl,
|
||||
targetId: "abcd1234",
|
||||
fields: [{ ref: "7", type: "text", value: "world" }],
|
||||
});
|
||||
|
||||
const resize = await postJson<{ ok: boolean }>(`${base}/act`, {
|
||||
kind: "resize",
|
||||
width: 800,
|
||||
|
||||
Reference in New Issue
Block a user