Skip to content

Commit

Permalink
Add keypressText delay option
Browse files Browse the repository at this point in the history
  • Loading branch information
vpalmisano committed Aug 30, 2023
1 parent e609963 commit ea8d437
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1086,8 +1086,8 @@ window.GET_DISPLAY_MEDIA_CROP = "${crop}";
// Simulate keypress
await page.exposeFunction(
'keypressText',
async (selector: string, text: string) => {
await page.type(selector, text)
async (selector: string, text: string, delay = 20) => {
await page.type(selector, text, { delay })
},
)

Expand Down

0 comments on commit ea8d437

Please sign in to comment.