File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -240,6 +240,7 @@ const typeSchema = elementSchema.extend({
240
240
slowly : z
241
241
. boolean ( )
242
242
. optional ( )
243
+ . default ( true )
243
244
. describe ( "Whether to type one character at a time." ) ,
244
245
} ) ;
245
246
type TypeInput = z . infer < typeof typeSchema > ;
@@ -269,7 +270,7 @@ const type = defineTool<typeof typeSchema>({
269
270
) } .pressSequentially('${ params . text . replace ( / ' / g, "\\'" ) } ');`
270
271
) ;
271
272
steps . push ( ( ) =>
272
- locator . pressSequentially ( params . text , { delay : 100 , timeout : 5000 } )
273
+ locator . pressSequentially ( params . text , { delay : 50 } )
273
274
) ;
274
275
} else {
275
276
code . push ( `// Fill "${ params . text } " into "${ params . element } "` ) ;
@@ -279,8 +280,8 @@ const type = defineTool<typeof typeSchema>({
279
280
) } .fill('${ params . text . replace ( / ' / g, "\\'" ) } ');`
280
281
) ;
281
282
steps . push ( async ( ) => {
282
- await locator . waitFor ( { state : "visible" , timeout : 5000 } ) ;
283
- if ( ! ( await locator . isEditable ( { timeout : 2000 } ) ) ) {
283
+ await locator . waitFor ( { state : "visible" } ) ;
284
+ if ( ! ( await locator . isEditable ( ) ) ) {
284
285
throw new Error (
285
286
`Element '${ params . element } ' was visible but not editable.`
286
287
) ;
You can’t perform that action at this time.
0 commit comments