@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.
@@ -21,54 +21,100 @@ const DEFAULT_WAIT_FOR_NAVIGATION_TIMEOUT = 5000;
21
21
  const DEFAULT_WAIT_FOR_NETWORK_IDLE_TIMEOUT = 2000;
22
22
  const DEFAULT_WAIT_FOR_NETWORK_IDLE_TIME = 300;
23
23
  const DEFAULT_WAIT_FOR_NETWORK_IDLE_CONCURRENCY = 2;
24
+ const rpasceneCommand = {
25
+ Tap: "Tap",
26
+ RightClick: "RightClick",
27
+ DoubleClick: "DoubleClick",
28
+ Hover: "Hover",
29
+ Input: "Input",
30
+ KeyboardPress: "KeyboardPress",
31
+ Scroll: "Scroll",
32
+ DragAndDrop: "DragAndDrop",
33
+ ClearInput: "ClearInput",
34
+ Sleep: "Sleep",
35
+ LongPress: "LongPress",
36
+ Swipe: "Swipe",
37
+ Reload: "Reload",
38
+ GoBack: "GoBack",
39
+ Navigate: 'Navigate'
40
+ };
41
+ const rpastudioCommand = {
42
+ SeleniumClickCommand: "SeleniumClickCommand",
43
+ SeleniumRightClickCommand: "SeleniumRightClickCommand",
44
+ SeleniumDoubleClickCommand: "SeleniumDoubleClickCommand",
45
+ SeleniumMouseHoverCommand: "SeleniumMouseHoverCommand",
46
+ SeleniumSetValueCommand: "SeleniumSetValueCommand",
47
+ SeleniumElementSendKeysCommand: "SeleniumElementSendKeysCommand",
48
+ SeleniumSendKeysCommand: "SeleniumSendKeysCommand",
49
+ SeleniumElementScrollCommand: 'SeleniumElementScrollCommand',
50
+ SeleniumWindowScrollCommand: 'SeleniumWindowScrollCommand',
51
+ SeleniumDragAndDropCommand: 'SeleniumDragAndDropCommand',
52
+ SeleniumClearValueCommand: "SeleniumClearValueCommand",
53
+ PauseCommand: "PauseCommand",
54
+ SeleniumBrowserRefreshCommand: "SeleniumBrowserRefreshCommand",
55
+ SeleniumBrowserNavigateBackCommand: 'SeleniumBrowserNavigateBackCommand',
56
+ SeleniumBrowserNavigateCommand: 'SeleniumBrowserNavigateCommand'
57
+ };
24
58
  const commandMap = {
25
- Tap: {
26
- CommandName: "SeleniumClickCommand",
59
+ [rpasceneCommand.Tap]: {
60
+ CommandName: rpastudioCommand.SeleniumClickCommand,
27
61
  DisplayName: "\u5143\u7D20\u70B9\u51FB"
28
62
  },
29
- RightClick: {
30
- CommandName: "SeleniumRightClickCommand",
63
+ [rpasceneCommand.RightClick]: {
64
+ CommandName: rpastudioCommand.SeleniumRightClickCommand,
31
65
  DisplayName: "\u5143\u7D20\u53F3\u952E\u70B9\u51FB"
32
66
  },
33
- DoubleClick: {
34
- CommandName: "SeleniumDoubleClickCommand",
67
+ [rpasceneCommand.DoubleClick]: {
68
+ CommandName: rpastudioCommand.SeleniumDoubleClickCommand,
35
69
  DisplayName: "\u5143\u7D20\u53CC\u51FB"
36
70
  },
37
- Hover: {
38
- CommandName: "SeleniumMouseHoverCommand",
71
+ [rpasceneCommand.Hover]: {
72
+ CommandName: rpastudioCommand.SeleniumMouseHoverCommand,
39
73
  DisplayName: "\u9F20\u6807\u60AC\u505C"
40
74
  },
41
- Input: {
42
- CommandName: "SeleniumSetValueCommand",
75
+ [rpasceneCommand.Input]: {
76
+ CommandName: rpastudioCommand.SeleniumSetValueCommand,
43
77
  DisplayName: "\u8BBE\u7F6E\u6587\u672C"
44
78
  },
45
- KeyboardPress: {
46
- CommandName: "SeleniumSendKeysCommand",
79
+ [rpasceneCommand.KeyboardPress]: {
80
+ CommandName: rpastudioCommand.SeleniumElementSendKeysCommand,
47
81
  DisplayName: "\u6A21\u62DF\u6309\u952E"
48
82
  },
49
- Scroll: {
50
- CommandName: "SeleniumElementScrollCommand",
83
+ [rpasceneCommand.Scroll]: {
84
+ CommandName: rpastudioCommand.SeleniumElementScrollCommand,
51
85
  DisplayName: "\u5143\u7D20\u6EDA\u52A8"
52
86
  },
53
- DragAndDrop: {
54
- CommandName: "SeleniumDragDropCommand",
87
+ [rpasceneCommand.DragAndDrop]: {
88
+ CommandName: rpastudioCommand.SeleniumDragAndDropCommand,
55
89
  DisplayName: "\u5143\u7D20\u62D6\u62FD\uFF08\u81F3\u6307\u5B9A\u5143\u7D20\uFF09"
56
90
  },
57
- ClearInput: {
58
- CommandName: "SeleniumClearTextCommand",
91
+ [rpasceneCommand.ClearInput]: {
92
+ CommandName: rpastudioCommand.SeleniumClearValueCommand,
59
93
  DisplayName: "\u6E05\u7A7A\u6587\u672C"
60
94
  },
61
- Sleep: {
62
- CommandName: "SeleniumPauseCommand",
95
+ [rpasceneCommand.Sleep]: {
96
+ CommandName: rpastudioCommand.PauseCommand,
63
97
  DisplayName: "\u6682\u505C\u811A\u672C"
64
98
  },
65
- LongPress: {
66
- CommandName: "SeleniumSendKeysCommand",
67
- DisplayName: "\u6A21\u62DF\u6309\u952E"
99
+ [rpasceneCommand.LongPress]: {
100
+ CommandName: "",
101
+ DisplayName: ""
68
102
  },
69
- Swipe: {
70
- CommandName: "SeleniumClickCommand",
71
- DisplayName: "\u5143\u7D20\u70B9\u51FB"
103
+ [rpasceneCommand.Swipe]: {
104
+ CommandName: "",
105
+ DisplayName: ""
106
+ },
107
+ [rpasceneCommand.Reload]: {
108
+ CommandName: rpastudioCommand.SeleniumBrowserRefreshCommand,
109
+ DisplayName: "\u5237\u65B0"
110
+ },
111
+ [rpasceneCommand.GoBack]: {
112
+ CommandName: rpastudioCommand.SeleniumBrowserNavigateBackCommand,
113
+ DisplayName: "\u540E\u9000"
114
+ },
115
+ [rpasceneCommand.Navigate]: {
116
+ CommandName: rpastudioCommand.SeleniumBrowserNavigateCommand,
117
+ DisplayName: "\u6253\u5F00\u9875\u9762"
72
118
  }
73
119
  };
74
- export { CONTAINER_MINI_HEIGHT, CONTAINER_MINI_WIDTH, DEFAULT_WAIT_FOR_NAVIGATION_TIMEOUT, DEFAULT_WAIT_FOR_NETWORK_IDLE_CONCURRENCY, DEFAULT_WAIT_FOR_NETWORK_IDLE_TIME, DEFAULT_WAIT_FOR_NETWORK_IDLE_TIMEOUT, DEFAULT_WDA_PORT, constants_NodeType as NodeType, PLAYGROUND_SERVER_PORT, PLAYWRIGHT_EXAMPLE_CODE, SCRCPY_SERVER_PORT, TEXT_MAX_SIZE, TEXT_SIZE_THRESHOLD, WEBDRIVER_ELEMENT_ID_KEY, YAML_EXAMPLE_CODE, commandMap };
120
+ export { CONTAINER_MINI_HEIGHT, CONTAINER_MINI_WIDTH, DEFAULT_WAIT_FOR_NAVIGATION_TIMEOUT, DEFAULT_WAIT_FOR_NETWORK_IDLE_CONCURRENCY, DEFAULT_WAIT_FOR_NETWORK_IDLE_TIME, DEFAULT_WAIT_FOR_NETWORK_IDLE_TIMEOUT, DEFAULT_WDA_PORT, constants_NodeType as NodeType, PLAYGROUND_SERVER_PORT, PLAYWRIGHT_EXAMPLE_CODE, SCRCPY_SERVER_PORT, TEXT_MAX_SIZE, TEXT_SIZE_THRESHOLD, WEBDRIVER_ELEMENT_ID_KEY, YAML_EXAMPLE_CODE, commandMap, rpasceneCommand, rpastudioCommand };