@astur-mobile/core 0.6.0-beta → 0.7.0-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent.d.ts +2 -0
- package/dist/agent.d.ts.map +1 -1
- package/dist/agent.js +90 -24
- package/dist/agent.js.map +1 -1
- package/dist/locator.d.ts +190 -1
- package/dist/locator.d.ts.map +1 -1
- package/dist/locator.js +403 -19
- package/dist/locator.js.map +1 -1
- package/dist/session.d.ts +43 -1
- package/dist/session.d.ts.map +1 -1
- package/dist/session.js +96 -24
- package/dist/session.js.map +1 -1
- package/package.json +2 -2
package/dist/agent.d.ts
CHANGED
|
@@ -15,6 +15,8 @@ export interface NativeAgentClientOptions {
|
|
|
15
15
|
timeout?: number;
|
|
16
16
|
commandTimeout?: number;
|
|
17
17
|
handshakeTimeout?: number;
|
|
18
|
+
/** Per-session secret the agent requires, sent as a bearer credential. */
|
|
19
|
+
token?: string;
|
|
18
20
|
fetchImpl?: typeof fetch;
|
|
19
21
|
}
|
|
20
22
|
export declare function connectNativeAgentClient(options: NativeAgentClientOptions): Promise<NativeAgentClient>;
|
package/dist/agent.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../src/agent.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAEV,wBAAwB,EACxB,0BAA0B,EAE1B,eAAe,EACf,iBAAiB,EACjB,YAAY,EACb,MAAM,wBAAwB,CAAC;AAGhC,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,QAAQ,EAAE,YAAY,CAAC;IAChC,QAAQ,CAAC,IAAI,EAAE,eAAe,CAAC;IAC/B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,OAAO,CAAC,CAAC,SAAS,iBAAiB,EACjC,MAAM,EAAE,CAAC,EACT,MAAM,CAAC,EAAE,w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AE,MAAM,CAAC;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,0EAA0E;IAC1E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,OAAO,KAAK,CAAC;CAC1B;AAYD,wBAAsB,wBAAwB,CAAC,OAAO,EAAE,wBAAwB,GAAG,OAAO,CAAC,iBAAiB,CAAC,CA6B5G;AAED,wBAAgB,4BAA4B,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CA4BrE"}
|
package/dist/agent.js
CHANGED
|
@@ -58,44 +58,94 @@ function createNativeAgentClient(options) {
|
|
|
58
58
|
platform: options.platform,
|
|
59
59
|
commandTimeout: timeout,
|
|
60
60
|
command: async (method, params) => {
|
|
61
|
-
return sendNativeAgentCommand(fetchImpl, endpoint, timeout, method, params);
|
|
61
|
+
return sendNativeAgentCommand(fetchImpl, endpoint, timeout, options.token, method, params);
|
|
62
62
|
}
|
|
63
63
|
};
|
|
64
64
|
}
|
|
65
|
-
async function sendNativeAgentCommand(fetchImpl, endpoint, timeout, method, params) {
|
|
65
|
+
async function sendNativeAgentCommand(fetchImpl, endpoint, timeout, token, method, params) {
|
|
66
66
|
const id = randomUUID();
|
|
67
67
|
const envelope = {
|
|
68
68
|
id,
|
|
69
69
|
protocolVersion: '1.0',
|
|
70
70
|
command: method,
|
|
71
71
|
deadlineMs: Date.now() + timeout,
|
|
72
|
+
budgetMs: timeout,
|
|
72
73
|
payload: params,
|
|
73
74
|
method,
|
|
74
75
|
params
|
|
75
76
|
};
|
|
77
|
+
// One deadline covers the whole exchange: sending, the headers, and reading
|
|
78
|
+
// the body. Clearing the timer once headers arrived used to leave the body
|
|
79
|
+
// read unbounded, so a response trickling in after the timeout still counted.
|
|
76
80
|
const controller = new AbortController();
|
|
77
|
-
|
|
81
|
+
let timer;
|
|
82
|
+
const deadline = new Promise((_resolve, reject) => {
|
|
83
|
+
timer = setTimeout(() => {
|
|
84
|
+
reject(new AsturError('AGENT_COMMAND_TIMEOUT', `Native agent command ${method} got no complete response within ${timeout} ms.`, { endpoint, method, timeout }));
|
|
85
|
+
controller.abort();
|
|
86
|
+
}, timeout);
|
|
87
|
+
});
|
|
88
|
+
// The deadline is always raced; this only keeps a rejection that lands
|
|
89
|
+
// between two races from being reported as unhandled.
|
|
90
|
+
deadline.catch(() => undefined);
|
|
91
|
+
let payload;
|
|
92
|
+
try {
|
|
93
|
+
payload = await Promise.race([
|
|
94
|
+
exchangeNativeAgentCommand(fetchImpl, endpoint, token, method, envelope, controller.signal, deadline),
|
|
95
|
+
deadline
|
|
96
|
+
]);
|
|
97
|
+
}
|
|
98
|
+
finally {
|
|
99
|
+
clearTimeout(timer);
|
|
100
|
+
}
|
|
101
|
+
if (!payload || payload.id !== id) {
|
|
102
|
+
throw new AsturError('AGENT_RESPONSE_MISMATCH', `Native agent command ${method} returned a mismatched command id.`, {
|
|
103
|
+
endpoint,
|
|
104
|
+
method,
|
|
105
|
+
expectedId: id,
|
|
106
|
+
receivedId: payload?.id
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
if (!payload.ok) {
|
|
110
|
+
throw new AsturError(payload.error?.code ?? 'AGENT_COMMAND_FAILED', payload.error?.message ?? `Native agent command ${method} failed.`, {
|
|
111
|
+
endpoint,
|
|
112
|
+
method,
|
|
113
|
+
executed: payload.executed,
|
|
114
|
+
error: payload.error,
|
|
115
|
+
diagnostics: payload.diagnostics,
|
|
116
|
+
timing: payload.timing
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
return (payload.result ?? payload.data);
|
|
120
|
+
}
|
|
121
|
+
async function exchangeNativeAgentCommand(fetchImpl, endpoint, token, method, envelope, signal, deadline) {
|
|
78
122
|
let response;
|
|
79
123
|
try {
|
|
80
124
|
response = await fetchImpl(endpoint, {
|
|
81
125
|
method: 'POST',
|
|
82
126
|
headers: {
|
|
83
|
-
'content-type': 'application/json'
|
|
127
|
+
'content-type': 'application/json',
|
|
128
|
+
...(token ? { authorization: `Bearer ${token}` } : {})
|
|
84
129
|
},
|
|
85
130
|
body: JSON.stringify(envelope),
|
|
86
|
-
signal
|
|
131
|
+
signal
|
|
87
132
|
});
|
|
88
133
|
}
|
|
89
134
|
catch (error) {
|
|
135
|
+
if (signal.aborted) {
|
|
136
|
+
return deadline;
|
|
137
|
+
}
|
|
90
138
|
throw new AsturError('AGENT_TRANSPORT_FAILED', `Native agent command ${method} failed to reach ${endpoint}.`, {
|
|
91
139
|
endpoint,
|
|
92
140
|
method,
|
|
93
|
-
timeout,
|
|
94
141
|
cause: stringifyUnknownError(error)
|
|
95
142
|
});
|
|
96
143
|
}
|
|
97
|
-
|
|
98
|
-
|
|
144
|
+
if (response.status >= 400 && response.status < 500) {
|
|
145
|
+
const refusal = await readRefusal(response);
|
|
146
|
+
if (refusal) {
|
|
147
|
+
throw refusal;
|
|
148
|
+
}
|
|
99
149
|
}
|
|
100
150
|
if (!response.ok) {
|
|
101
151
|
throw new AsturError('AGENT_TRANSPORT_FAILED', `Native agent command ${method} failed with HTTP ${response.status}.`, {
|
|
@@ -105,35 +155,51 @@ async function sendNativeAgentCommand(fetchImpl, endpoint, timeout, method, para
|
|
|
105
155
|
statusText: response.statusText
|
|
106
156
|
});
|
|
107
157
|
}
|
|
108
|
-
let
|
|
158
|
+
let body;
|
|
109
159
|
try {
|
|
110
|
-
|
|
160
|
+
body = await response.text();
|
|
111
161
|
}
|
|
112
162
|
catch (error) {
|
|
113
|
-
|
|
163
|
+
if (signal.aborted) {
|
|
164
|
+
return deadline;
|
|
165
|
+
}
|
|
166
|
+
throw new AsturError('AGENT_TRANSPORT_FAILED', `Native agent command ${method} lost its response from ${endpoint}.`, {
|
|
114
167
|
endpoint,
|
|
115
168
|
method,
|
|
116
169
|
cause: stringifyUnknownError(error)
|
|
117
170
|
});
|
|
118
171
|
}
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
endpoint,
|
|
122
|
-
method,
|
|
123
|
-
expectedId: id,
|
|
124
|
-
receivedId: payload?.id
|
|
125
|
-
});
|
|
172
|
+
try {
|
|
173
|
+
return JSON.parse(body);
|
|
126
174
|
}
|
|
127
|
-
|
|
128
|
-
throw new AsturError(
|
|
175
|
+
catch (error) {
|
|
176
|
+
throw new AsturError('AGENT_RESPONSE_INVALID', `Native agent command ${method} returned invalid JSON.`, {
|
|
129
177
|
endpoint,
|
|
130
178
|
method,
|
|
131
|
-
|
|
132
|
-
diagnostics: payload.diagnostics,
|
|
133
|
-
timing: payload.timing
|
|
179
|
+
cause: stringifyUnknownError(error)
|
|
134
180
|
});
|
|
135
181
|
}
|
|
136
|
-
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* A 4xx that carries the agent's own error envelope is the agent refusing the
|
|
185
|
+
* request before running it (bad token, malformed body), so it is reported
|
|
186
|
+
* under the agent's code instead of as a transport failure of unknown outcome.
|
|
187
|
+
* A 5xx never is: the command may have been partway through.
|
|
188
|
+
*/
|
|
189
|
+
async function readRefusal(response) {
|
|
190
|
+
try {
|
|
191
|
+
const body = JSON.parse(await response.text());
|
|
192
|
+
if (body?.ok === false && body.executed === false && body.error?.code) {
|
|
193
|
+
return new AsturError(body.error.code, body.error.message, {
|
|
194
|
+
status: response.status,
|
|
195
|
+
executed: false
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
catch {
|
|
200
|
+
// Not an agent envelope; fall through to the generic transport failure.
|
|
201
|
+
}
|
|
202
|
+
return undefined;
|
|
137
203
|
}
|
|
138
204
|
function getGlobalFetch() {
|
|
139
205
|
return globalThis.fetch;
|
package/dist/agent.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent.js","sourceRoot":"","sources":["../src/agent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAUzC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"agent.js","sourceRoot":"","sources":["../src/agent.ts"],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,CAAC,IAAI,KAAK,KAAK,CAAC,OAAO,EAAE,CAAC;IAC3C,CAAC;IAED,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC"}
|
package/dist/locator.d.ts
CHANGED
|
@@ -22,6 +22,18 @@ export declare const by: {
|
|
|
22
22
|
type(value: string, options?: {
|
|
23
23
|
exact?: boolean;
|
|
24
24
|
}): ElementSelector;
|
|
25
|
+
/**
|
|
26
|
+
* Placeholder / hint text of an empty input.
|
|
27
|
+
*
|
|
28
|
+
* Neither platform exposes this as a first-class accessibility field, so it
|
|
29
|
+
* is read from the driver's raw attributes where they carry it (`hint` on
|
|
30
|
+
* Android, `placeholderValue` on iOS) and falls back to the element's own
|
|
31
|
+
* value or label when the field is empty — which is how a placeholder
|
|
32
|
+
* surfaces on a field the user has not typed into. See {@link placeholderOf}.
|
|
33
|
+
*/
|
|
34
|
+
placeholder(value: string, options?: {
|
|
35
|
+
exact?: boolean;
|
|
36
|
+
}): ElementSelector;
|
|
25
37
|
xpath(value: string): ElementSelector;
|
|
26
38
|
coordinates(x: number, y: number): Coordinates;
|
|
27
39
|
/**
|
|
@@ -56,10 +68,116 @@ export interface ScrollIntoViewOptions extends WaitOptions {
|
|
|
56
68
|
/** Scrollable region to swipe within. Defaults to the device viewport. */
|
|
57
69
|
container?: MobileLocator;
|
|
58
70
|
}
|
|
71
|
+
/** Narrowing predicate for {@link MobileLocator.filter}. */
|
|
72
|
+
export interface LocatorFilter {
|
|
73
|
+
/** Keep matches whose own text, or any descendant's, contains this. */
|
|
74
|
+
hasText?: string | RegExp;
|
|
75
|
+
/** Drop matches whose own text, or any descendant's, contains this. */
|
|
76
|
+
hasNotText?: string | RegExp;
|
|
77
|
+
/** Keep matches containing at least one element the given locator matches. */
|
|
78
|
+
has?: MobileLocator;
|
|
79
|
+
/** Drop matches containing an element the given locator matches. */
|
|
80
|
+
hasNot?: MobileLocator;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Everything layered on top of a locator's base selector.
|
|
84
|
+
*
|
|
85
|
+
* Held separately rather than folded into {@link ElementSelector} because a
|
|
86
|
+
* selector is the atom the native agents understand. A locator carrying no
|
|
87
|
+
* refinement is still handed to the agent whole, exactly as before; only a
|
|
88
|
+
* refined one is resolved here against a tree snapshot.
|
|
89
|
+
*/
|
|
90
|
+
interface LocatorRefinement {
|
|
91
|
+
/**
|
|
92
|
+
* Start from everything this locator resolves to, instead of the base
|
|
93
|
+
* selector. Set by `and` / `or`, which combine whole locators: the receiver's
|
|
94
|
+
* own filters and position must apply before the combination, not after it.
|
|
95
|
+
*/
|
|
96
|
+
group?: MobileLocator;
|
|
97
|
+
/** Search only within this locator's matches. */
|
|
98
|
+
within?: MobileLocator;
|
|
99
|
+
filters: LocatorFilter[];
|
|
100
|
+
/** Intersected with the base match set. */
|
|
101
|
+
and: MobileLocator[];
|
|
102
|
+
/** Unioned with the base match set. */
|
|
103
|
+
or: MobileLocator[];
|
|
104
|
+
/** Positional narrowing, applied last. Negative counts from the end. */
|
|
105
|
+
index?: number;
|
|
106
|
+
}
|
|
59
107
|
export declare class MobileLocator {
|
|
60
108
|
readonly selector: ElementSelector;
|
|
61
109
|
private readonly session;
|
|
62
|
-
|
|
110
|
+
/** `undefined` for a plain locator — the fast path that reaches the agent untouched. */
|
|
111
|
+
private readonly refinement?;
|
|
112
|
+
constructor(session: PlatformSession, selector: ElementSelector, refinement?: LocatorRefinement);
|
|
113
|
+
/**
|
|
114
|
+
* True when this locator can be handed to a driver as its bare selector.
|
|
115
|
+
*
|
|
116
|
+
* Every action checks this before taking a driver's element fast path: those
|
|
117
|
+
* take an {@link ElementSelector}, which cannot carry a refinement, so a
|
|
118
|
+
* refined locator has to resolve here and act on the resulting coordinates.
|
|
119
|
+
*
|
|
120
|
+
* `by.type('any')` resolves here too. It is a wildcard only this tree matcher
|
|
121
|
+
* implements; the native agents read it as a literal type named "any" and
|
|
122
|
+
* find nothing. It also selects the whole tree, which one tree read answers
|
|
123
|
+
* more cheaply than an agent serialising every node on its own.
|
|
124
|
+
*/
|
|
125
|
+
private get isPlain();
|
|
126
|
+
private derive;
|
|
127
|
+
/** Scope a child lookup to this locator's matches. */
|
|
128
|
+
private scoped;
|
|
129
|
+
locator(selector: ElementSelector): MobileLocator;
|
|
130
|
+
getByLabel(value: string, options?: {
|
|
131
|
+
exact?: boolean;
|
|
132
|
+
}): MobileLocator;
|
|
133
|
+
getByA11y(value: string, options?: {
|
|
134
|
+
exact?: boolean;
|
|
135
|
+
}): MobileLocator;
|
|
136
|
+
getByText(value: string, options?: {
|
|
137
|
+
exact?: boolean;
|
|
138
|
+
}): MobileLocator;
|
|
139
|
+
getByTestId(value: string, options?: {
|
|
140
|
+
exact?: boolean;
|
|
141
|
+
}): MobileLocator;
|
|
142
|
+
getById(value: string, options?: {
|
|
143
|
+
exact?: boolean;
|
|
144
|
+
}): MobileLocator;
|
|
145
|
+
getByRole(role: MobileRole | string, options?: RoleSelectorOptions): MobileLocator;
|
|
146
|
+
getByType(value: string, options?: {
|
|
147
|
+
exact?: boolean;
|
|
148
|
+
}): MobileLocator;
|
|
149
|
+
getByPlaceholder(value: string, options?: {
|
|
150
|
+
exact?: boolean;
|
|
151
|
+
}): MobileLocator;
|
|
152
|
+
/**
|
|
153
|
+
* Narrow a locator that matches several elements.
|
|
154
|
+
*
|
|
155
|
+
* ```ts
|
|
156
|
+
* device.getByType('Cell').filter({ hasText: 'In stock' })
|
|
157
|
+
* ```
|
|
158
|
+
*
|
|
159
|
+
* Repeated calls stack: every filter must pass.
|
|
160
|
+
*/
|
|
161
|
+
filter(filter: LocatorFilter): MobileLocator;
|
|
162
|
+
/**
|
|
163
|
+
* Match elements this locator and `other` both match.
|
|
164
|
+
*
|
|
165
|
+
* Both sides are taken whole, so `a.filter(f).and(b)` filters only `a`, and
|
|
166
|
+
* anything chained afterwards applies to the intersection.
|
|
167
|
+
*/
|
|
168
|
+
and(other: MobileLocator): MobileLocator;
|
|
169
|
+
/**
|
|
170
|
+
* Match elements either this locator or `other` matches, in document order.
|
|
171
|
+
*
|
|
172
|
+
* Both sides are taken whole, so `a.filter(f).or(b)` filters only `a`, and
|
|
173
|
+
* anything chained afterwards applies to the union.
|
|
174
|
+
*/
|
|
175
|
+
or(other: MobileLocator): MobileLocator;
|
|
176
|
+
private combine;
|
|
177
|
+
first(): MobileLocator;
|
|
178
|
+
last(): MobileLocator;
|
|
179
|
+
/** Match at `index`; negative counts from the end, so `-1` is the last. */
|
|
180
|
+
nth(index: number): MobileLocator;
|
|
63
181
|
tap(options?: WaitOptions & TapOptions): Promise<void>;
|
|
64
182
|
doubleTap(options?: WaitOptions & DoubleTapOptions): Promise<void>;
|
|
65
183
|
longPress(options?: WaitOptions & LongPressOptions): Promise<void>;
|
|
@@ -85,6 +203,22 @@ export declare class MobileLocator {
|
|
|
85
203
|
*/
|
|
86
204
|
private settleAfterScroll;
|
|
87
205
|
private currentMatch;
|
|
206
|
+
/**
|
|
207
|
+
* A plain locator addressing the same element, when the element can be named
|
|
208
|
+
* on its own.
|
|
209
|
+
*
|
|
210
|
+
* A composed locator cannot be handed to a driver, because the drivers take
|
|
211
|
+
* an {@link ElementSelector} and a refinement does not fit in one. Falling
|
|
212
|
+
* straight to coordinates would work for pointer actions but quietly lose
|
|
213
|
+
* everything else the drivers do — clearing a field before typing, waiting
|
|
214
|
+
* on the IME, honouring per-element options. So before giving up on the fast
|
|
215
|
+
* path, check whether the resolved element happens to be uniquely
|
|
216
|
+
* identifiable by an id, label, or text of its own. In a list of look-alike
|
|
217
|
+
* rows nothing will be unique and this returns `undefined`; for the far more
|
|
218
|
+
* common "the field inside that section" it succeeds, and the composed
|
|
219
|
+
* locator then behaves exactly like a plain one.
|
|
220
|
+
*/
|
|
221
|
+
private plainEquivalent;
|
|
88
222
|
private scrollRegion;
|
|
89
223
|
fill(value: string, options?: WaitOptions & ElementFillOptions): Promise<void>;
|
|
90
224
|
isVisible(options?: WaitOptions): Promise<boolean>;
|
|
@@ -94,7 +228,26 @@ export declare class MobileLocator {
|
|
|
94
228
|
waitForSnapshot(predicate?: (snapshot: MobileElementSnapshot) => boolean, options?: WaitOptions): Promise<MobileElementSnapshot>;
|
|
95
229
|
snapshot(options?: WaitOptions): Promise<MobileElementSnapshot>;
|
|
96
230
|
all(options?: WaitOptions): Promise<MobileElementSnapshot[]>;
|
|
231
|
+
/**
|
|
232
|
+
* The element this locator resolves to right now, or `undefined` when it is
|
|
233
|
+
* absent. It never waits, and a failed read throws instead of reading as
|
|
234
|
+
* "absent": a caller that retries has to be able to tell the two apart.
|
|
235
|
+
*/
|
|
236
|
+
query(): Promise<MobileElementSnapshot | undefined>;
|
|
237
|
+
/** The session default applied when a wait passes no `timeout`. */
|
|
238
|
+
get defaultTimeout(): number;
|
|
97
239
|
queryAll(): Promise<MobileElementSnapshot[]>;
|
|
240
|
+
/**
|
|
241
|
+
* Resolve selector + refinement against one tree snapshot.
|
|
242
|
+
*
|
|
243
|
+
* Order matters and mirrors how the API reads left to right: scope, then the
|
|
244
|
+
* base match, then set combination, then filters, then position. `nth` last
|
|
245
|
+
* is what makes `.filter(...).first()` mean "first of the filtered set"
|
|
246
|
+
* rather than "the first match, if it survives the filter".
|
|
247
|
+
*/
|
|
248
|
+
/** @internal — module-level helpers resolve nested locators through this. */
|
|
249
|
+
resolveAgainst(tree: MobileElementSnapshot, order: Map<MobileElementSnapshot, number>): MobileElementSnapshot[];
|
|
250
|
+
private passesFilter;
|
|
98
251
|
waitFor(options?: WaitOptions & {
|
|
99
252
|
state?: 'visible' | 'hidden' | 'attached';
|
|
100
253
|
}): Promise<void>;
|
|
@@ -123,11 +276,46 @@ export declare class MobileLocator {
|
|
|
123
276
|
isDisabled(options?: WaitOptions): Promise<boolean>;
|
|
124
277
|
isSelected(options?: WaitOptions): Promise<boolean>;
|
|
125
278
|
isFocused(options?: WaitOptions): Promise<boolean>;
|
|
279
|
+
/**
|
|
280
|
+
* Checked state of a checkbox, switch, radio, or toggle.
|
|
281
|
+
*
|
|
282
|
+
* Throws rather than returning `false` when the element reports no checked
|
|
283
|
+
* state at all — "this is not a checkable control" is a different fact from
|
|
284
|
+
* "it is unchecked", and silently conflating them turns a mis-aimed locator
|
|
285
|
+
* into a passing assertion.
|
|
286
|
+
*/
|
|
287
|
+
isChecked(options?: WaitOptions): Promise<boolean>;
|
|
288
|
+
/** True when the element and everything beneath it carry no text at all. */
|
|
289
|
+
isEmpty(options?: WaitOptions): Promise<boolean>;
|
|
126
290
|
toString(): string;
|
|
127
291
|
}
|
|
128
292
|
export declare function findElement(root: MobileElementSnapshot, selector: ElementSelector): MobileElementSnapshot | undefined;
|
|
129
293
|
export declare function findElements(root: MobileElementSnapshot, selector: ElementSelector): MobileElementSnapshot[];
|
|
130
294
|
export declare function matches(element: MobileElementSnapshot, selector: ElementSelector): boolean;
|
|
295
|
+
/**
|
|
296
|
+
* Placeholder / hint text for an element, or `undefined` when it has none.
|
|
297
|
+
*
|
|
298
|
+
* Read from the driver's raw attributes first, because that is the only place
|
|
299
|
+
* either platform reports it faithfully. The fallback covers the common case
|
|
300
|
+
* the raw attributes miss: an *empty* field whose only visible string is the
|
|
301
|
+
* placeholder, which both platforms surface as the value or the label. A field
|
|
302
|
+
* the user has typed into reports its content there instead, so the fallback is
|
|
303
|
+
* deliberately skipped once `text` is present — otherwise typing into a field
|
|
304
|
+
* would silently change what `getByPlaceholder` matches.
|
|
305
|
+
*/
|
|
306
|
+
export declare function placeholderOf(element: MobileElementSnapshot): string | undefined;
|
|
307
|
+
/**
|
|
308
|
+
* Checked state of a checkbox, switch, radio, or toggle.
|
|
309
|
+
*
|
|
310
|
+
* Prefers the driver's own report. Where a driver does not carry one, the state
|
|
311
|
+
* is derived from the raw attributes and then from the value string the
|
|
312
|
+
* platforms use for toggles (`"1"`, `"true"`, `"on"`). Returns `undefined`
|
|
313
|
+
* rather than `false` when nothing answers, so "this element has no checked
|
|
314
|
+
* state" stays distinguishable from "it is unchecked".
|
|
315
|
+
*/
|
|
316
|
+
export declare function checkedStateOf(element: MobileElementSnapshot): boolean | undefined;
|
|
317
|
+
/** Concatenated text of an element and everything beneath it. */
|
|
318
|
+
export declare function subtreeText(element: MobileElementSnapshot): string;
|
|
131
319
|
export declare function flattenTree(root: MobileElementSnapshot): MobileElementSnapshot[];
|
|
132
320
|
export declare function centerOf(bounds: Bounds): Coordinates;
|
|
133
321
|
export declare function pointInBounds(bounds: Bounds, xRatio: number, yRatio: number): Coordinates;
|
|
@@ -154,4 +342,5 @@ export declare function screenshotGeometry(session: PlatformSession, image: Buff
|
|
|
154
342
|
* them produces a diff that looks like a regression instead of a mismatch.
|
|
155
343
|
*/
|
|
156
344
|
export declare function screenshotKey(session: PlatformSession): Promise<string>;
|
|
345
|
+
export {};
|
|
157
346
|
//# sourceMappingURL=locator.d.ts.map
|
package/dist/locator.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"locator.d.ts","sourceRoot":"","sources":["../src/locator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACrB,MAAM,EACN,WAAW,EACX,gBAAgB,EAEhB,kBAAkB,EAClB,eAAe,EACf,gBAAgB,EAChB,qBAAqB,EACrB,UAAU,EACV,mBAAmB,EAEnB,UAAU,EACX,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAA2D,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AAErG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAkB,KAAK,WAAW,EAAE,MAAM,WAAW,CAAC;AAE7D,eAAO,MAAM,EAAE;iBACA,MAAM,YAAY;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,eAAe;gBAIxD,MAAM,YAAY;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,eAAe;cAIzD,MAAM,YAAY;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,eAAe;kBAInD,MAAM,YAAY;QAAE,KAA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