@rpascene/shared 0.30.12 → 0.30.13
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/es/constants/index.mjs +73 -27
- package/dist/es/node/fs.mjs +1 -1
- package/dist/lib/constants/index.js +79 -27
- package/dist/lib/node/fs.js +1 -1
- package/dist/types/constants/index.d.ts +34 -0
- package/package.json +1 -1
- package/src/constants/index.ts +77 -26
package/package.json
CHANGED
package/src/constants/index.ts
CHANGED
|
@@ -29,53 +29,104 @@ export const DEFAULT_WAIT_FOR_NETWORK_IDLE_CONCURRENCY = 2;
|
|
|
29
29
|
|
|
30
30
|
export { PLAYWRIGHT_EXAMPLE_CODE, YAML_EXAMPLE_CODE } from './example-code';
|
|
31
31
|
|
|
32
|
+
|
|
33
|
+
export const rpasceneCommand = {
|
|
34
|
+
Tap: "Tap",
|
|
35
|
+
RightClick: "RightClick",
|
|
36
|
+
DoubleClick: "DoubleClick",
|
|
37
|
+
Hover: "Hover",
|
|
38
|
+
Input: "Input",
|
|
39
|
+
KeyboardPress: "KeyboardPress",
|
|
40
|
+
Scroll: "Scroll",
|
|
41
|
+
DragAndDrop: "DragAndDrop",
|
|
42
|
+
ClearInput: "ClearInput",
|
|
43
|
+
Sleep: "Sleep",
|
|
44
|
+
LongPress: "LongPress",
|
|
45
|
+
Swipe: "Swipe",
|
|
46
|
+
Reload: "Reload",
|
|
47
|
+
GoBack: "GoBack",
|
|
48
|
+
Navigate: 'Navigate'
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export const rpastudioCommand = {
|
|
52
|
+
SeleniumClickCommand: "SeleniumClickCommand",
|
|
53
|
+
SeleniumRightClickCommand: "SeleniumRightClickCommand",
|
|
54
|
+
SeleniumDoubleClickCommand: "SeleniumDoubleClickCommand",
|
|
55
|
+
SeleniumMouseHoverCommand: "SeleniumMouseHoverCommand",
|
|
56
|
+
SeleniumSetValueCommand: "SeleniumSetValueCommand",
|
|
57
|
+
SeleniumElementSendKeysCommand: "SeleniumElementSendKeysCommand",
|
|
58
|
+
SeleniumSendKeysCommand: "SeleniumSendKeysCommand",
|
|
59
|
+
SeleniumElementScrollCommand: 'SeleniumElementScrollCommand',
|
|
60
|
+
SeleniumWindowScrollCommand: 'SeleniumWindowScrollCommand',
|
|
61
|
+
SeleniumDragAndDropCommand: 'SeleniumDragAndDropCommand',
|
|
62
|
+
SeleniumClearValueCommand: "SeleniumClearValueCommand",
|
|
63
|
+
PauseCommand: "PauseCommand",
|
|
64
|
+
SeleniumBrowserRefreshCommand: "SeleniumBrowserRefreshCommand",
|
|
65
|
+
SeleniumBrowserNavigateBackCommand: 'SeleniumBrowserNavigateBackCommand',
|
|
66
|
+
SeleniumBrowserNavigateCommand: 'SeleniumBrowserNavigateCommand'
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
32
71
|
export const commandMap: any = {
|
|
33
|
-
Tap: {
|
|
34
|
-
CommandName:
|
|
72
|
+
[rpasceneCommand.Tap]: {
|
|
73
|
+
CommandName: rpastudioCommand.SeleniumClickCommand,
|
|
35
74
|
DisplayName: '元素点击'
|
|
36
75
|
},
|
|
37
|
-
RightClick: {
|
|
38
|
-
CommandName:
|
|
76
|
+
[rpasceneCommand.RightClick]: {
|
|
77
|
+
CommandName: rpastudioCommand.SeleniumRightClickCommand,
|
|
39
78
|
DisplayName: "元素右键点击"
|
|
40
79
|
},
|
|
41
|
-
DoubleClick: {
|
|
42
|
-
CommandName:
|
|
80
|
+
[rpasceneCommand.DoubleClick]: {
|
|
81
|
+
CommandName: rpastudioCommand.SeleniumDoubleClickCommand,
|
|
43
82
|
DisplayName: "元素双击"
|
|
44
83
|
},
|
|
45
|
-
Hover: {
|
|
46
|
-
CommandName:
|
|
84
|
+
[rpasceneCommand.Hover]: {
|
|
85
|
+
CommandName: rpastudioCommand.SeleniumMouseHoverCommand,
|
|
47
86
|
DisplayName: "鼠标悬停"
|
|
48
87
|
},
|
|
49
|
-
Input: {
|
|
50
|
-
CommandName:
|
|
88
|
+
[rpasceneCommand.Input]: {
|
|
89
|
+
CommandName: rpastudioCommand.SeleniumSetValueCommand,
|
|
51
90
|
DisplayName: "设置文本"
|
|
52
91
|
},
|
|
53
|
-
KeyboardPress: {
|
|
54
|
-
CommandName:
|
|
92
|
+
[rpasceneCommand.KeyboardPress]: {
|
|
93
|
+
CommandName: rpastudioCommand.SeleniumElementSendKeysCommand,
|
|
55
94
|
DisplayName: "模拟按键"
|
|
56
95
|
},
|
|
57
|
-
Scroll: {
|
|
58
|
-
CommandName:
|
|
96
|
+
[rpasceneCommand.Scroll]: {
|
|
97
|
+
CommandName: rpastudioCommand.SeleniumElementScrollCommand,
|
|
59
98
|
DisplayName: "元素滚动"
|
|
60
99
|
},
|
|
61
|
-
DragAndDrop: {
|
|
62
|
-
CommandName:
|
|
100
|
+
[rpasceneCommand.DragAndDrop]: {
|
|
101
|
+
CommandName: rpastudioCommand.SeleniumDragAndDropCommand,
|
|
63
102
|
DisplayName: "元素拖拽(至指定元素)"
|
|
64
103
|
},
|
|
65
|
-
ClearInput: {
|
|
66
|
-
CommandName:
|
|
104
|
+
[rpasceneCommand.ClearInput]: {
|
|
105
|
+
CommandName: rpastudioCommand.SeleniumClearValueCommand,
|
|
67
106
|
DisplayName: "清空文本"
|
|
68
107
|
},
|
|
69
|
-
Sleep: {
|
|
70
|
-
CommandName:
|
|
108
|
+
[rpasceneCommand.Sleep]: {
|
|
109
|
+
CommandName: rpastudioCommand.PauseCommand,
|
|
71
110
|
DisplayName: "暂停脚本"
|
|
72
111
|
},
|
|
73
|
-
LongPress: {
|
|
74
|
-
CommandName: "
|
|
75
|
-
DisplayName: "
|
|
112
|
+
[rpasceneCommand.LongPress]: {
|
|
113
|
+
CommandName: "",
|
|
114
|
+
DisplayName: ""
|
|
115
|
+
},
|
|
116
|
+
[rpasceneCommand.Swipe]: {
|
|
117
|
+
CommandName: "",
|
|
118
|
+
DisplayName: ""
|
|
119
|
+
},
|
|
120
|
+
[rpasceneCommand.Reload]: {
|
|
121
|
+
CommandName: rpastudioCommand.SeleniumBrowserRefreshCommand,
|
|
122
|
+
DisplayName: "刷新"
|
|
76
123
|
},
|
|
77
|
-
|
|
78
|
-
CommandName:
|
|
79
|
-
DisplayName: "
|
|
124
|
+
[rpasceneCommand.GoBack]: {
|
|
125
|
+
CommandName: rpastudioCommand.SeleniumBrowserNavigateBackCommand,
|
|
126
|
+
DisplayName: "后退"
|
|
80
127
|
},
|
|
128
|
+
[rpasceneCommand.Navigate]: {
|
|
129
|
+
CommandName: rpastudioCommand.SeleniumBrowserNavigateCommand,
|
|
130
|
+
DisplayName: "打开页面"
|
|
131
|
+
}
|
|
81
132
|
}
|