feat(mock): record LongPress action

This commit is contained in:
pj committed 2026-05-31 18:01:38 +05:30
1 parent fc54e86b17
commit ecaae817a0
1 file changed
+9
+9
View File
@@ -18,6 +18,7 @@ const (
ActionInputText ActionKind = "input_text"
ActionSwipe ActionKind = "swipe"
ActionPressKey ActionKind = "press_key"
ActionLongPress ActionKind = "long_press"
ActionHierarchy ActionKind = "hierarchy"
ActionScreenshot ActionKind = "screenshot"
ActionSnapshot ActionKind = "snapshot"
@@ -166,6 +167,14 @@ func (d *Driver) Tap(ctx context.Context, x, y int) error {
return nil
}
func (d *Driver) LongPress(ctx context.Context, x, y int) error {
if err := d.failure(ActionLongPress); err != nil {
return err
}
d.record(Action{Kind: ActionLongPress, X: x, Y: y})
return nil
}
func (d *Driver) TapSelector(ctx context.Context, selector string) error {
if err := d.failure(ActionTapSelector); err != nil {
return err