forked from stablyai/orca
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbrowser-handler-groups.ts
More file actions
119 lines (118 loc) · 2.88 KB
/
Copy pathbrowser-handler-groups.ts
File metadata and controls
119 lines (118 loc) · 2.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
import type { HandlerGroup } from './handler-group-manifest'
// Why split out: the browser command surface is a third of the CLI's groups and
// changes as a unit, so it keeps handler-group-manifest.ts readable at a glance.
export const BROWSER_HANDLER_GROUPS: readonly HandlerGroup[] = [
{
name: 'browser-nav',
keys: [
'snapshot',
'screenshot',
'goto',
'back',
'reload',
'forward',
'eval',
'scroll',
'wait',
'pdf',
'full-screenshot'
],
load: async () => (await import('./handlers/browser-nav.js')).BROWSER_NAV_HANDLERS
},
{
name: 'browser-interact',
keys: [
'click',
'dblclick',
'fill',
'type',
'select',
'check',
'uncheck',
'focus',
'clear',
'select-all',
'keypress',
'hover',
'drag',
'upload',
'scrollintoview',
'get',
'is',
'inserttext',
'mouse move',
'mouse down',
'mouse up',
'mouse wheel',
'find',
'download',
'highlight'
],
load: async () => (await import('./handlers/browser-interact.js')).BROWSER_INTERACT_HANDLERS
},
{
name: 'browser-tab',
keys: ['tab list', 'tab show', 'tab current', 'tab switch', 'tab create', 'tab close', 'exec'],
load: async () => (await import('./handlers/browser-tab.js')).BROWSER_TAB_HANDLERS
},
{
name: 'browser-profile',
keys: [
'tab profile list',
'tab profile create',
'tab profile delete',
'tab profile set',
'tab profile show',
'tab profile use-default',
'tab profile clone'
],
load: async () => (await import('./handlers/browser-profile.js')).BROWSER_PROFILE_HANDLERS
},
{
name: 'browser-cookie',
keys: ['cookie get', 'cookie set', 'cookie delete'],
load: async () => (await import('./handlers/browser-cookie.js')).BROWSER_COOKIE_HANDLERS
},
{
name: 'browser-capture',
keys: [
'intercept enable',
'intercept disable',
'intercept list',
'capture start',
'capture stop',
'console',
'network'
],
load: async () => (await import('./handlers/browser-capture.js')).BROWSER_CAPTURE_HANDLERS
},
{
name: 'browser-env',
keys: [
'viewport',
'geolocation',
'set device',
'set offline',
'set headers',
'set credentials',
'set media',
'clipboard read',
'clipboard write',
'dialog accept',
'dialog dismiss'
],
load: async () => (await import('./handlers/browser-env.js')).BROWSER_ENV_HANDLERS
},
{
name: 'browser-storage',
keys: [
'storage local get',
'storage local set',
'storage local clear',
'storage session get',
'storage session set',
'storage session clear'
],
load: async () => (await import('./handlers/browser-storage.js')).BROWSER_STORAGE_HANDLERS
}
]