Summary - The `--exact` flag on `find role`, `find label`, and `find placeholder` was accepted by the CLI but silently dropped by the server. The Zod validation schema, TypeScript types, and action handlers all lacked the `exact` field, so it was stripped before reaching Playwright's `getByRole`, `getByLabel`, and `getByPlaceholder` calls. - Added `exact` to the schema, types, and handler for all three locators so the flag is forwarded to Playwright as intended. - Added tests confirming `exact: true` survives protocol parsing for `getbyrole`, `getbylabel`, and `getbyplaceholder`. Fixes #402
This commit is contained in:
@@ -108,6 +108,7 @@ export interface GetByRoleCommand extends BaseCommand {
|
||||
action: 'getbyrole';
|
||||
role: string;
|
||||
name?: string;
|
||||
exact?: boolean;
|
||||
subaction: 'click' | 'fill' | 'check' | 'hover';
|
||||
value?: string;
|
||||
}
|
||||
@@ -122,6 +123,7 @@ export interface GetByTextCommand extends BaseCommand {
|
||||
export interface GetByLabelCommand extends BaseCommand {
|
||||
action: 'getbylabel';
|
||||
label: string;
|
||||
exact?: boolean;
|
||||
subaction: 'click' | 'fill' | 'check';
|
||||
value?: string;
|
||||
}
|
||||
@@ -129,6 +131,7 @@ export interface GetByLabelCommand extends BaseCommand {
|
||||
export interface GetByPlaceholderCommand extends BaseCommand {
|
||||
action: 'getbyplaceholder';
|
||||
placeholder: string;
|
||||
exact?: boolean;
|
||||
subaction: 'click' | 'fill';
|
||||
value?: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user