wisp-schema 0.15.0 → 0.19.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.
- checksums.yaml +4 -4
- data/canary-nouns.json +71 -0
- data/canary-wisp.json +495 -0
- data/lib/wisp-schema.rb +30 -2
- data/nouns.json +23 -177
- data/wisp.json +25 -155
- metadata +33 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e5a7f8e544ab5bf31e4b34c5af1af937b85bd805d7fadfe30f26d0a46ce0eb03
|
|
4
|
+
data.tar.gz: b96f5b664e0d3d6fd37b18f477fe94bef8fbae77681072364458edaf5ee2b6f6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 289a662106f9ca0dd837bbb944da20c08d9b999425e31b34a3fc13020009f08c59da41490dddcf97d70b5f41815f78efaf9bde9bb5f4c909c912dfed727a0797
|
|
7
|
+
data.tar.gz: bcaf5486437ef4f25cb04fc3463fb466ff6f80bdd6a8fab38c81764ca94be149ffa5b17799804e53c84c402487993a29250214072e7c2c1a05279b945e3ba355
|
data/canary-nouns.json
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"definitions": {
|
|
4
|
+
"ui_element": {
|
|
5
|
+
"type": "object",
|
|
6
|
+
"title": "UI Element",
|
|
7
|
+
"description": "Any other UI Element",
|
|
8
|
+
"properties": {
|
|
9
|
+
"type": {
|
|
10
|
+
"enum": ["ui_element"]
|
|
11
|
+
},
|
|
12
|
+
"element": {"title": "Element", "type": "string"},
|
|
13
|
+
"focus_x": {"title": "Focus offset for x-axis from top left corner", "type": "integer", "options": {"hidden": true}},
|
|
14
|
+
"focus_y": {"title": "Focus offset for y-axis from top left corner", "type": "integer", "options": {"hidden": true}},
|
|
15
|
+
"match_mode": {
|
|
16
|
+
"enum": ["pixel", "pixel_and_ocr"]
|
|
17
|
+
},
|
|
18
|
+
"ocr_expression": {
|
|
19
|
+
"title": "Expression to use for text matching",
|
|
20
|
+
"type": "string",
|
|
21
|
+
"maxLength": 999
|
|
22
|
+
},
|
|
23
|
+
"ocr_status": {
|
|
24
|
+
"title": "OCR result description",
|
|
25
|
+
"enum": ["SUCCESS", "TOO_MUCH_TEXT", "NO_TEXT"]
|
|
26
|
+
},
|
|
27
|
+
"ocr_box": {
|
|
28
|
+
"title": "Text content bounding box",
|
|
29
|
+
"type": "object",
|
|
30
|
+
"properties": {
|
|
31
|
+
"x": {"type": "integer"},
|
|
32
|
+
"y": {"type": "integer"},
|
|
33
|
+
"w": {"type": "integer"},
|
|
34
|
+
"h": {"type": "integer"}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"additionalProperties": false,
|
|
39
|
+
"required": ["type", "element"]
|
|
40
|
+
},
|
|
41
|
+
"ui_element_reference": {
|
|
42
|
+
"type": "object",
|
|
43
|
+
"title": "UI Element Reference",
|
|
44
|
+
"description": "A UI Element stored in the database",
|
|
45
|
+
"properties": {
|
|
46
|
+
"type": {
|
|
47
|
+
"enum": ["ui_element_reference"]
|
|
48
|
+
},
|
|
49
|
+
"id": {"title": "UI Element ID", "type": "integer"}
|
|
50
|
+
},
|
|
51
|
+
"additionalProperties": false,
|
|
52
|
+
"required": ["type", "id"]
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"type": "object",
|
|
56
|
+
"title": "Single Wisp Noun",
|
|
57
|
+
"properties": {
|
|
58
|
+
"version": {
|
|
59
|
+
"type": "string",
|
|
60
|
+
"title": "Version"
|
|
61
|
+
},
|
|
62
|
+
"noun": {
|
|
63
|
+
"oneOf": [
|
|
64
|
+
{"$ref": "#/definitions/ui_element"},
|
|
65
|
+
{"$ref": "#/definitions/ui_element_reference"}
|
|
66
|
+
]
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"additionalProperties": false,
|
|
70
|
+
"required": ["version", "noun"]
|
|
71
|
+
}
|
data/canary-wisp.json
ADDED
|
@@ -0,0 +1,495 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"definitions": {
|
|
4
|
+
"noun": {
|
|
5
|
+
"title": "Wisp Noun",
|
|
6
|
+
"oneOf": [
|
|
7
|
+
{"$ref": "#/definitions/ui_element"},
|
|
8
|
+
{"$ref": "#/definitions/ui_element_reference"}
|
|
9
|
+
]
|
|
10
|
+
},
|
|
11
|
+
"ui_element": {
|
|
12
|
+
"type": "object",
|
|
13
|
+
"title": "UI Element",
|
|
14
|
+
"description": "Any other UI Element",
|
|
15
|
+
"properties": {
|
|
16
|
+
"type": {
|
|
17
|
+
"enum": ["ui_element"]
|
|
18
|
+
},
|
|
19
|
+
"element": {"title": "Element", "type": "string"},
|
|
20
|
+
"focus_x": {"title": "Focus offset for x-axis from top left corner", "type": "integer", "options": {"hidden": true}},
|
|
21
|
+
"focus_y": {"title": "Focus offset for y-axis from top left corner", "type": "integer", "options": {"hidden": true}},
|
|
22
|
+
"match_mode": {
|
|
23
|
+
"enum": ["pixel", "pixel_and_ocr"]
|
|
24
|
+
},
|
|
25
|
+
"ocr_expression": {
|
|
26
|
+
"title": "Expression to use for text matching",
|
|
27
|
+
"type": "string",
|
|
28
|
+
"maxLength": 999
|
|
29
|
+
},
|
|
30
|
+
"ocr_status": {
|
|
31
|
+
"title": "OCR result description",
|
|
32
|
+
"enum": ["SUCCESS", "TOO_MUCH_TEXT", "NO_TEXT"]
|
|
33
|
+
},
|
|
34
|
+
"ocr_box": {
|
|
35
|
+
"title": "Text content bounding box",
|
|
36
|
+
"type": "object",
|
|
37
|
+
"properties": {
|
|
38
|
+
"x": {"type": "integer"},
|
|
39
|
+
"y": {"type": "integer"},
|
|
40
|
+
"w": {"type": "integer"},
|
|
41
|
+
"h": {"type": "integer"}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"additionalProperties": false,
|
|
46
|
+
"required": ["type", "element"]
|
|
47
|
+
},
|
|
48
|
+
"ui_element_reference": {
|
|
49
|
+
"type": "object",
|
|
50
|
+
"title": "UI Element Reference",
|
|
51
|
+
"description": "A UI Element stored in the database",
|
|
52
|
+
"properties": {
|
|
53
|
+
"type": {
|
|
54
|
+
"enum": ["ui_element_reference"]
|
|
55
|
+
},
|
|
56
|
+
"id": {"title": "UI Element ID", "type": "integer"}
|
|
57
|
+
},
|
|
58
|
+
"additionalProperties": false,
|
|
59
|
+
"required": ["type", "id"]
|
|
60
|
+
},
|
|
61
|
+
"verb": {
|
|
62
|
+
"title": "Wisp Verb",
|
|
63
|
+
"oneOf": [
|
|
64
|
+
{"$ref": "#/definitions/click"},
|
|
65
|
+
{"$ref": "#/definitions/double_click"},
|
|
66
|
+
{"$ref": "#/definitions/fill"},
|
|
67
|
+
{"$ref": "#/definitions/type"},
|
|
68
|
+
{"$ref": "#/definitions/send_key"},
|
|
69
|
+
{"$ref": "#/definitions/hover"},
|
|
70
|
+
{"$ref": "#/definitions/dropdown_select"},
|
|
71
|
+
{"$ref": "#/definitions/checkbox_check"},
|
|
72
|
+
{"$ref": "#/definitions/checkbox_uncheck"},
|
|
73
|
+
{"$ref": "#/definitions/refresh"},
|
|
74
|
+
{"$ref": "#/definitions/navigate"},
|
|
75
|
+
{"$ref": "#/definitions/navigate_new_tab"},
|
|
76
|
+
{"$ref": "#/definitions/navigate_incognito_tab"},
|
|
77
|
+
{"$ref": "#/definitions/close_tab"},
|
|
78
|
+
{"$ref": "#/definitions/scroll"},
|
|
79
|
+
{"$ref": "#/definitions/sleep"},
|
|
80
|
+
{"$ref": "#/definitions/drag_and_drop"},
|
|
81
|
+
{"$ref": "#/definitions/click_and_hold"},
|
|
82
|
+
{"$ref": "#/definitions/plain_language"},
|
|
83
|
+
{"$ref": "#/definitions/custom_action"},
|
|
84
|
+
{"$ref": "#/definitions/see"},
|
|
85
|
+
{"$ref": "#/definitions/disappear"},
|
|
86
|
+
{"$ref": "#/definitions/loaded"},
|
|
87
|
+
{"$ref": "#/definitions/plain_language_assertion"}
|
|
88
|
+
]
|
|
89
|
+
},
|
|
90
|
+
"click": {
|
|
91
|
+
"type": "object",
|
|
92
|
+
"title": "Click",
|
|
93
|
+
"description": "Clicks on the UI element",
|
|
94
|
+
"properties": {
|
|
95
|
+
"action": {
|
|
96
|
+
"enum": ["click"]
|
|
97
|
+
},
|
|
98
|
+
"custom_action_id": {"title": "Custom Action ID", "type": "integer"},
|
|
99
|
+
"target": {
|
|
100
|
+
"title": "Target",
|
|
101
|
+
"$ref": "#/definitions/noun"
|
|
102
|
+
},
|
|
103
|
+
"button": {"title": "Mouse Button", "type": "string", "enum": ["left", "middle", "right"]}
|
|
104
|
+
},
|
|
105
|
+
"additionalProperties": false,
|
|
106
|
+
"required": ["action", "target"]
|
|
107
|
+
},
|
|
108
|
+
"double_click": {
|
|
109
|
+
"type": "object",
|
|
110
|
+
"title": "Double Click",
|
|
111
|
+
"description": "Double-clicks on the UI element",
|
|
112
|
+
"properties": {
|
|
113
|
+
"action": {
|
|
114
|
+
"enum": ["double_click"]
|
|
115
|
+
},
|
|
116
|
+
"custom_action_id": {"title": "Custom Action ID", "type": "integer"},
|
|
117
|
+
"target": {
|
|
118
|
+
"title": "Target",
|
|
119
|
+
"$ref": "#/definitions/noun"
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
"additionalProperties": false,
|
|
123
|
+
"required": ["action", "target"]
|
|
124
|
+
},
|
|
125
|
+
"fill": {
|
|
126
|
+
"type": "object",
|
|
127
|
+
"title": "Fill",
|
|
128
|
+
"description": "Fills the text field with specified content",
|
|
129
|
+
"properties": {
|
|
130
|
+
"action": {
|
|
131
|
+
"enum": ["fill"]
|
|
132
|
+
},
|
|
133
|
+
"custom_action_id": {"title": "Custom Action ID", "type": "integer"},
|
|
134
|
+
"target": {
|
|
135
|
+
"title": "Target",
|
|
136
|
+
"$ref": "#/definitions/noun"
|
|
137
|
+
},
|
|
138
|
+
"text": {"title": "Text", "type": "string"},
|
|
139
|
+
"method": { "title": "Text entry method", "type": "string", "enum": ["pasting", "typing"] }
|
|
140
|
+
},
|
|
141
|
+
"additionalProperties": false,
|
|
142
|
+
"required": ["action", "target", "text"]
|
|
143
|
+
},
|
|
144
|
+
"type": {
|
|
145
|
+
"type": "object",
|
|
146
|
+
"title": "Type",
|
|
147
|
+
"description": "Types in specified text",
|
|
148
|
+
"properties": {
|
|
149
|
+
"action": {
|
|
150
|
+
"enum": ["type"]
|
|
151
|
+
},
|
|
152
|
+
"custom_action_id": {"title": "Custom Action ID", "type": "integer"},
|
|
153
|
+
"text": {"title": "Text", "type": "string"},
|
|
154
|
+
"method": { "title": "Text entry method", "type": "string", "enum": ["pasting", "typing"] }
|
|
155
|
+
},
|
|
156
|
+
"additionalProperties": false,
|
|
157
|
+
"required": ["action", "text"]
|
|
158
|
+
},
|
|
159
|
+
"send_key": {
|
|
160
|
+
"type": "object",
|
|
161
|
+
"title": "Press Key",
|
|
162
|
+
"description": "Press specified key or key combination.",
|
|
163
|
+
"properties": {
|
|
164
|
+
"action": {
|
|
165
|
+
"enum": ["send_key"]
|
|
166
|
+
},
|
|
167
|
+
"custom_action_id": {"title": "Custom Action ID", "type": "integer"},
|
|
168
|
+
"key": {"title": "Key", "type": "string"},
|
|
169
|
+
"modifier": {"title": "Modifier", "type": "string"}
|
|
170
|
+
},
|
|
171
|
+
"additionalProperties": false,
|
|
172
|
+
"required": ["action", "key"]
|
|
173
|
+
},
|
|
174
|
+
"hover": {
|
|
175
|
+
"type": "object",
|
|
176
|
+
"title": "Hover",
|
|
177
|
+
"description": "Hovers over specified element",
|
|
178
|
+
"properties": {
|
|
179
|
+
"action": {
|
|
180
|
+
"enum": ["hover"]
|
|
181
|
+
},
|
|
182
|
+
"custom_action_id": {"title": "Custom Action ID", "type": "integer"},
|
|
183
|
+
"target": {
|
|
184
|
+
"title": "Target",
|
|
185
|
+
"$ref": "#/definitions/noun"
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
"additionalProperties": false,
|
|
189
|
+
"required": ["action", "target"]
|
|
190
|
+
},
|
|
191
|
+
"dropdown_select": {
|
|
192
|
+
"type": "object",
|
|
193
|
+
"title": "Dropdown Select",
|
|
194
|
+
"description": "Selects specified item from the dropdown",
|
|
195
|
+
"properties": {
|
|
196
|
+
"action": {
|
|
197
|
+
"enum": ["dropdown_select"]
|
|
198
|
+
},
|
|
199
|
+
"custom_action_id": {"title": "Custom Action ID", "type": "integer"},
|
|
200
|
+
"target": {
|
|
201
|
+
"title": "Target",
|
|
202
|
+
"$ref": "#/definitions/noun"
|
|
203
|
+
},
|
|
204
|
+
"option": {
|
|
205
|
+
"title": "Option",
|
|
206
|
+
"$ref": "#/definitions/noun"
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
"additionalProperties": false,
|
|
210
|
+
"required": ["action", "target", "option"]
|
|
211
|
+
},
|
|
212
|
+
"checkbox_check": {
|
|
213
|
+
"type": "object",
|
|
214
|
+
"title": "Checkbox Check",
|
|
215
|
+
"description": "Checks specified checkbox",
|
|
216
|
+
"properties": {
|
|
217
|
+
"action": {
|
|
218
|
+
"enum": ["checkbox_check"]
|
|
219
|
+
},
|
|
220
|
+
"custom_action_id": {"title": "Custom Action ID", "type": "integer"},
|
|
221
|
+
"target": {
|
|
222
|
+
"title": "Target",
|
|
223
|
+
"$ref": "#/definitions/noun"
|
|
224
|
+
}
|
|
225
|
+
},
|
|
226
|
+
"additionalProperties": false,
|
|
227
|
+
"required": ["action", "target"]
|
|
228
|
+
},
|
|
229
|
+
"checkbox_uncheck": {
|
|
230
|
+
"type": "object",
|
|
231
|
+
"title": "Checkbox Uncheck",
|
|
232
|
+
"description": "Unchecks specified checkbox",
|
|
233
|
+
"properties": {
|
|
234
|
+
"action": {
|
|
235
|
+
"enum": ["checkbox_uncheck"]
|
|
236
|
+
},
|
|
237
|
+
"custom_action_id": {"title": "Custom Action ID", "type": "integer"},
|
|
238
|
+
"target": {
|
|
239
|
+
"title": "Target",
|
|
240
|
+
"$ref": "#/definitions/noun"
|
|
241
|
+
}
|
|
242
|
+
},
|
|
243
|
+
"additionalProperties": false,
|
|
244
|
+
"required": ["action", "target"]
|
|
245
|
+
},
|
|
246
|
+
"refresh": {
|
|
247
|
+
"type": "object",
|
|
248
|
+
"title": "Refresh",
|
|
249
|
+
"description": "Refreshes the webpage",
|
|
250
|
+
"properties": {
|
|
251
|
+
"action": {
|
|
252
|
+
"enum": ["refresh"]
|
|
253
|
+
},
|
|
254
|
+
"custom_action_id": {"title": "Custom Action ID", "type": "integer"}
|
|
255
|
+
},
|
|
256
|
+
"additionalProperties": false,
|
|
257
|
+
"required": ["action"]
|
|
258
|
+
},
|
|
259
|
+
"navigate": {
|
|
260
|
+
"type": "object",
|
|
261
|
+
"title": "Navigate",
|
|
262
|
+
"description": "Navigates to specified URL",
|
|
263
|
+
"properties": {
|
|
264
|
+
"action": {
|
|
265
|
+
"enum": ["navigate"]
|
|
266
|
+
},
|
|
267
|
+
"custom_action_id": {"title": "Custom Action ID", "type": "integer"},
|
|
268
|
+
"url": {"title": "URL", "type": "string"}
|
|
269
|
+
},
|
|
270
|
+
"additionalProperties": false,
|
|
271
|
+
"required": ["action", "url"]
|
|
272
|
+
},
|
|
273
|
+
"navigate_new_tab": {
|
|
274
|
+
"type": "object",
|
|
275
|
+
"title": "Navigate - New Tab",
|
|
276
|
+
"description": "Navigates to specified URL in a new tab",
|
|
277
|
+
"properties": {
|
|
278
|
+
"action": {
|
|
279
|
+
"enum": ["navigate_new_tab"]
|
|
280
|
+
},
|
|
281
|
+
"custom_action_id": {"title": "Custom Action ID", "type": "integer"},
|
|
282
|
+
"url": {"title": "URL", "type": "string"}
|
|
283
|
+
},
|
|
284
|
+
"additionalProperties": false,
|
|
285
|
+
"required": ["action", "url"]
|
|
286
|
+
},
|
|
287
|
+
"navigate_incognito_tab": {
|
|
288
|
+
"type": "object",
|
|
289
|
+
"title": "Navigate - Incognito Tab",
|
|
290
|
+
"description": "Navigates to specified URL in a new incognito tab",
|
|
291
|
+
"properties": {
|
|
292
|
+
"action": {
|
|
293
|
+
"enum": ["navigate_incognito_tab"]
|
|
294
|
+
},
|
|
295
|
+
"custom_action_id": {"title": "Custom Action ID", "type": "integer"},
|
|
296
|
+
"url": {"title": "URL", "type": "string"}
|
|
297
|
+
},
|
|
298
|
+
"additionalProperties": false,
|
|
299
|
+
"required": ["action", "url"]
|
|
300
|
+
},
|
|
301
|
+
"close_tab": {
|
|
302
|
+
"type": "object",
|
|
303
|
+
"title": "Close Tab",
|
|
304
|
+
"description": "Closes current browser tab",
|
|
305
|
+
"properties": {
|
|
306
|
+
"action": {
|
|
307
|
+
"enum": ["close_tab"]
|
|
308
|
+
},
|
|
309
|
+
"custom_action_id": {"title": "Custom Action ID", "type": "integer"}
|
|
310
|
+
},
|
|
311
|
+
"additionalProperties": false,
|
|
312
|
+
"required": ["action"]
|
|
313
|
+
},
|
|
314
|
+
"scroll": {
|
|
315
|
+
"type": "object",
|
|
316
|
+
"title": "Scroll",
|
|
317
|
+
"description": "Scrolls the page into specified direction until target is reached",
|
|
318
|
+
"properties": {
|
|
319
|
+
"action": {
|
|
320
|
+
"enum": ["scroll"]
|
|
321
|
+
},
|
|
322
|
+
"custom_action_id": {"title": "Custom Action ID", "type": "integer"},
|
|
323
|
+
"direction": {"title": "Direction", "type": "string", "enum": ["up", "down", "left", "right"]},
|
|
324
|
+
"target": {
|
|
325
|
+
"title": "Target",
|
|
326
|
+
"$ref": "#/definitions/noun"
|
|
327
|
+
}
|
|
328
|
+
},
|
|
329
|
+
"additionalProperties": false,
|
|
330
|
+
"required": ["action", "direction", "target"]
|
|
331
|
+
},
|
|
332
|
+
"sleep": {
|
|
333
|
+
"type": "object",
|
|
334
|
+
"title": "Sleep",
|
|
335
|
+
"description": "Waits for a number of seconds",
|
|
336
|
+
"properties": {
|
|
337
|
+
"action": {
|
|
338
|
+
"enum": ["sleep"]
|
|
339
|
+
},
|
|
340
|
+
"custom_action_id": {"title": "Custom Action ID", "type": "integer"},
|
|
341
|
+
"seconds": {"title": "seconds", "type": "integer"}
|
|
342
|
+
},
|
|
343
|
+
"additionalProperties": false,
|
|
344
|
+
"required": ["action", "seconds"]
|
|
345
|
+
},
|
|
346
|
+
"drag_and_drop": {
|
|
347
|
+
"type": "object",
|
|
348
|
+
"title": "Drag and drop",
|
|
349
|
+
"description": "Drag and drop",
|
|
350
|
+
"properties": {
|
|
351
|
+
"action": {
|
|
352
|
+
"enum": ["drag_and_drop"]
|
|
353
|
+
},
|
|
354
|
+
"custom_action_id": {"title": "Custom Action ID", "type": "integer"},
|
|
355
|
+
"object": {
|
|
356
|
+
"title": "Object",
|
|
357
|
+
"$ref": "#/definitions/noun"
|
|
358
|
+
},
|
|
359
|
+
"target": {
|
|
360
|
+
"title": "Target",
|
|
361
|
+
"$ref": "#/definitions/noun"
|
|
362
|
+
}
|
|
363
|
+
},
|
|
364
|
+
"additionalProperties": false,
|
|
365
|
+
"required": ["action", "target", "object"]
|
|
366
|
+
},
|
|
367
|
+
"click_and_hold": {
|
|
368
|
+
"type": "object",
|
|
369
|
+
"title": "Click and Hold",
|
|
370
|
+
"description": "Clicks and holds the left mouse button over object for a number of seconds",
|
|
371
|
+
"properties": {
|
|
372
|
+
"action": {
|
|
373
|
+
"enum": ["click_and_hold"]
|
|
374
|
+
},
|
|
375
|
+
"custom_action_id": {"title": "Custom Action ID", "type": "integer"},
|
|
376
|
+
"target": {
|
|
377
|
+
"title": "Target",
|
|
378
|
+
"$ref": "#/definitions/noun"
|
|
379
|
+
},
|
|
380
|
+
"seconds": {"title": "Seconds", "type": "integer"}
|
|
381
|
+
},
|
|
382
|
+
"additionalProperties": false,
|
|
383
|
+
"required": ["action", "target", "seconds"]
|
|
384
|
+
},
|
|
385
|
+
"custom_action": {
|
|
386
|
+
"type": "object",
|
|
387
|
+
"title": "Custom Action",
|
|
388
|
+
"description": "Reusable custom action",
|
|
389
|
+
"properties": {
|
|
390
|
+
"action": {
|
|
391
|
+
"enum": ["custom_action"]
|
|
392
|
+
},
|
|
393
|
+
"test_id": {
|
|
394
|
+
"title": "Test ID",
|
|
395
|
+
"type": "integer"
|
|
396
|
+
}
|
|
397
|
+
},
|
|
398
|
+
"additionalProperties": false,
|
|
399
|
+
"required": ["action", "test_id"]
|
|
400
|
+
},
|
|
401
|
+
"plain_language": {
|
|
402
|
+
"type": "object",
|
|
403
|
+
"title": "Plain Language",
|
|
404
|
+
"description": "Allows to fallback to english",
|
|
405
|
+
"properties": {
|
|
406
|
+
"action": {
|
|
407
|
+
"enum": ["plain_language"]
|
|
408
|
+
},
|
|
409
|
+
"custom_action_id": {"title": "Custom Action ID", "type": "integer"},
|
|
410
|
+
"instruction": {"title": "Instruction", "type": "string"}
|
|
411
|
+
},
|
|
412
|
+
"additionalProperties": false,
|
|
413
|
+
"required": ["action", "instruction"]
|
|
414
|
+
},
|
|
415
|
+
"see": {
|
|
416
|
+
"type": "object",
|
|
417
|
+
"title": "See",
|
|
418
|
+
"description": "Checks if element of the UI is visible",
|
|
419
|
+
"properties": {
|
|
420
|
+
"assertion": {
|
|
421
|
+
"enum": ["see"]
|
|
422
|
+
},
|
|
423
|
+
"custom_action_id": {"title": "Custom Action ID", "type": "integer"},
|
|
424
|
+
"object": {
|
|
425
|
+
"title": "Object",
|
|
426
|
+
"$ref": "#/definitions/noun"
|
|
427
|
+
}
|
|
428
|
+
},
|
|
429
|
+
"additionalProperties": false,
|
|
430
|
+
"required": ["assertion", "object"]
|
|
431
|
+
},
|
|
432
|
+
"disappear": {
|
|
433
|
+
"type": "object",
|
|
434
|
+
"title": "Disappear",
|
|
435
|
+
"description": "Checks if element of the UI is no longer visible",
|
|
436
|
+
"properties": {
|
|
437
|
+
"assertion": {
|
|
438
|
+
"enum": ["disappear"]
|
|
439
|
+
},
|
|
440
|
+
"custom_action_id": {"title": "Custom Action ID", "type": "integer"},
|
|
441
|
+
"object": {
|
|
442
|
+
"title": "Object",
|
|
443
|
+
"$ref": "#/definitions/noun"
|
|
444
|
+
}
|
|
445
|
+
},
|
|
446
|
+
"additionalProperties": false,
|
|
447
|
+
"required": ["assertion", "object"]
|
|
448
|
+
},
|
|
449
|
+
"loaded": {
|
|
450
|
+
"type": "object",
|
|
451
|
+
"title": "Loaded",
|
|
452
|
+
"description": "Checks if specified page has loaded",
|
|
453
|
+
"properties": {
|
|
454
|
+
"assertion": {
|
|
455
|
+
"enum": ["loaded"]
|
|
456
|
+
},
|
|
457
|
+
"custom_action_id": {"title": "Custom Action ID", "type": "integer"},
|
|
458
|
+
"page": {"title": "Page", "type": "string"}
|
|
459
|
+
},
|
|
460
|
+
"additionalProperties": false,
|
|
461
|
+
"required": ["assertion", "page"]
|
|
462
|
+
},
|
|
463
|
+
"plain_language_assertion": {
|
|
464
|
+
"type": "object",
|
|
465
|
+
"title": "Plain Language Assertion",
|
|
466
|
+
"description": "Allows to fallback to english",
|
|
467
|
+
"properties": {
|
|
468
|
+
"assertion": {
|
|
469
|
+
"enum": ["plain_language_assertion"]
|
|
470
|
+
},
|
|
471
|
+
"custom_action_id": {"title": "Custom Action ID", "type": "integer"},
|
|
472
|
+
"instruction": {"title": "Instruction", "type": "string"}
|
|
473
|
+
},
|
|
474
|
+
"additionalProperties": false,
|
|
475
|
+
"required": ["assertion", "instruction"]
|
|
476
|
+
}
|
|
477
|
+
},
|
|
478
|
+
"type": "object",
|
|
479
|
+
"title": "Wisp Test",
|
|
480
|
+
"properties": {
|
|
481
|
+
"version": {
|
|
482
|
+
"type": "string",
|
|
483
|
+
"title": "Version"
|
|
484
|
+
},
|
|
485
|
+
"verbs": {
|
|
486
|
+
"type": "array",
|
|
487
|
+
"title": "Verbs",
|
|
488
|
+
"items": {
|
|
489
|
+
"$ref": "#/definitions/verb"
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
},
|
|
493
|
+
"additionalProperties": false,
|
|
494
|
+
"required": ["version", "verbs"]
|
|
495
|
+
}
|
data/lib/wisp-schema.rb
CHANGED
|
@@ -1,8 +1,36 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
|
+
require 'json_schemer'
|
|
3
|
+
require 'semantic'
|
|
4
|
+
require_relative 'version'
|
|
2
5
|
|
|
3
6
|
module Wisp
|
|
4
|
-
VERSION = '0.15.0'
|
|
5
|
-
|
|
6
7
|
SCHEMA_PATH = File.expand_path('../wisp.json', __dir__)
|
|
7
8
|
NOUNS_PATH = File.expand_path('../nouns.json', __dir__)
|
|
9
|
+
|
|
10
|
+
CANARY_SCHEMA_PATH = File.expand_path('../canary-wisp.json', __dir__)
|
|
11
|
+
CANARY_NOUNS_PATH = File.expand_path('../canary-nouns.json', __dir__)
|
|
12
|
+
|
|
13
|
+
SEMANTIC_STABLE_VERSION = Semantic::Version.new(STABLE_VERSION)
|
|
14
|
+
|
|
15
|
+
def wisp_schemer(raw_version)
|
|
16
|
+
version = Semantic::Version.new(raw_version)
|
|
17
|
+
|
|
18
|
+
if version > SEMANTIC_STABLE_VERSION
|
|
19
|
+
JSONSchemer.schema(Pathname.new(Wisp::CANARY_SCHEMA_PATH))
|
|
20
|
+
else
|
|
21
|
+
JSONSchemer.schema(Pathname.new(Wisp::SCHEMA_PATH))
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
module_function :wisp_schemer
|
|
25
|
+
|
|
26
|
+
def nouns_schemer(raw_version)
|
|
27
|
+
version = Semantic::Version.new(raw_version)
|
|
28
|
+
|
|
29
|
+
if version > SEMANTIC_STABLE_VERSION
|
|
30
|
+
JSONSchemer.schema(Pathname.new(Wisp::CANARY_NOUNS_PATH))
|
|
31
|
+
else
|
|
32
|
+
JSONSchemer.schema(Pathname.new(Wisp::NOUNS_PATH))
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
module_function :nouns_schemer
|
|
8
36
|
end
|
data/nouns.json
CHANGED
|
@@ -1,171 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
3
|
"definitions": {
|
|
4
|
-
"button": {
|
|
5
|
-
"type": "object",
|
|
6
|
-
"title": "Button",
|
|
7
|
-
"description": "Button",
|
|
8
|
-
"properties": {
|
|
9
|
-
"type": {
|
|
10
|
-
"enum": ["button"]
|
|
11
|
-
},
|
|
12
|
-
"label": {"title": "Label", "type": "string"},
|
|
13
|
-
"focus_x": {"title": "Focus offset for x-axis from top left corner", "type": "integer", "options": {"hidden": true}},
|
|
14
|
-
"focus_y": {"title": "Focus offset for y-axis from top left corner", "type": "integer", "options": {"hidden": true}}
|
|
15
|
-
},
|
|
16
|
-
"additionalProperties": false,
|
|
17
|
-
"required": ["type", "label"]
|
|
18
|
-
},
|
|
19
|
-
"text_field": {
|
|
20
|
-
"type": "object",
|
|
21
|
-
"title": "Text Field",
|
|
22
|
-
"description": "Text Field",
|
|
23
|
-
"properties": {
|
|
24
|
-
"type": {
|
|
25
|
-
"enum": ["text_field"]
|
|
26
|
-
},
|
|
27
|
-
"label": {"title": "Label", "type": "string"},
|
|
28
|
-
"focus_x": {"title": "Focus offset for x-axis from top left corner", "type": "integer", "options": {"hidden": true}},
|
|
29
|
-
"focus_y": {"title": "Focus offset for y-axis from top left corner", "type": "integer", "options": {"hidden": true}}
|
|
30
|
-
},
|
|
31
|
-
"additionalProperties": false,
|
|
32
|
-
"required": ["type", "label"]
|
|
33
|
-
},
|
|
34
|
-
"dropdown": {
|
|
35
|
-
"type": "object",
|
|
36
|
-
"title": "Dropdown",
|
|
37
|
-
"description": "Dropdown",
|
|
38
|
-
"properties": {
|
|
39
|
-
"type": {
|
|
40
|
-
"enum": ["dropdown"]
|
|
41
|
-
},
|
|
42
|
-
"label": {"title": "Label", "type": "string"},
|
|
43
|
-
"focus_x": {"title": "Focus offset for x-axis from top left corner", "type": "integer", "options": {"hidden": true}},
|
|
44
|
-
"focus_y": {"title": "Focus offset for y-axis from top left corner", "type": "integer", "options": {"hidden": true}}
|
|
45
|
-
},
|
|
46
|
-
"additionalProperties": false,
|
|
47
|
-
"required": ["type", "label"]
|
|
48
|
-
},
|
|
49
|
-
"dropdown_option": {
|
|
50
|
-
"type": "object",
|
|
51
|
-
"title": "Dropdown Option",
|
|
52
|
-
"description": "Option in open dropdown",
|
|
53
|
-
"properties": {
|
|
54
|
-
"type": {
|
|
55
|
-
"enum": ["dropdown_option"]
|
|
56
|
-
},
|
|
57
|
-
"label": {"title": "Label", "type": "string"},
|
|
58
|
-
"focus_x": {"title": "Focus offset for x-axis from top left corner", "type": "integer", "options": {"hidden": true}},
|
|
59
|
-
"focus_y": {"title": "Focus offset for y-axis from top left corner", "type": "integer", "options": {"hidden": true}}
|
|
60
|
-
},
|
|
61
|
-
"additionalProperties": false,
|
|
62
|
-
"required": ["type", "label"]
|
|
63
|
-
},
|
|
64
|
-
"link": {
|
|
65
|
-
"type": "object",
|
|
66
|
-
"title": "Link",
|
|
67
|
-
"description": "Link",
|
|
68
|
-
"properties": {
|
|
69
|
-
"type": {
|
|
70
|
-
"enum": ["link"]
|
|
71
|
-
},
|
|
72
|
-
"text": {"title": "Text", "type": "string"},
|
|
73
|
-
"focus_x": {"title": "Focus offset for x-axis from top left corner", "type": "integer", "options": {"hidden": true}},
|
|
74
|
-
"focus_y": {"title": "Focus offset for y-axis from top left corner", "type": "integer", "options": {"hidden": true}}
|
|
75
|
-
},
|
|
76
|
-
"additionalProperties": false,
|
|
77
|
-
"required": ["type", "text"]
|
|
78
|
-
},
|
|
79
|
-
"icon": {
|
|
80
|
-
"type": "object",
|
|
81
|
-
"title": "Icon",
|
|
82
|
-
"description": "Icon",
|
|
83
|
-
"properties": {
|
|
84
|
-
"type": {
|
|
85
|
-
"enum": ["icon"]
|
|
86
|
-
},
|
|
87
|
-
"description": {"title": "Description", "type": "string"},
|
|
88
|
-
"focus_x": {"title": "Focus offset for x-axis from top left corner", "type": "integer", "options": {"hidden": true}},
|
|
89
|
-
"focus_y": {"title": "Focus offset for y-axis from top left corner", "type": "integer", "options": {"hidden": true}}
|
|
90
|
-
},
|
|
91
|
-
"additionalProperties": false,
|
|
92
|
-
"required": ["type", "description"]
|
|
93
|
-
},
|
|
94
|
-
"checkbox": {
|
|
95
|
-
"type": "object",
|
|
96
|
-
"title": "Checkbox",
|
|
97
|
-
"description": "Checkbox",
|
|
98
|
-
"properties": {
|
|
99
|
-
"type": {
|
|
100
|
-
"enum": ["checkbox"]
|
|
101
|
-
},
|
|
102
|
-
"label": {"title": "Label", "type": "string"},
|
|
103
|
-
"focus_x": {"title": "Focus offset for x-axis from top left corner", "type": "integer", "options": {"hidden": true}},
|
|
104
|
-
"focus_y": {"title": "Focus offset for y-axis from top left corner", "type": "integer", "options": {"hidden": true}}
|
|
105
|
-
},
|
|
106
|
-
"additionalProperties": false,
|
|
107
|
-
"required": ["type", "label"]
|
|
108
|
-
},
|
|
109
|
-
"header": {
|
|
110
|
-
"type": "object",
|
|
111
|
-
"title": "Header",
|
|
112
|
-
"description": "Page Header",
|
|
113
|
-
"properties": {
|
|
114
|
-
"type": {
|
|
115
|
-
"enum": ["header"]
|
|
116
|
-
},
|
|
117
|
-
"text": {"title": "Text", "type": "string"},
|
|
118
|
-
"focus_x": {"title": "Focus offset for x-axis from top left corner", "type": "integer", "options": {"hidden": true}},
|
|
119
|
-
"focus_y": {"title": "Focus offset for y-axis from top left corner", "type": "integer", "options": {"hidden": true}}
|
|
120
|
-
},
|
|
121
|
-
"additionalProperties": false,
|
|
122
|
-
"required": ["type", "text"]
|
|
123
|
-
},
|
|
124
|
-
"window": {
|
|
125
|
-
"type": "object",
|
|
126
|
-
"title": "Window",
|
|
127
|
-
"description": "Any pop-up window",
|
|
128
|
-
"properties": {
|
|
129
|
-
"type": {
|
|
130
|
-
"enum": ["window"]
|
|
131
|
-
},
|
|
132
|
-
"description": {"title": "Description", "type": "string"},
|
|
133
|
-
"focus_x": {"title": "Focus offset for x-axis from top left corner", "type": "integer", "options": {"hidden": true}},
|
|
134
|
-
"focus_y": {"title": "Focus offset for y-axis from top left corner", "type": "integer", "options": {"hidden": true}}
|
|
135
|
-
},
|
|
136
|
-
"additionalProperties": false,
|
|
137
|
-
"required": ["type", "description"]
|
|
138
|
-
},
|
|
139
|
-
"modal": {
|
|
140
|
-
"type": "object",
|
|
141
|
-
"title": "Modal",
|
|
142
|
-
"description": "In page modal",
|
|
143
|
-
"properties": {
|
|
144
|
-
"type": {
|
|
145
|
-
"enum": ["modal"]
|
|
146
|
-
},
|
|
147
|
-
"description": {"title": "Description", "type": "string"},
|
|
148
|
-
"focus_x": {"title": "Focus offset for x-axis from top left corner", "type": "integer", "options": {"hidden": true}},
|
|
149
|
-
"focus_y": {"title": "Focus offset for y-axis from top left corner", "type": "integer", "options": {"hidden": true}}
|
|
150
|
-
},
|
|
151
|
-
"additionalProperties": false,
|
|
152
|
-
"required": ["type", "description"]
|
|
153
|
-
},
|
|
154
|
-
"text": {
|
|
155
|
-
"type": "object",
|
|
156
|
-
"title": "Text",
|
|
157
|
-
"description": "Exactly matched text",
|
|
158
|
-
"properties": {
|
|
159
|
-
"type": {
|
|
160
|
-
"enum": ["text"]
|
|
161
|
-
},
|
|
162
|
-
"text": {"title": "Text", "type": "string"},
|
|
163
|
-
"focus_x": {"title": "Focus offset for x-axis from top left corner", "type": "integer", "options": {"hidden": true}},
|
|
164
|
-
"focus_y": {"title": "Focus offset for y-axis from top left corner", "type": "integer", "options": {"hidden": true}}
|
|
165
|
-
},
|
|
166
|
-
"additionalProperties": false,
|
|
167
|
-
"required": ["type", "text"]
|
|
168
|
-
},
|
|
169
4
|
"ui_element": {
|
|
170
5
|
"type": "object",
|
|
171
6
|
"title": "UI Element",
|
|
@@ -176,7 +11,29 @@
|
|
|
176
11
|
},
|
|
177
12
|
"element": {"title": "Element", "type": "string"},
|
|
178
13
|
"focus_x": {"title": "Focus offset for x-axis from top left corner", "type": "integer", "options": {"hidden": true}},
|
|
179
|
-
"focus_y": {"title": "Focus offset for y-axis from top left corner", "type": "integer", "options": {"hidden": true}}
|
|
14
|
+
"focus_y": {"title": "Focus offset for y-axis from top left corner", "type": "integer", "options": {"hidden": true}},
|
|
15
|
+
"match_mode": {
|
|
16
|
+
"enum": ["pixel", "pixel_and_ocr"]
|
|
17
|
+
},
|
|
18
|
+
"ocr_expression": {
|
|
19
|
+
"title": "Expression to use for text matching",
|
|
20
|
+
"type": "string",
|
|
21
|
+
"maxLength": 999
|
|
22
|
+
},
|
|
23
|
+
"ocr_status": {
|
|
24
|
+
"title": "OCR result description",
|
|
25
|
+
"enum": ["SUCCESS", "TOO_MUCH_TEXT", "NO_TEXT"]
|
|
26
|
+
},
|
|
27
|
+
"ocr_box": {
|
|
28
|
+
"title": "Text content bounding box",
|
|
29
|
+
"type": "object",
|
|
30
|
+
"properties": {
|
|
31
|
+
"x": {"type": "integer"},
|
|
32
|
+
"y": {"type": "integer"},
|
|
33
|
+
"w": {"type": "integer"},
|
|
34
|
+
"h": {"type": "integer"}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
180
37
|
},
|
|
181
38
|
"additionalProperties": false,
|
|
182
39
|
"required": ["type", "element"]
|
|
@@ -204,17 +61,6 @@
|
|
|
204
61
|
},
|
|
205
62
|
"noun": {
|
|
206
63
|
"oneOf": [
|
|
207
|
-
{"$ref": "#/definitions/button"},
|
|
208
|
-
{"$ref": "#/definitions/text_field"},
|
|
209
|
-
{"$ref": "#/definitions/dropdown"},
|
|
210
|
-
{"$ref": "#/definitions/dropdown_option"},
|
|
211
|
-
{"$ref": "#/definitions/link"},
|
|
212
|
-
{"$ref": "#/definitions/icon"},
|
|
213
|
-
{"$ref": "#/definitions/checkbox"},
|
|
214
|
-
{"$ref": "#/definitions/header"},
|
|
215
|
-
{"$ref": "#/definitions/window"},
|
|
216
|
-
{"$ref": "#/definitions/modal"},
|
|
217
|
-
{"$ref": "#/definitions/text"},
|
|
218
64
|
{"$ref": "#/definitions/ui_element"},
|
|
219
65
|
{"$ref": "#/definitions/ui_element_reference"}
|
|
220
66
|
]
|
data/wisp.json
CHANGED
|
@@ -4,164 +4,10 @@
|
|
|
4
4
|
"noun": {
|
|
5
5
|
"title": "Wisp Noun",
|
|
6
6
|
"oneOf": [
|
|
7
|
-
{"$ref": "#/definitions/button"},
|
|
8
|
-
{"$ref": "#/definitions/text_field"},
|
|
9
|
-
{"$ref": "#/definitions/dropdown"},
|
|
10
|
-
{"$ref": "#/definitions/dropdown_option"},
|
|
11
|
-
{"$ref": "#/definitions/link"},
|
|
12
|
-
{"$ref": "#/definitions/icon"},
|
|
13
|
-
{"$ref": "#/definitions/checkbox"},
|
|
14
|
-
{"$ref": "#/definitions/header"},
|
|
15
|
-
{"$ref": "#/definitions/window"},
|
|
16
|
-
{"$ref": "#/definitions/modal"},
|
|
17
|
-
{"$ref": "#/definitions/text"},
|
|
18
7
|
{"$ref": "#/definitions/ui_element"},
|
|
19
8
|
{"$ref": "#/definitions/ui_element_reference"}
|
|
20
9
|
]
|
|
21
10
|
},
|
|
22
|
-
"button": {
|
|
23
|
-
"type": "object",
|
|
24
|
-
"title": "Button",
|
|
25
|
-
"description": "Button",
|
|
26
|
-
"properties": {
|
|
27
|
-
"type": {
|
|
28
|
-
"enum": ["button"]
|
|
29
|
-
},
|
|
30
|
-
"label": {"title": "Label", "type": "string"}
|
|
31
|
-
},
|
|
32
|
-
"additionalProperties": false,
|
|
33
|
-
"required": ["type", "label"]
|
|
34
|
-
},
|
|
35
|
-
"text_field": {
|
|
36
|
-
"type": "object",
|
|
37
|
-
"title": "Text Field",
|
|
38
|
-
"description": "Text Field",
|
|
39
|
-
"properties": {
|
|
40
|
-
"type": {
|
|
41
|
-
"enum": ["text_field"]
|
|
42
|
-
},
|
|
43
|
-
"label": {"title": "Label", "type": "string"}
|
|
44
|
-
},
|
|
45
|
-
"additionalProperties": false,
|
|
46
|
-
"required": ["type", "label"]
|
|
47
|
-
},
|
|
48
|
-
"dropdown": {
|
|
49
|
-
"type": "object",
|
|
50
|
-
"title": "Dropdown",
|
|
51
|
-
"description": "Dropdown",
|
|
52
|
-
"properties": {
|
|
53
|
-
"type": {
|
|
54
|
-
"enum": ["dropdown"]
|
|
55
|
-
},
|
|
56
|
-
"label": {"title": "Label", "type": "string"}
|
|
57
|
-
},
|
|
58
|
-
"additionalProperties": false,
|
|
59
|
-
"required": ["type", "label"]
|
|
60
|
-
},
|
|
61
|
-
"dropdown_option": {
|
|
62
|
-
"type": "object",
|
|
63
|
-
"title": "Dropdown Option",
|
|
64
|
-
"description": "Option in open dropdown",
|
|
65
|
-
"properties": {
|
|
66
|
-
"type": {
|
|
67
|
-
"enum": ["dropdown_option"]
|
|
68
|
-
},
|
|
69
|
-
"label": {"title": "Label", "type": "string"}
|
|
70
|
-
},
|
|
71
|
-
"additionalProperties": false,
|
|
72
|
-
"required": ["type", "label"]
|
|
73
|
-
},
|
|
74
|
-
"link": {
|
|
75
|
-
"type": "object",
|
|
76
|
-
"title": "Link",
|
|
77
|
-
"description": "Link",
|
|
78
|
-
"properties": {
|
|
79
|
-
"type": {
|
|
80
|
-
"enum": ["link"]
|
|
81
|
-
},
|
|
82
|
-
"text": {"title": "Text", "type": "string"}
|
|
83
|
-
},
|
|
84
|
-
"additionalProperties": false,
|
|
85
|
-
"required": ["type", "text"]
|
|
86
|
-
},
|
|
87
|
-
"icon": {
|
|
88
|
-
"type": "object",
|
|
89
|
-
"title": "Icon",
|
|
90
|
-
"description": "Icon",
|
|
91
|
-
"properties": {
|
|
92
|
-
"type": {
|
|
93
|
-
"enum": ["icon"]
|
|
94
|
-
},
|
|
95
|
-
"description": {"title": "Description", "type": "string"}
|
|
96
|
-
},
|
|
97
|
-
"additionalProperties": false,
|
|
98
|
-
"required": ["type", "description"]
|
|
99
|
-
},
|
|
100
|
-
"checkbox": {
|
|
101
|
-
"type": "object",
|
|
102
|
-
"title": "Checkbox",
|
|
103
|
-
"description": "Checkbox",
|
|
104
|
-
"properties": {
|
|
105
|
-
"type": {
|
|
106
|
-
"enum": ["checkbox"]
|
|
107
|
-
},
|
|
108
|
-
"label": {"title": "Label", "type": "string"}
|
|
109
|
-
},
|
|
110
|
-
"additionalProperties": false,
|
|
111
|
-
"required": ["type", "label"]
|
|
112
|
-
},
|
|
113
|
-
"header": {
|
|
114
|
-
"type": "object",
|
|
115
|
-
"title": "Header",
|
|
116
|
-
"description": "Page Header",
|
|
117
|
-
"properties": {
|
|
118
|
-
"type": {
|
|
119
|
-
"enum": ["header"]
|
|
120
|
-
},
|
|
121
|
-
"text": {"title": "Text", "type": "string"}
|
|
122
|
-
},
|
|
123
|
-
"additionalProperties": false,
|
|
124
|
-
"required": ["type", "text"]
|
|
125
|
-
},
|
|
126
|
-
"window": {
|
|
127
|
-
"type": "object",
|
|
128
|
-
"title": "Window",
|
|
129
|
-
"description": "Any pop-up window",
|
|
130
|
-
"properties": {
|
|
131
|
-
"type": {
|
|
132
|
-
"enum": ["window"]
|
|
133
|
-
},
|
|
134
|
-
"description": {"title": "Description", "type": "string"}
|
|
135
|
-
},
|
|
136
|
-
"additionalProperties": false,
|
|
137
|
-
"required": ["type", "description"]
|
|
138
|
-
},
|
|
139
|
-
"modal": {
|
|
140
|
-
"type": "object",
|
|
141
|
-
"title": "Modal",
|
|
142
|
-
"description": "In page modal",
|
|
143
|
-
"properties": {
|
|
144
|
-
"type": {
|
|
145
|
-
"enum": ["modal"]
|
|
146
|
-
},
|
|
147
|
-
"description": {"title": "Description", "type": "string"}
|
|
148
|
-
},
|
|
149
|
-
"additionalProperties": false,
|
|
150
|
-
"required": ["type", "description"]
|
|
151
|
-
},
|
|
152
|
-
"text": {
|
|
153
|
-
"type": "object",
|
|
154
|
-
"title": "Text",
|
|
155
|
-
"description": "Exactly matched text",
|
|
156
|
-
"properties": {
|
|
157
|
-
"type": {
|
|
158
|
-
"enum": ["text"]
|
|
159
|
-
},
|
|
160
|
-
"text": {"title": "Text", "type": "string"}
|
|
161
|
-
},
|
|
162
|
-
"additionalProperties": false,
|
|
163
|
-
"required": ["type", "text"]
|
|
164
|
-
},
|
|
165
11
|
"ui_element": {
|
|
166
12
|
"type": "object",
|
|
167
13
|
"title": "UI Element",
|
|
@@ -170,7 +16,31 @@
|
|
|
170
16
|
"type": {
|
|
171
17
|
"enum": ["ui_element"]
|
|
172
18
|
},
|
|
173
|
-
"element": {"title": "Element", "type": "string"}
|
|
19
|
+
"element": {"title": "Element", "type": "string"},
|
|
20
|
+
"focus_x": {"title": "Focus offset for x-axis from top left corner", "type": "integer", "options": {"hidden": true}},
|
|
21
|
+
"focus_y": {"title": "Focus offset for y-axis from top left corner", "type": "integer", "options": {"hidden": true}},
|
|
22
|
+
"match_mode": {
|
|
23
|
+
"enum": ["pixel", "pixel_and_ocr"]
|
|
24
|
+
},
|
|
25
|
+
"ocr_expression": {
|
|
26
|
+
"title": "Expression to use for text matching",
|
|
27
|
+
"type": "string",
|
|
28
|
+
"maxLength": 999
|
|
29
|
+
},
|
|
30
|
+
"ocr_status": {
|
|
31
|
+
"title": "OCR result description",
|
|
32
|
+
"enum": ["SUCCESS", "TOO_MUCH_TEXT", "NO_TEXT"]
|
|
33
|
+
},
|
|
34
|
+
"ocr_box": {
|
|
35
|
+
"title": "Text content bounding box",
|
|
36
|
+
"type": "object",
|
|
37
|
+
"properties": {
|
|
38
|
+
"x": {"type": "integer"},
|
|
39
|
+
"y": {"type": "integer"},
|
|
40
|
+
"w": {"type": "integer"},
|
|
41
|
+
"h": {"type": "integer"}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
174
44
|
},
|
|
175
45
|
"additionalProperties": false,
|
|
176
46
|
"required": ["type", "element"]
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: wisp-schema
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.19.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jan Grodowski
|
|
@@ -11,13 +11,43 @@ autorequire:
|
|
|
11
11
|
bindir: bin
|
|
12
12
|
cert_chain: []
|
|
13
13
|
date: 2018-11-15 00:00:00.000000000 Z
|
|
14
|
-
dependencies:
|
|
14
|
+
dependencies:
|
|
15
|
+
- !ruby/object:Gem::Dependency
|
|
16
|
+
name: json_schemer
|
|
17
|
+
requirement: !ruby/object:Gem::Requirement
|
|
18
|
+
requirements:
|
|
19
|
+
- - "~>"
|
|
20
|
+
- !ruby/object:Gem::Version
|
|
21
|
+
version: 0.2.17
|
|
22
|
+
type: :runtime
|
|
23
|
+
prerelease: false
|
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
25
|
+
requirements:
|
|
26
|
+
- - "~>"
|
|
27
|
+
- !ruby/object:Gem::Version
|
|
28
|
+
version: 0.2.17
|
|
29
|
+
- !ruby/object:Gem::Dependency
|
|
30
|
+
name: semantic
|
|
31
|
+
requirement: !ruby/object:Gem::Requirement
|
|
32
|
+
requirements:
|
|
33
|
+
- - "~>"
|
|
34
|
+
- !ruby/object:Gem::Version
|
|
35
|
+
version: '1.6'
|
|
36
|
+
type: :runtime
|
|
37
|
+
prerelease: false
|
|
38
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
39
|
+
requirements:
|
|
40
|
+
- - "~>"
|
|
41
|
+
- !ruby/object:Gem::Version
|
|
42
|
+
version: '1.6'
|
|
15
43
|
description: This gem contains Wisp's JSON schema definition
|
|
16
44
|
email:
|
|
17
45
|
executables: []
|
|
18
46
|
extensions: []
|
|
19
47
|
extra_rdoc_files: []
|
|
20
48
|
files:
|
|
49
|
+
- canary-nouns.json
|
|
50
|
+
- canary-wisp.json
|
|
21
51
|
- lib/wisp-schema.rb
|
|
22
52
|
- nouns.json
|
|
23
53
|
- wisp.json
|
|
@@ -40,7 +70,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
40
70
|
- !ruby/object:Gem::Version
|
|
41
71
|
version: '0'
|
|
42
72
|
requirements: []
|
|
43
|
-
rubygems_version: 3.
|
|
73
|
+
rubygems_version: 3.2.3
|
|
44
74
|
signing_key:
|
|
45
75
|
specification_version: 4
|
|
46
76
|
summary: Wisp's schema
|