-
Notifications
You must be signed in to change notification settings - Fork 11
/
playbook.json
107 lines (107 loc) · 3.49 KB
/
playbook.json
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
{
"type": "object",
"properties": {
"url": {
"type": "string",
"pattern": "^(http|https|file):\/\/[^ \"]+$"
},
"size": {
"type": "object",
"properties": {
"width": {"type": "integer", "minimum": 100},
"height": {"type": "integer", "maximum": 4000}
}
},
"scenario": { "type": "string" },
"actions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"comment": {"type": "string", "description": "action description"},
"delay": {"type": "integer", "minimum": 1, "description": "delay in ms before executing this action"},
"type": {
"type": "string",
"enum": ["exist", "click", "typing", "select", "scroll", "assertInnerText", "reload"],
"description": "action type"
},
"screenshot": {"type": "boolean", "description": "whether to take screenshot and do comparison with previous version after the action has been executed."},
"captureDelay": {"type": "integer", "minimum": 1, "description": "delay in ms before taking screenshot"}
},
"required": ["type"],
"select": { "$data": "0/type" },
"selectCases": {
"exist": {
"required": ["selector"],
"properties": {
"type": {},
"selector": { "type": "string" },
"scrollTo": {"type": "boolean"},
"waitTimeout": {"type": "integer", "minimum": 1}
}
},
"click": {
"required": ["selector"],
"properties": {
"type": {},
"selector": { "type": "string" },
"scrollTo": {"type": "boolean"},
"waitTimeout": {"type": "integer", "minimum": 1}
}
},
"typing": {
"required": ["value"],
"properties": {
"type": {},
"value": { "type": "string" },
"enter": {"type": "boolean"},
"tab": {"type": "boolean"}
}
},
"select": {
"required": ["selector", "selectIndex"],
"properties": {
"type": {},
"selector": { "type": "string" },
"selectIndex": { "type": "integer", "minimum": 0 },
"scrollTo": {"type": "boolean"},
"waitTimeout": {"type": "integer", "minimum": 1}
}
},
"assertInnerText": {
"required": ["selector", "match"],
"properties": {
"type": {},
"selector": { "type": "string" },
"match": { "type": "string"},
"scrollTo": {"type": "boolean"},
"waitTimeout": {"type": "integer", "minimum": 1}
}
},
"scroll": {
"required": ["selector", "position"],
"properties": {
"type": {},
"selector": { "type": "string" },
"position": {
"type": "array",
"items": [
{"type": "number"},
{"type": "number"}
]
},
"scrollTo": {"type": "boolean"},
"waitTimeout": {"type": "integer", "minimum": 1}
}
}
},
"dependencies": {
"captureDelay": ["screenshot"]
}
},
"minItems": 1
},
"imgdir": {"type": "string"}
},
"required": ["url", "scenario", "size", "actions"]
}