feat(spec): add DoubleTap action type and constructor

This commit is contained in:
pj committed 2026-05-30 11:05:44 +05:30
1 parent a9b2b4b4e1
commit 7006e82ca4
3 files changed
+10

No files matched your search

+5
View File
@@ -2,6 +2,7 @@ import type {
AccessibilityElement,
Action,
ActionGenerator,
DoubleTapAction,
InputTextAction,
Key,
Point,
@@ -42,6 +43,10 @@ export function Tap(parameters: { on: string | AccessibilityElement }): TapActio
return globalThis.__sanderling__.tap(parameters);
}
export function DoubleTap(parameters: { on: string | AccessibilityElement }): DoubleTapAction {
return globalThis.__sanderling__.doubleTap(parameters);
}
export function InputText(parameters: {
into: string | AccessibilityElement;
text: string;
+2
View File
@@ -4,6 +4,7 @@ export type {
Action,
ActionGenerator,
AttrSelector,
DoubleTapAction,
EventuallyFormula,
ExceptionRecord,
Extracted,
@@ -30,6 +31,7 @@ export type {
export { extract, keyedBy } from "./extract.ts";
export { always, eventually, next, now } from "./ltl.ts";
export {
DoubleTap,
InputText,
PressKey,
Swipe,
+3
View File
@@ -133,6 +133,7 @@ export interface Point {
}
export type TapAction = { kind: "Tap"; on: string | AccessibilityElement };
export type DoubleTapAction = { kind: "DoubleTap"; on: string | AccessibilityElement };
export type InputTextAction = {
kind: "InputText";
into: string | AccessibilityElement;
@@ -148,6 +149,7 @@ export type PressKeyAction = { kind: "PressKey"; key: Key };
export type WaitAction = { kind: "Wait"; durationMillis: number };
export type Action =
| TapAction
| DoubleTapAction
| InputTextAction
| SwipeAction
| PressKeyAction
@@ -194,6 +196,7 @@ export interface SanderlingRuntime {
weighted: (...entries: WeightedEntry[]) => ActionGenerator;
from: <T>(items: readonly T[]) => Sampler<T>;
tap: (parameters: { on: string | AccessibilityElement }) => TapAction;
doubleTap: (parameters: { on: string | AccessibilityElement }) => DoubleTapAction;
inputText: (parameters: {
into: string | AccessibilityElement;
text: string;