You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: `Expect text is visible on the page. Prefer ${expectVisible.schema.name} if possible.`,
281
+
inputSchema: baseSchema.extend({
282
+
text: z.string().describe('TEXT to expect. Can be found in the snapshot like this: \`- role "Accessible Name": {TEXT}\` or like this: \`- text: {TEXT}\`'),
283
+
}),
284
+
},
285
+
286
+
handle: async(context,params)=>{
287
+
returnawaitcontext.runActionAndWait({
288
+
method: 'expectVisible',
289
+
selector: getByTextSelector(params.text),
290
+
});
291
+
},
292
+
});
293
+
294
+
constexpectValue=defineTool({
295
+
schema: {
296
+
name: 'browser_expect_value',
297
+
title: 'Expect value',
298
+
description: 'Expect element value',
299
+
inputSchema: baseSchema.extend({
300
+
type: z.enum(['textbox','checkbox','radio','combobox','slider']).describe('Type of the element'),
301
+
element: z.string().describe('Human-readable element description'),
302
+
ref: z.string().describe('Exact target element reference from the page snapshot'),
303
+
value: z.string().describe('Value to expect. For checkbox, use "true" or "false".'),
0 commit comments