@allwright.dev/core 0.0.1
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/LICENSE +21 -0
- package/README.md +336 -0
- package/package.json +53 -0
- package/proto/core/v1/browser.proto +55 -0
- package/proto/core/v1/common.proto +15 -0
- package/proto/core/v1/tab.proto +72 -0
- package/proto/engine/v1/engine.proto +14 -0
- package/proto/surfaces/web/v1/web.proto +150 -0
- package/typescript/dist/index.d.ts +408 -0
- package/typescript/dist/index.js +690 -0
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package allwright.engine.v1;
|
|
4
|
+
option go_package = "allwright.dev/gen/allwright/engine/v1;enginev1";
|
|
5
|
+
|
|
6
|
+
import "core/v1/common.proto";
|
|
7
|
+
|
|
8
|
+
message LaunchChromeCommand {
|
|
9
|
+
optional string chrome_binary = 1;
|
|
10
|
+
optional CommandRetryOptions retry_options = 2;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
message ChromeLaunchedEvent {
|
|
14
|
+
string browser = 1;
|
|
15
|
+
string note = 2;
|
|
16
|
+
string cdp_websocket_url = 3;
|
|
17
|
+
string user_data_dir = 4;
|
|
18
|
+
string initial_tab_session_id = 5;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
message NavigateTabCommand {
|
|
22
|
+
string url = 1;
|
|
23
|
+
optional CommandRetryOptions retry_options = 2;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
message ClickElementCommand {
|
|
27
|
+
string css_selector = 1;
|
|
28
|
+
optional CommandRetryOptions retry_options = 2;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
message CountElementsCommand {
|
|
32
|
+
string css_selector = 1;
|
|
33
|
+
optional CommandRetryOptions retry_options = 2;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
message HighlightElementsCommand {
|
|
37
|
+
string css_selector = 1;
|
|
38
|
+
optional uint32 duration_ms = 2;
|
|
39
|
+
optional CommandRetryOptions retry_options = 3;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
message FocusElementCommand {
|
|
43
|
+
string css_selector = 1;
|
|
44
|
+
optional CommandRetryOptions retry_options = 2;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
message FillElementCommand {
|
|
48
|
+
string css_selector = 1;
|
|
49
|
+
string value = 2;
|
|
50
|
+
optional CommandRetryOptions retry_options = 3;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
message HoverElementCommand {
|
|
54
|
+
string css_selector = 1;
|
|
55
|
+
optional CommandRetryOptions retry_options = 2;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
message PressKeyCommand {
|
|
59
|
+
string css_selector = 1;
|
|
60
|
+
string key = 2;
|
|
61
|
+
optional string text = 3;
|
|
62
|
+
optional CommandRetryOptions retry_options = 4;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
message GetTextContentCommand {
|
|
66
|
+
string css_selector = 1;
|
|
67
|
+
optional CommandRetryOptions retry_options = 2;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
message GetInnerTextCommand {
|
|
71
|
+
string css_selector = 1;
|
|
72
|
+
optional CommandRetryOptions retry_options = 2;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
message WaitForSelectorCommand {
|
|
76
|
+
string css_selector = 1;
|
|
77
|
+
optional bool visible = 2;
|
|
78
|
+
optional CommandRetryOptions retry_options = 3;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
message TabNavigatedEvent {
|
|
82
|
+
string url = 1;
|
|
83
|
+
string note = 2;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
message ChromiumBidiInjectionEvent {
|
|
87
|
+
string note = 1;
|
|
88
|
+
string bidi_session_id = 2;
|
|
89
|
+
string mapper_target_id = 3;
|
|
90
|
+
string mapper_session_id = 4;
|
|
91
|
+
string package_version = 5;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
message ElementClickedEvent {
|
|
95
|
+
string css_selector = 1;
|
|
96
|
+
string note = 2;
|
|
97
|
+
string bidi_session_id = 3;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
message ElementCountedEvent {
|
|
101
|
+
string css_selector = 1;
|
|
102
|
+
uint32 count = 2;
|
|
103
|
+
string note = 3;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
message ElementsHighlightedEvent {
|
|
107
|
+
string css_selector = 1;
|
|
108
|
+
uint32 count = 2;
|
|
109
|
+
string note = 3;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
message ElementFocusedEvent {
|
|
113
|
+
string css_selector = 1;
|
|
114
|
+
string note = 2;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
message ElementFilledEvent {
|
|
118
|
+
string css_selector = 1;
|
|
119
|
+
string value = 2;
|
|
120
|
+
string note = 3;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
message ElementHoveredEvent {
|
|
124
|
+
string css_selector = 1;
|
|
125
|
+
string note = 2;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
message KeyPressedEvent {
|
|
129
|
+
string css_selector = 1;
|
|
130
|
+
string key = 2;
|
|
131
|
+
string note = 3;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
message TextContentResolvedEvent {
|
|
135
|
+
string css_selector = 1;
|
|
136
|
+
string text = 2;
|
|
137
|
+
string note = 3;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
message InnerTextResolvedEvent {
|
|
141
|
+
string css_selector = 1;
|
|
142
|
+
string text = 2;
|
|
143
|
+
string note = 3;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
message SelectorWaitSatisfiedEvent {
|
|
147
|
+
string css_selector = 1;
|
|
148
|
+
bool visible = 2;
|
|
149
|
+
string note = 3;
|
|
150
|
+
}
|
|
@@ -0,0 +1,408 @@
|
|
|
1
|
+
import grpc from "@grpc/grpc-js";
|
|
2
|
+
export interface LaunchOptions {
|
|
3
|
+
chromeBinary?: string;
|
|
4
|
+
timeoutMs?: number;
|
|
5
|
+
}
|
|
6
|
+
export interface CommandOptions {
|
|
7
|
+
timeoutMs?: number;
|
|
8
|
+
}
|
|
9
|
+
export interface NavigateResult {
|
|
10
|
+
url: string;
|
|
11
|
+
note: string;
|
|
12
|
+
bidiSessionId: string;
|
|
13
|
+
mapperTargetId: string;
|
|
14
|
+
mapperSessionId: string;
|
|
15
|
+
packageVersion: string;
|
|
16
|
+
}
|
|
17
|
+
export interface ClickResult {
|
|
18
|
+
selector: string;
|
|
19
|
+
note: string;
|
|
20
|
+
bidiSessionId: string;
|
|
21
|
+
}
|
|
22
|
+
export interface CountResult {
|
|
23
|
+
selector: string;
|
|
24
|
+
count: number;
|
|
25
|
+
note: string;
|
|
26
|
+
}
|
|
27
|
+
export interface HighlightOptions {
|
|
28
|
+
timeoutMs?: number;
|
|
29
|
+
durationMs?: number;
|
|
30
|
+
}
|
|
31
|
+
export interface HighlightResult {
|
|
32
|
+
selector: string;
|
|
33
|
+
count: number;
|
|
34
|
+
note: string;
|
|
35
|
+
}
|
|
36
|
+
export interface ElementResult {
|
|
37
|
+
selector: string;
|
|
38
|
+
note: string;
|
|
39
|
+
}
|
|
40
|
+
export interface FillResult {
|
|
41
|
+
selector: string;
|
|
42
|
+
value: string;
|
|
43
|
+
note: string;
|
|
44
|
+
}
|
|
45
|
+
export interface PressOptions {
|
|
46
|
+
timeoutMs?: number;
|
|
47
|
+
text?: string;
|
|
48
|
+
}
|
|
49
|
+
export interface PressResult {
|
|
50
|
+
selector: string;
|
|
51
|
+
key: string;
|
|
52
|
+
note: string;
|
|
53
|
+
}
|
|
54
|
+
export interface TextResult {
|
|
55
|
+
selector: string;
|
|
56
|
+
text: string;
|
|
57
|
+
note: string;
|
|
58
|
+
}
|
|
59
|
+
export interface WaitForSelectorOptions {
|
|
60
|
+
timeoutMs?: number;
|
|
61
|
+
visible?: boolean;
|
|
62
|
+
}
|
|
63
|
+
export interface WaitForSelectorResult {
|
|
64
|
+
selector: string;
|
|
65
|
+
visible: boolean;
|
|
66
|
+
note: string;
|
|
67
|
+
}
|
|
68
|
+
export interface BrowserInfo {
|
|
69
|
+
sessionId: string;
|
|
70
|
+
browserName: string;
|
|
71
|
+
launchNote: string;
|
|
72
|
+
cdpWebSocketURL: string;
|
|
73
|
+
userDataDir: string;
|
|
74
|
+
}
|
|
75
|
+
export interface PageInfo {
|
|
76
|
+
sessionId: string;
|
|
77
|
+
browserSessionId: string;
|
|
78
|
+
}
|
|
79
|
+
interface PingResponse {
|
|
80
|
+
message?: string;
|
|
81
|
+
}
|
|
82
|
+
interface ChromeLaunchedPayload {
|
|
83
|
+
browser?: string;
|
|
84
|
+
note?: string;
|
|
85
|
+
cdpWebsocketUrl?: string;
|
|
86
|
+
userDataDir?: string;
|
|
87
|
+
initialTabSessionId?: string;
|
|
88
|
+
}
|
|
89
|
+
interface BrowserSessionEvent {
|
|
90
|
+
sessionId?: string;
|
|
91
|
+
event?: string;
|
|
92
|
+
chromeLaunched?: ChromeLaunchedPayload;
|
|
93
|
+
tabOpened?: {
|
|
94
|
+
tabSessionId?: string;
|
|
95
|
+
note?: string;
|
|
96
|
+
};
|
|
97
|
+
pong?: {
|
|
98
|
+
message?: string;
|
|
99
|
+
};
|
|
100
|
+
closed?: {
|
|
101
|
+
reason?: string;
|
|
102
|
+
};
|
|
103
|
+
error?: {
|
|
104
|
+
message?: string;
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
interface TabSessionEvent {
|
|
108
|
+
tabSessionId?: string;
|
|
109
|
+
event?: string;
|
|
110
|
+
attached?: {
|
|
111
|
+
note?: string;
|
|
112
|
+
};
|
|
113
|
+
pong?: {
|
|
114
|
+
message?: string;
|
|
115
|
+
};
|
|
116
|
+
closed?: {
|
|
117
|
+
reason?: string;
|
|
118
|
+
};
|
|
119
|
+
error?: {
|
|
120
|
+
message?: string;
|
|
121
|
+
};
|
|
122
|
+
navigated?: {
|
|
123
|
+
url?: string;
|
|
124
|
+
note?: string;
|
|
125
|
+
};
|
|
126
|
+
chromiumBidiInjection?: {
|
|
127
|
+
note?: string;
|
|
128
|
+
bidiSessionId?: string;
|
|
129
|
+
mapperTargetId?: string;
|
|
130
|
+
mapperSessionId?: string;
|
|
131
|
+
packageVersion?: string;
|
|
132
|
+
};
|
|
133
|
+
elementClicked?: {
|
|
134
|
+
cssSelector?: string;
|
|
135
|
+
note?: string;
|
|
136
|
+
bidiSessionId?: string;
|
|
137
|
+
};
|
|
138
|
+
elementCounted?: {
|
|
139
|
+
cssSelector?: string;
|
|
140
|
+
count?: number;
|
|
141
|
+
note?: string;
|
|
142
|
+
};
|
|
143
|
+
elementsHighlighted?: {
|
|
144
|
+
cssSelector?: string;
|
|
145
|
+
count?: number;
|
|
146
|
+
note?: string;
|
|
147
|
+
};
|
|
148
|
+
elementFocused?: {
|
|
149
|
+
cssSelector?: string;
|
|
150
|
+
note?: string;
|
|
151
|
+
};
|
|
152
|
+
elementFilled?: {
|
|
153
|
+
cssSelector?: string;
|
|
154
|
+
value?: string;
|
|
155
|
+
note?: string;
|
|
156
|
+
};
|
|
157
|
+
elementHovered?: {
|
|
158
|
+
cssSelector?: string;
|
|
159
|
+
note?: string;
|
|
160
|
+
};
|
|
161
|
+
keyPressed?: {
|
|
162
|
+
cssSelector?: string;
|
|
163
|
+
key?: string;
|
|
164
|
+
note?: string;
|
|
165
|
+
};
|
|
166
|
+
textContentResolved?: {
|
|
167
|
+
cssSelector?: string;
|
|
168
|
+
text?: string;
|
|
169
|
+
note?: string;
|
|
170
|
+
};
|
|
171
|
+
innerTextResolved?: {
|
|
172
|
+
cssSelector?: string;
|
|
173
|
+
text?: string;
|
|
174
|
+
note?: string;
|
|
175
|
+
};
|
|
176
|
+
selectorWaitSatisfied?: {
|
|
177
|
+
cssSelector?: string;
|
|
178
|
+
visible?: boolean;
|
|
179
|
+
note?: string;
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
interface LaunchChromeRequest {
|
|
183
|
+
launchChrome: {
|
|
184
|
+
chromeBinary?: string;
|
|
185
|
+
retryOptions?: {
|
|
186
|
+
timeoutMs?: number;
|
|
187
|
+
};
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
interface OpenTabRequest {
|
|
191
|
+
openTab: {
|
|
192
|
+
retryOptions?: {
|
|
193
|
+
timeoutMs?: number;
|
|
194
|
+
};
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
interface BrowserPingRequest {
|
|
198
|
+
ping: {
|
|
199
|
+
message: string;
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
interface CloseBrowserRequest {
|
|
203
|
+
close: Record<string, never>;
|
|
204
|
+
}
|
|
205
|
+
interface TabPingRequest {
|
|
206
|
+
browserSessionId: string;
|
|
207
|
+
tabSessionId: string;
|
|
208
|
+
ping: {
|
|
209
|
+
message: string;
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
interface NavigateRequest {
|
|
213
|
+
browserSessionId: string;
|
|
214
|
+
tabSessionId: string;
|
|
215
|
+
navigate: {
|
|
216
|
+
url: string;
|
|
217
|
+
retryOptions?: {
|
|
218
|
+
timeoutMs?: number;
|
|
219
|
+
};
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
interface ClickRequest {
|
|
223
|
+
browserSessionId: string;
|
|
224
|
+
tabSessionId: string;
|
|
225
|
+
clickElement: {
|
|
226
|
+
cssSelector: string;
|
|
227
|
+
retryOptions?: {
|
|
228
|
+
timeoutMs?: number;
|
|
229
|
+
};
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
interface CountRequest {
|
|
233
|
+
browserSessionId: string;
|
|
234
|
+
tabSessionId: string;
|
|
235
|
+
countElements: {
|
|
236
|
+
cssSelector: string;
|
|
237
|
+
retryOptions?: {
|
|
238
|
+
timeoutMs?: number;
|
|
239
|
+
};
|
|
240
|
+
};
|
|
241
|
+
}
|
|
242
|
+
interface HighlightRequest {
|
|
243
|
+
browserSessionId: string;
|
|
244
|
+
tabSessionId: string;
|
|
245
|
+
highlightElements: {
|
|
246
|
+
cssSelector: string;
|
|
247
|
+
durationMs?: number;
|
|
248
|
+
retryOptions?: {
|
|
249
|
+
timeoutMs?: number;
|
|
250
|
+
};
|
|
251
|
+
};
|
|
252
|
+
}
|
|
253
|
+
interface FocusRequest {
|
|
254
|
+
browserSessionId: string;
|
|
255
|
+
tabSessionId: string;
|
|
256
|
+
focusElement: {
|
|
257
|
+
cssSelector: string;
|
|
258
|
+
retryOptions?: {
|
|
259
|
+
timeoutMs?: number;
|
|
260
|
+
};
|
|
261
|
+
};
|
|
262
|
+
}
|
|
263
|
+
interface FillRequest {
|
|
264
|
+
browserSessionId: string;
|
|
265
|
+
tabSessionId: string;
|
|
266
|
+
fillElement: {
|
|
267
|
+
cssSelector: string;
|
|
268
|
+
value: string;
|
|
269
|
+
retryOptions?: {
|
|
270
|
+
timeoutMs?: number;
|
|
271
|
+
};
|
|
272
|
+
};
|
|
273
|
+
}
|
|
274
|
+
interface HoverRequest {
|
|
275
|
+
browserSessionId: string;
|
|
276
|
+
tabSessionId: string;
|
|
277
|
+
hoverElement: {
|
|
278
|
+
cssSelector: string;
|
|
279
|
+
retryOptions?: {
|
|
280
|
+
timeoutMs?: number;
|
|
281
|
+
};
|
|
282
|
+
};
|
|
283
|
+
}
|
|
284
|
+
interface PressRequest {
|
|
285
|
+
browserSessionId: string;
|
|
286
|
+
tabSessionId: string;
|
|
287
|
+
pressKey: {
|
|
288
|
+
cssSelector: string;
|
|
289
|
+
key: string;
|
|
290
|
+
text?: string;
|
|
291
|
+
retryOptions?: {
|
|
292
|
+
timeoutMs?: number;
|
|
293
|
+
};
|
|
294
|
+
};
|
|
295
|
+
}
|
|
296
|
+
interface TextContentRequest {
|
|
297
|
+
browserSessionId: string;
|
|
298
|
+
tabSessionId: string;
|
|
299
|
+
getTextContent: {
|
|
300
|
+
cssSelector: string;
|
|
301
|
+
retryOptions?: {
|
|
302
|
+
timeoutMs?: number;
|
|
303
|
+
};
|
|
304
|
+
};
|
|
305
|
+
}
|
|
306
|
+
interface InnerTextRequest {
|
|
307
|
+
browserSessionId: string;
|
|
308
|
+
tabSessionId: string;
|
|
309
|
+
getInnerText: {
|
|
310
|
+
cssSelector: string;
|
|
311
|
+
retryOptions?: {
|
|
312
|
+
timeoutMs?: number;
|
|
313
|
+
};
|
|
314
|
+
};
|
|
315
|
+
}
|
|
316
|
+
interface WaitForSelectorRequest {
|
|
317
|
+
browserSessionId: string;
|
|
318
|
+
tabSessionId: string;
|
|
319
|
+
waitForSelector: {
|
|
320
|
+
cssSelector: string;
|
|
321
|
+
visible?: boolean;
|
|
322
|
+
retryOptions?: {
|
|
323
|
+
timeoutMs?: number;
|
|
324
|
+
};
|
|
325
|
+
};
|
|
326
|
+
}
|
|
327
|
+
interface CloseTabRequest {
|
|
328
|
+
browserSessionId: string;
|
|
329
|
+
tabSessionId: string;
|
|
330
|
+
close: Record<string, never>;
|
|
331
|
+
}
|
|
332
|
+
type BrowserSessionRequest = LaunchChromeRequest | OpenTabRequest | BrowserPingRequest | CloseBrowserRequest;
|
|
333
|
+
type TabSessionRequest = TabPingRequest | NavigateRequest | ClickRequest | CountRequest | HighlightRequest | FocusRequest | FillRequest | HoverRequest | PressRequest | TextContentRequest | InnerTextRequest | WaitForSelectorRequest | CloseTabRequest;
|
|
334
|
+
type BrowserSessionStream = grpc.ClientDuplexStream<BrowserSessionRequest, BrowserSessionEvent>;
|
|
335
|
+
type PageSessionStream = grpc.ClientDuplexStream<TabSessionRequest, TabSessionEvent>;
|
|
336
|
+
interface EngineServiceClientShape {
|
|
337
|
+
Ping(request: Record<string, never>, callback: (error: grpc.ServiceError | null, response: PingResponse) => void): void;
|
|
338
|
+
BrowserSession(): BrowserSessionStream;
|
|
339
|
+
TabSession(): PageSessionStream;
|
|
340
|
+
close(): void;
|
|
341
|
+
}
|
|
342
|
+
interface RuntimeClient {
|
|
343
|
+
client: EngineServiceClientShape;
|
|
344
|
+
}
|
|
345
|
+
interface BrowserLaunchState {
|
|
346
|
+
runtime: RuntimeClient;
|
|
347
|
+
stream: BrowserSessionStream;
|
|
348
|
+
queue: EventQueue<BrowserSessionEvent>;
|
|
349
|
+
sessionId: string;
|
|
350
|
+
chromeLaunched: ChromeLaunchedPayload;
|
|
351
|
+
}
|
|
352
|
+
declare class EventQueue<T> {
|
|
353
|
+
#private;
|
|
354
|
+
push(item: T): void;
|
|
355
|
+
fail(error: Error): void;
|
|
356
|
+
next(): Promise<T>;
|
|
357
|
+
}
|
|
358
|
+
export declare class BrowserType {
|
|
359
|
+
launch(options?: LaunchOptions): Promise<Browser>;
|
|
360
|
+
}
|
|
361
|
+
export declare class Browser {
|
|
362
|
+
#private;
|
|
363
|
+
constructor(state: BrowserLaunchState);
|
|
364
|
+
readonly sessionId: string;
|
|
365
|
+
readonly browserName: string;
|
|
366
|
+
readonly launchNote: string;
|
|
367
|
+
readonly cdpWebSocketURL: string;
|
|
368
|
+
readonly userDataDir: string;
|
|
369
|
+
page(): Page;
|
|
370
|
+
initialPage(): Page;
|
|
371
|
+
pages(): Page[];
|
|
372
|
+
newPage(options?: CommandOptions): Promise<Page>;
|
|
373
|
+
close(): Promise<void>;
|
|
374
|
+
ping(message?: string): Promise<string>;
|
|
375
|
+
browserInfo(): BrowserInfo;
|
|
376
|
+
initialTab(): Page;
|
|
377
|
+
newTab(options?: CommandOptions): Promise<Page>;
|
|
378
|
+
}
|
|
379
|
+
export declare class Page {
|
|
380
|
+
#private;
|
|
381
|
+
constructor(input: PageInfo & {
|
|
382
|
+
runtime: RuntimeClient;
|
|
383
|
+
});
|
|
384
|
+
readonly sessionId: string;
|
|
385
|
+
readonly browserSessionId: string;
|
|
386
|
+
goto(url: string, options?: CommandOptions): Promise<NavigateResult>;
|
|
387
|
+
click(selector: string, options?: CommandOptions): Promise<ClickResult>;
|
|
388
|
+
count(selector: string, options?: CommandOptions): Promise<CountResult>;
|
|
389
|
+
highlight(selector: string, options?: HighlightOptions): Promise<HighlightResult>;
|
|
390
|
+
focus(selector: string, options?: CommandOptions): Promise<ElementResult>;
|
|
391
|
+
fill(selector: string, value: string, options?: CommandOptions): Promise<FillResult>;
|
|
392
|
+
hover(selector: string, options?: CommandOptions): Promise<ElementResult>;
|
|
393
|
+
press(selector: string, key: string, options?: PressOptions): Promise<PressResult>;
|
|
394
|
+
textContent(selector: string, options?: CommandOptions): Promise<TextResult>;
|
|
395
|
+
innerText(selector: string, options?: CommandOptions): Promise<TextResult>;
|
|
396
|
+
waitForSelector(selector: string, options?: WaitForSelectorOptions): Promise<WaitForSelectorResult>;
|
|
397
|
+
close(): Promise<void>;
|
|
398
|
+
ping(message?: string): Promise<string>;
|
|
399
|
+
pageInfo(): PageInfo;
|
|
400
|
+
navigate(url: string, options?: CommandOptions): Promise<NavigateResult>;
|
|
401
|
+
}
|
|
402
|
+
export declare const chromium: BrowserType;
|
|
403
|
+
export type Tab = Page;
|
|
404
|
+
export declare function ping(): Promise<string>;
|
|
405
|
+
export declare function launchChrome(options?: LaunchOptions): Promise<Browser>;
|
|
406
|
+
export declare function setServerAddr(serverAddr: string): void;
|
|
407
|
+
export declare function shutdown(): Promise<void>;
|
|
408
|
+
export {};
|