This repository was archived by the owner on Jan 30, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -124,7 +124,7 @@ func (k *Keyboard) up(key string) error {
124
124
func (k * Keyboard ) insertText (text string ) error {
125
125
action := input .InsertText (text )
126
126
if err := action .Do (cdp .WithExecutor (k .ctx , k .session )); err != nil {
127
- return fmt .Errorf ("unable to send character: %w" , err )
127
+ return fmt .Errorf ("cannot send character: %w" , err )
128
128
}
129
129
return nil
130
130
}
@@ -216,7 +216,7 @@ func (k *Keyboard) press(key string, opts *KeyboardOptions) error {
216
216
}
217
217
}
218
218
if err := k .down (key ); err != nil {
219
- return err
219
+ return fmt . Errorf ( "cannot down: %w" , err )
220
220
}
221
221
return k .up (key )
222
222
}
@@ -235,12 +235,12 @@ func (k *Keyboard) typ(text string, opts *KeyboardOptions) error {
235
235
keyInput := keyboardlayout .KeyInput (c )
236
236
if _ , ok := layout .ValidKeys [keyInput ]; ok {
237
237
if err := k .press (string (c ), opts ); err != nil {
238
- return err
238
+ return fmt . Errorf ( "cannot press: %w" , err )
239
239
}
240
240
continue
241
241
}
242
242
if err := k .insertText (string (c )); err != nil {
243
- return err
243
+ return fmt . Errorf ( "cannot insert text: %w" , err )
244
244
}
245
245
}
246
246
return nil
You can’t perform that action at this time.
0 commit comments