@seleniumhq/side-runtime 4.0.0-alpha.0

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.
Files changed (85) hide show
  1. package/dist/callstack.d.ts +23 -0
  2. package/dist/callstack.d.ts.map +1 -0
  3. package/dist/callstack.js +40 -0
  4. package/dist/callstack.js.map +1 -0
  5. package/dist/errors/assertion.d.ts +4 -0
  6. package/dist/errors/assertion.d.ts.map +1 -0
  7. package/dist/errors/assertion.js +28 -0
  8. package/dist/errors/assertion.js.map +1 -0
  9. package/dist/errors/index.d.ts +3 -0
  10. package/dist/errors/index.d.ts.map +1 -0
  11. package/dist/errors/index.js +27 -0
  12. package/dist/errors/index.js.map +1 -0
  13. package/dist/errors/verification.d.ts +4 -0
  14. package/dist/errors/verification.d.ts.map +1 -0
  15. package/dist/errors/verification.js +28 -0
  16. package/dist/errors/verification.js.map +1 -0
  17. package/dist/index.d.ts +17 -0
  18. package/dist/index.d.ts.map +1 -0
  19. package/dist/index.js +54 -0
  20. package/dist/index.js.map +1 -0
  21. package/dist/playback-tree/command-leveler.d.ts +7 -0
  22. package/dist/playback-tree/command-leveler.d.ts.map +1 -0
  23. package/dist/playback-tree/command-leveler.js +73 -0
  24. package/dist/playback-tree/command-leveler.js.map +1 -0
  25. package/dist/playback-tree/command-node.d.ts +54 -0
  26. package/dist/playback-tree/command-node.d.ts.map +1 -0
  27. package/dist/playback-tree/command-node.js +185 -0
  28. package/dist/playback-tree/command-node.js.map +1 -0
  29. package/dist/playback-tree/commands.d.ts +42 -0
  30. package/dist/playback-tree/commands.d.ts.map +1 -0
  31. package/dist/playback-tree/commands.js +137 -0
  32. package/dist/playback-tree/commands.js.map +1 -0
  33. package/dist/playback-tree/control-flow-syntax-error.d.ts +5 -0
  34. package/dist/playback-tree/control-flow-syntax-error.d.ts.map +1 -0
  35. package/dist/playback-tree/control-flow-syntax-error.js +27 -0
  36. package/dist/playback-tree/control-flow-syntax-error.js.map +1 -0
  37. package/dist/playback-tree/index.d.ts +15 -0
  38. package/dist/playback-tree/index.d.ts.map +1 -0
  39. package/dist/playback-tree/index.js +161 -0
  40. package/dist/playback-tree/index.js.map +1 -0
  41. package/dist/playback-tree/state.d.ts +9 -0
  42. package/dist/playback-tree/state.d.ts.map +1 -0
  43. package/dist/playback-tree/state.js +38 -0
  44. package/dist/playback-tree/state.js.map +1 -0
  45. package/dist/playback-tree/syntax-validation.d.ts +4 -0
  46. package/dist/playback-tree/syntax-validation.d.ts.map +1 -0
  47. package/dist/playback-tree/syntax-validation.js +95 -0
  48. package/dist/playback-tree/syntax-validation.js.map +1 -0
  49. package/dist/playback.d.ts +167 -0
  50. package/dist/playback.d.ts.map +1 -0
  51. package/dist/playback.js +627 -0
  52. package/dist/playback.js.map +1 -0
  53. package/dist/plugins.d.ts +6 -0
  54. package/dist/plugins.d.ts.map +1 -0
  55. package/dist/plugins.js +24 -0
  56. package/dist/plugins.js.map +1 -0
  57. package/dist/preprocessors.d.ts +10 -0
  58. package/dist/preprocessors.d.ts.map +1 -0
  59. package/dist/preprocessors.js +179 -0
  60. package/dist/preprocessors.js.map +1 -0
  61. package/dist/recording-syncronizer-webdriver.d.ts +15 -0
  62. package/dist/recording-syncronizer-webdriver.d.ts.map +1 -0
  63. package/dist/recording-syncronizer-webdriver.js +33 -0
  64. package/dist/recording-syncronizer-webdriver.js.map +1 -0
  65. package/dist/recording-syncronizer.d.ts +22 -0
  66. package/dist/recording-syncronizer.d.ts.map +1 -0
  67. package/dist/recording-syncronizer.js +68 -0
  68. package/dist/recording-syncronizer.js.map +1 -0
  69. package/dist/types.d.ts +60 -0
  70. package/dist/types.d.ts.map +1 -0
  71. package/dist/types.js +6 -0
  72. package/dist/types.js.map +1 -0
  73. package/dist/utils.d.ts +2 -0
  74. package/dist/utils.d.ts.map +1 -0
  75. package/dist/utils.js +24 -0
  76. package/dist/utils.js.map +1 -0
  77. package/dist/variables.d.ts +10 -0
  78. package/dist/variables.d.ts.map +1 -0
  79. package/dist/variables.js +41 -0
  80. package/dist/variables.js.map +1 -0
  81. package/dist/webdriver.d.ts +173 -0
  82. package/dist/webdriver.d.ts.map +1 -0
  83. package/dist/webdriver.js +1007 -0
  84. package/dist/webdriver.js.map +1 -0
  85. package/package.json +37 -0
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.getCustomCommands = exports.loadPlugins = void 0;
7
+ const path_1 = __importDefault(require("path"));
8
+ const loadPlugins = (importer, projectPath, project) => {
9
+ return project.plugins.map((pluginPath) => {
10
+ const correctedPluginPath = pluginPath.startsWith('.')
11
+ ? path_1.default.join(projectPath, pluginPath)
12
+ : pluginPath;
13
+ const pluginFile = importer(correctedPluginPath);
14
+ const plugin = pluginFile.default ? pluginFile.default : pluginFile;
15
+ return plugin;
16
+ });
17
+ };
18
+ exports.loadPlugins = loadPlugins;
19
+ const getCustomCommands = (plugins) => plugins.reduce((commands, plugin) => ({
20
+ ...commands,
21
+ ...plugin.commands,
22
+ }), {});
23
+ exports.getCustomCommands = getCustomCommands;
24
+ //# sourceMappingURL=plugins.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugins.js","sourceRoot":"","sources":["../src/plugins.ts"],"names":[],"mappings":";;;;;;AACA,gDAAuB;AAGhB,MAAM,WAAW,GAAG,CACzB,QAAqB,EACrB,WAAmB,EACnB,OAAqB,EACN,EAAE;IACjB,OAAO,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE;QACxC,MAAM,mBAAmB,GAAG,UAAU,CAAC,UAAU,CAAC,GAAG,CAAC;YACpD,CAAC,CAAC,cAAI,CAAC,IAAI,CAAC,WAAW,EAAE,UAAU,CAAC;YACpC,CAAC,CAAC,UAAU,CAAA;QACd,MAAM,UAAU,GAAG,QAAQ,CAAC,mBAAmB,CAAC,CAAA;QAChD,MAAM,MAAM,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,UAAU,CAAA;QACnE,OAAO,MAAM,CAAA;IACf,CAAC,CAAC,CAAA;AACJ,CAAC,CAAA;AAbY,QAAA,WAAW,eAavB;AAEM,MAAM,iBAAiB,GAAG,CAC/B,OAAsB,EACc,EAAE,CACtC,OAAO,CAAC,MAAM,CACZ,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC;IACrB,GAAG,QAAQ;IACX,GAAG,MAAM,CAAC,QAAQ;CACnB,CAAC,EACF,EAAE,CACH,CAAA;AATU,QAAA,iBAAiB,qBAS3B"}
@@ -0,0 +1,10 @@
1
+ import Variables from './variables';
2
+ export declare function composePreprocessors(...args: any[]): any;
3
+ export declare type Interpolator = (value: string, variables: Variables) => string;
4
+ export declare function preprocessArray(interpolator: Interpolator): (items: string[], variables: Variables) => string[][];
5
+ export declare function interpolateString(value: string, variables: Variables): string;
6
+ export declare function interpolateScript(script: string, variables: Variables): {
7
+ script: string;
8
+ argv: any[];
9
+ };
10
+ //# sourceMappingURL=preprocessors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"preprocessors.d.ts","sourceRoot":"","sources":["../src/preprocessors.ts"],"names":[],"mappings":"AAkBA,OAAO,SAAS,MAAM,aAAa,CAAA;AAQnC,wBAAgB,oBAAoB,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,OA6ClD;AAyBD,oBAAY,YAAY,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,KAAK,MAAM,CAAA;AAE1E,wBAAgB,eAAe,CAAC,YAAY,EAAE,YAAY,WACjB,MAAM,EAAE,aAAa,SAAS,gBAGtE;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,UAgCpE;AAED,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS;;;EAwCrE"}
@@ -0,0 +1,179 @@
1
+ "use strict";
2
+ // Licensed to the Software Freedom Conservancy (SFC) under one
3
+ // or more contributor license agreements. See the NOTICE file
4
+ // distributed with this work for additional information
5
+ // regarding copyright ownership. The SFC licenses this file
6
+ // to you under the Apache License, Version 2.0 (the
7
+ // "License"); you may not use this file except in compliance
8
+ // with the License. You may obtain a copy of the License at
9
+ //
10
+ // http://www.apache.org/licenses/LICENSE-2.0
11
+ //
12
+ // Unless required by applicable law or agreed to in writing,
13
+ // software distributed under the License is distributed on an
14
+ // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
+ // KIND, either express or implied. See the License for the
16
+ // specific language governing permissions and limitations
17
+ // under the License.
18
+ Object.defineProperty(exports, "__esModule", { value: true });
19
+ exports.interpolateScript = exports.interpolateString = exports.preprocessArray = exports.composePreprocessors = void 0;
20
+ const nbsp = String.fromCharCode(160);
21
+ // this function is meant to be composed on the prototype of the executor
22
+ // refer to preprocessor.spec.js for an example on how to do so
23
+ // this will define this to be in scope allowing the executor function to
24
+ // have this in scope as well as grant the preprocessor access to the variables
25
+ function composePreprocessors(...args) {
26
+ const func = args[args.length - 1];
27
+ const params = args.slice(0, args.length - 1);
28
+ if (params.length === 0) {
29
+ return func;
30
+ }
31
+ else if (params.length === 1) {
32
+ return function preprocess(target) {
33
+ // @ts-expect-error
34
+ return func.call(this, runPreprocessor(params[0], target, this.variables));
35
+ };
36
+ }
37
+ else if (params.length === 2) {
38
+ return function preprocess(target, value) {
39
+ return func.call(
40
+ // @ts-expect-error
41
+ this,
42
+ // @ts-expect-error
43
+ runPreprocessor(params[0], target, this.variables),
44
+ // @ts-expect-error
45
+ runPreprocessor(params[1], value, this.variables));
46
+ };
47
+ }
48
+ else {
49
+ return function preprocess(target, value, options) {
50
+ if (!options) {
51
+ return func.call(
52
+ // @ts-expect-error
53
+ this,
54
+ // @ts-expect-error
55
+ runPreprocessor(params[0], target, this.variables),
56
+ // @ts-expect-error
57
+ runPreprocessor(params[1], value, this.variables));
58
+ }
59
+ return func.call(
60
+ // @ts-expect-error
61
+ this,
62
+ // @ts-expect-error
63
+ runPreprocessor(params[0], target, this.variables),
64
+ // @ts-expect-error
65
+ runPreprocessor(params[1], value, this.variables),
66
+ // @ts-expect-error
67
+ preprocessObject(params[2], options, this.variables));
68
+ };
69
+ }
70
+ }
71
+ exports.composePreprocessors = composePreprocessors;
72
+ function runPreprocessor(preprocessor, value, ...args) {
73
+ if (typeof preprocessor === 'function') {
74
+ return preprocessor(value, ...args);
75
+ }
76
+ return value;
77
+ }
78
+ function preprocessObject(preprocessors, obj, ...args) {
79
+ const result = { ...obj };
80
+ Object.keys(preprocessors).forEach((prop) => {
81
+ if (result[prop]) {
82
+ result[prop] = runPreprocessor(preprocessors[prop], result[prop], ...args);
83
+ }
84
+ });
85
+ return result;
86
+ }
87
+ function preprocessArray(interpolator) {
88
+ return function preprocessArray(items, variables) {
89
+ return items.map((item) => [interpolator(item[0], variables), item[1]]);
90
+ };
91
+ }
92
+ exports.preprocessArray = preprocessArray;
93
+ function interpolateString(value, variables) {
94
+ value = value.replace(/^\s+/, '');
95
+ value = value.replace(/\s+$/, '');
96
+ let r2;
97
+ let parts = [];
98
+ if (/\$\{/.exec(value)) {
99
+ const regexp = /\$\{(.*?)\}/g;
100
+ let lastIndex = 0;
101
+ while ((r2 = regexp.exec(value))) {
102
+ if (variables.has(r2[1])) {
103
+ if (r2.index - lastIndex > 0) {
104
+ parts.push(string(value.substring(lastIndex, r2.index)));
105
+ }
106
+ parts.push(variables.get(r2[1]));
107
+ lastIndex = regexp.lastIndex;
108
+ }
109
+ else if (r2[1] == 'nbsp') {
110
+ if (r2.index - lastIndex > 0) {
111
+ parts.push(variables.get(string(value.substring(lastIndex, r2.index))));
112
+ }
113
+ parts.push(nbsp);
114
+ lastIndex = regexp.lastIndex;
115
+ }
116
+ }
117
+ if (lastIndex < value.length) {
118
+ parts.push(string(value.substring(lastIndex, value.length)));
119
+ }
120
+ return parts.map(String).join('');
121
+ }
122
+ else {
123
+ return string(value);
124
+ }
125
+ }
126
+ exports.interpolateString = interpolateString;
127
+ function interpolateScript(script, variables) {
128
+ let value = script.replace(/^\s+/, '').replace(/\s+$/, '');
129
+ let r2;
130
+ let parts = [];
131
+ const variablesUsed = {};
132
+ const argv = [];
133
+ let argl = 0; // length of arguments
134
+ if (/\$\{/.exec(value)) {
135
+ const regexp = /\$\{(.*?)\}/g;
136
+ let lastIndex = 0;
137
+ while ((r2 = regexp.exec(value))) {
138
+ const variableName = r2[1];
139
+ if (variables.has(variableName)) {
140
+ if (r2.index - lastIndex > 0) {
141
+ parts.push(string(value.substring(lastIndex, r2.index)));
142
+ }
143
+ if (!Object.prototype.hasOwnProperty.call(variablesUsed, variableName)) {
144
+ variablesUsed[variableName] = argl;
145
+ argv.push(variables.get(variableName));
146
+ argl++;
147
+ }
148
+ parts.push(`arguments[${variablesUsed[variableName]}]`);
149
+ lastIndex = regexp.lastIndex;
150
+ }
151
+ }
152
+ if (lastIndex < value.length) {
153
+ parts.push(string(value.substring(lastIndex, value.length)));
154
+ }
155
+ return {
156
+ script: parts.join(''),
157
+ argv,
158
+ };
159
+ }
160
+ else {
161
+ return {
162
+ script: string(value),
163
+ argv,
164
+ };
165
+ }
166
+ }
167
+ exports.interpolateScript = interpolateScript;
168
+ function string(value) {
169
+ if (value != null) {
170
+ value = value.replace(/\\\\/g, '\\');
171
+ value = value.replace(/\\r/g, '\r');
172
+ value = value.replace(/\\n/g, '\n');
173
+ return value;
174
+ }
175
+ else {
176
+ return '';
177
+ }
178
+ }
179
+ //# sourceMappingURL=preprocessors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"preprocessors.js","sourceRoot":"","sources":["../src/preprocessors.ts"],"names":[],"mappings":";AAAA,+DAA+D;AAC/D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6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SAAS,MAAM,CAAC,KAAoB;IAClC,IAAI,KAAK,IAAI,IAAI,EAAE;QACjB,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC,CAAA;QACpC,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,CAAA;QACnC,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,CAAA;QACnC,OAAO,KAAK,CAAA;KACb;SAAM;QACL,OAAO,EAAE,CAAA;KACV;AACH,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { WebDriverExecutor } from '.';
2
+ export interface RecorderSynchronizerInput {
3
+ executor: WebDriverExecutor;
4
+ sessionId: string;
5
+ logger: Console;
6
+ }
7
+ export default function createRecorderSyncronizerForWebdriverExecutor({ executor, sessionId, logger, }: RecorderSynchronizerInput): {
8
+ hooks: {
9
+ onStoreWindowHandle: ({ windowHandle, windowHandleName, }: import("./recording-syncronizer").WindowFnInput) => Promise<void>;
10
+ onWindowAppeared: ({ windowHandle, windowHandleName, }: import("./recording-syncronizer").WindowFnInput) => Promise<void>;
11
+ onWindowSwitched: ({ windowHandle }: import("./recording-syncronizer").WindowFnInput) => Promise<void>;
12
+ };
13
+ syncAllPendingWindows: () => Promise<void>;
14
+ };
15
+ //# sourceMappingURL=recording-syncronizer-webdriver.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"recording-syncronizer-webdriver.d.ts","sourceRoot":"","sources":["../src/recording-syncronizer-webdriver.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,iBAAiB,EAAE,MAAM,GAAG,CAAA;AAIrC,MAAM,WAAW,yBAAyB;IACxC,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,SAAS,EAAE,MAAM,CAAA;IACjB,MAAM,EAAE,OAAO,CAAA;CAChB;AAED,MAAM,CAAC,OAAO,UAAU,6CAA6C,CAAC,EACpE,QAAQ,EACR,SAAS,EACT,MAAM,GACP,EAAE,yBAAyB;;;;;;;EAU3B"}
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ // Licensed to the Software Freedom Conservancy (SFC) under one
3
+ // or more contributor license agreements. See the NOTICE file
4
+ // distributed with this work for additional information
5
+ // regarding copyright ownership. The SFC licenses this file
6
+ // to you under the Apache License, Version 2.0 (the
7
+ // "License"); you may not use this file except in compliance
8
+ // with the License. You may obtain a copy of the License at
9
+ //
10
+ // http://www.apache.org/licenses/LICENSE-2.0
11
+ //
12
+ // Unless required by applicable law or agreed to in writing,
13
+ // software distributed under the License is distributed on an
14
+ // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
+ // KIND, either express or implied. See the License for the
16
+ // specific language governing permissions and limitations
17
+ // under the License.
18
+ var __importDefault = (this && this.__importDefault) || function (mod) {
19
+ return (mod && mod.__esModule) ? mod : { "default": mod };
20
+ };
21
+ Object.defineProperty(exports, "__esModule", { value: true });
22
+ const recording_syncronizer_1 = __importDefault(require("./recording-syncronizer"));
23
+ function createRecorderSyncronizerForWebdriverExecutor({ executor, sessionId, logger, }) {
24
+ return (0, recording_syncronizer_1.default)({
25
+ sessionId,
26
+ executeAsyncScript: (script) => executor.doExecuteAsyncScript(script),
27
+ switchToWindow: (handle) => executor.driver.switchTo().window(handle),
28
+ getWindowHandle: () => executor.driver.getWindowHandle(),
29
+ logger,
30
+ });
31
+ }
32
+ exports.default = createRecorderSyncronizerForWebdriverExecutor;
33
+ //# sourceMappingURL=recording-syncronizer-webdriver.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"recording-syncronizer-webdriver.js","sourceRoot":"","sources":["../src/recording-syncronizer-webdriver.ts"],"names":[],"mappings":";AAAA,+DAA+D;AAC/D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;;;;;AAGrB,oFAA+D;AAS/D,SAAwB,6CAA6C,CAAC,EACpE,QAAQ,EACR,SAAS,EACT,MAAM,GACoB;IAC1B,OAAO,IAAA,+BAAyB,EAAC;QAC/B,SAAS;QACT,kBAAkB,EAAE,CAAC,MAAmB,EAAE,EAAE,CAC1C,QAAQ,CAAC,oBAAoB,CAAC,MAAM,CAAC;QACvC,cAAc,EAAE,CAAC,MAAc,EAAE,EAAE,CACjC,QAAQ,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC;QAC3C,eAAe,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,eAAe,EAAE;QACxD,MAAM;KACP,CAAC,CAAA;AACJ,CAAC;AAdD,gEAcC"}
@@ -0,0 +1,22 @@
1
+ import { WebDriver } from 'selenium-webdriver';
2
+ import { WebDriverExecutor } from '.';
3
+ export interface RecorderSyncronizerInput {
4
+ sessionId: string;
5
+ executeAsyncScript: WebDriverExecutor['doExecuteAsyncScript'];
6
+ switchToWindow: (handle: string) => Promise<void>;
7
+ getWindowHandle: WebDriver['getWindowHandle'];
8
+ logger: Console;
9
+ }
10
+ export interface WindowFnInput {
11
+ windowHandle: string;
12
+ windowHandleName: string;
13
+ }
14
+ export default function createRecorderSyncronizer({ sessionId, executeAsyncScript, switchToWindow, getWindowHandle, logger, }: RecorderSyncronizerInput): {
15
+ hooks: {
16
+ onStoreWindowHandle: ({ windowHandle, windowHandleName, }: WindowFnInput) => Promise<void>;
17
+ onWindowAppeared: ({ windowHandle, windowHandleName, }: WindowFnInput) => Promise<void>;
18
+ onWindowSwitched: ({ windowHandle }: WindowFnInput) => Promise<void>;
19
+ };
20
+ syncAllPendingWindows: () => Promise<void>;
21
+ };
22
+ //# sourceMappingURL=recording-syncronizer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"recording-syncronizer.d.ts","sourceRoot":"","sources":["../src/recording-syncronizer.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,GAAG,CAAA;AAErC,MAAM,WAAW,wBAAwB;IACvC,SAAS,EAAE,MAAM,CAAA;IACjB,kBAAkB,EAAE,iBAAiB,CAAC,sBAAsB,CAAC,CAAA;IAC7D,cAAc,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IACjD,eAAe,EAAE,SAAS,CAAC,iBAAiB,CAAC,CAAA;IAC7C,MAAM,EAAE,OAAO,CAAA;CAChB;AAED,MAAM,WAAW,aAAa;IAC5B,YAAY,EAAE,MAAM,CAAA;IACpB,gBAAgB,EAAE,MAAM,CAAA;CACzB;AAED,MAAM,CAAC,OAAO,UAAU,yBAAyB,CAAC,EAChD,SAAS,EACT,kBAAkB,EAClB,cAAc,EACd,eAAe,EACf,MAAM,GACP,EAAE,wBAAwB;;mEAOtB,aAAa;gEAQb,aAAa;6CAMkC,aAAa;;;EA0ChE"}
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ // Licensed to the Software Freedom Conservancy (SFC) under one
3
+ // or more contributor license agreements. See the NOTICE file
4
+ // distributed with this work for additional information
5
+ // regarding copyright ownership. The SFC licenses this file
6
+ // to you under the Apache License, Version 2.0 (the
7
+ // "License"); you may not use this file except in compliance
8
+ // with the License. You may obtain a copy of the License at
9
+ //
10
+ // http://www.apache.org/licenses/LICENSE-2.0
11
+ //
12
+ // Unless required by applicable law or agreed to in writing,
13
+ // software distributed under the License is distributed on an
14
+ // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
+ // KIND, either express or implied. See the License for the
16
+ // specific language governing permissions and limitations
17
+ // under the License.
18
+ Object.defineProperty(exports, "__esModule", { value: true });
19
+ function createRecorderSyncronizer({ sessionId, executeAsyncScript, switchToWindow, getWindowHandle, logger, }) {
20
+ const pendingWindows = {};
21
+ const syncedWindows = {};
22
+ async function onStoreWindowHandle({ windowHandle, windowHandleName, }) {
23
+ pendingWindows[windowHandle] = windowHandleName;
24
+ await syncWindowHandle(windowHandle);
25
+ }
26
+ async function onWindowAppeared({ windowHandle, windowHandleName, }) {
27
+ if (!syncedWindows[windowHandle]) {
28
+ pendingWindows[windowHandle] = windowHandleName;
29
+ }
30
+ }
31
+ async function onWindowSwitched({ windowHandle }) {
32
+ if (pendingWindows[windowHandle]) {
33
+ await syncWindowHandle(windowHandle);
34
+ }
35
+ else if (!syncedWindows[windowHandle] && logger) {
36
+ logger.error(`Tried to switch to window handle ${windowHandle} without it appearing first (onWindowAppeared was not called for it)`);
37
+ }
38
+ }
39
+ async function syncAllPendingWindows() {
40
+ const pendingHandles = Object.keys(pendingWindows);
41
+ if (pendingHandles.length) {
42
+ const originalHandle = await getWindowHandle();
43
+ for (let handle of pendingHandles) {
44
+ await switchToWindow(handle);
45
+ await syncWindowHandle(handle);
46
+ }
47
+ await switchToWindow(originalHandle);
48
+ }
49
+ }
50
+ async function syncWindowHandle(windowHandle) {
51
+ await executeAsyncScript({
52
+ script: `return window.sideAPI.setWindowHandle("${pendingWindows[windowHandle]}", "${sessionId}")`,
53
+ argv: [],
54
+ });
55
+ syncedWindows[windowHandle] = pendingWindows[windowHandle];
56
+ delete pendingWindows[windowHandle];
57
+ }
58
+ return {
59
+ hooks: {
60
+ onStoreWindowHandle,
61
+ onWindowAppeared,
62
+ onWindowSwitched,
63
+ },
64
+ syncAllPendingWindows,
65
+ };
66
+ }
67
+ exports.default = createRecorderSyncronizer;
68
+ //# sourceMappingURL=recording-syncronizer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"recording-syncronizer.js","sourceRoot":"","sources":["../src/recording-syncronizer.ts"],"names":[],"mappings":";AAAA,+DAA+D;AAC/D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;A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AAC,CAAA;aAC/B;YAED,MAAM,cAAc,CAAC,cAAc,CAAC,CAAA;SACrC;IACH,CAAC;IAED,KAAK,UAAU,gBAAgB,CAAC,YAAoB;QAClD,MAAM,kBAAkB,CAAC;YACvB,MAAM,EAAE,0CAA0C,cAAc,CAAC,YAAY,CAAC,OAAO,SAAS,IAAI;YAClG,IAAI,EAAE,EAAE;SACT,CAAC,CAAA;QACF,aAAa,CAAC,YAAY,CAAC,GAAG,cAAc,CAAC,YAAY,CAAC,CAAA;QAC1D,OAAO,cAAc,CAAC,YAAY,CAAC,CAAA;IACrC,CAAC;IAED,OAAO;QACL,KAAK,EAAE;YACL,mBAAmB;YACnB,gBAAgB;YAChB,gBAAgB;SACjB;QACD,qBAAqB;KACtB,CAAA;AACH,CAAC;AArED,4CAqEC"}
@@ -0,0 +1,60 @@
1
+ import { CommandShape } from '@seleniumhq/side-model';
2
+ import { CommandType } from '@seleniumhq/side-model/src/Commands';
3
+ import { Fn } from '@seleniumhq/side-commons/src/types';
4
+ import WebDriverExecutor, { WebDriverExecutorHooks } from './webdriver';
5
+ export { Capabilities } from 'selenium-webdriver';
6
+ export interface CommandNodeOptions {
7
+ emitControlFlowEvent?: Fn;
8
+ isValidationDisabled?: boolean;
9
+ }
10
+ /**
11
+ * Modified command shape with additional execute function
12
+ */
13
+ export interface CustomCommandShape extends CommandType {
14
+ execute: (command: CommandShape, driver: WebDriverExecutor) => Promise<void>;
15
+ }
16
+ export interface CommandHookInput {
17
+ command: CommandShape;
18
+ }
19
+ export interface StoreWindowHandleHookInput {
20
+ windowHandle: string;
21
+ windowHandleName: string;
22
+ }
23
+ export interface WindowAppearedHookInput {
24
+ command: CommandShape;
25
+ windowHandleName: CommandShape['windowHandleName'];
26
+ windowHandle: string;
27
+ }
28
+ export interface WindowSwitchedHookInput {
29
+ windowHandle: string;
30
+ }
31
+ export interface NewCommandShape {
32
+ command: string;
33
+ target: string | [string, string][];
34
+ value: string | [string, string][];
35
+ insertBeforeLastCommand: boolean;
36
+ frameLocation: string;
37
+ }
38
+ export interface onCommandRecordedDropResult {
39
+ action: 'drop';
40
+ }
41
+ export interface OnCommandRecordedUpdateResult {
42
+ action: 'update';
43
+ command: NewCommandShape;
44
+ }
45
+ export declare type OnCommandRecordedResult = void | onCommandRecordedDropResult | OnCommandRecordedUpdateResult;
46
+ export interface PluginHooks extends WebDriverExecutorHooks {
47
+ onMessage?: (...args: any[]) => void;
48
+ }
49
+ export interface PluginShape {
50
+ commands?: Record<string, CustomCommandShape>;
51
+ hooks: PluginHooks;
52
+ }
53
+ export interface PluginPreloadOutputShape {
54
+ hooks: {
55
+ onCommandRecorded?: (command: NewCommandShape, event: Event | KeyboardEvent | MouseEvent | MutationRecord[] | undefined) => OnCommandRecordedResult;
56
+ };
57
+ }
58
+ export declare type SendMessage = (...args: any[]) => void;
59
+ export declare type PluginPreloadShape = (sendMessage: SendMessage) => PluginPreloadOutputShape;
60
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAA;AACjE,OAAO,EAAE,EAAE,EAAE,MAAM,oCAAoC,CAAA;AACvD,OAAO,iBAAiB,EAAE,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAA;AAEvE,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAEjD,MAAM,WAAW,kBAAkB;IACjC,oBAAoB,CAAC,EAAE,EAAE,CAAA;IACzB,oBAAoB,CAAC,EAAE,OAAO,CAAA;CAC/B;AAED;;GAEG;AACH,MAAM,WAAW,kBAAmB,SAAQ,WAAW;IACrD,OAAO,EAAE,CAAC,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,iBAAiB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;CAC7E;AAED,MAA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AG,UAAU,GAAG,cAAc,EAAE,GAAG,SAAS,KACrE,uBAAuB,CAAA;KAC7B,CAAA;CACF;AAED,oBAAY,WAAW,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAA;AAElD,oBAAY,kBAAkB,GAAG,CAC/B,WAAW,EAAE,WAAW,KACrB,wBAAwB,CAAA"}
package/dist/types.js ADDED
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Capabilities = void 0;
4
+ var selenium_webdriver_1 = require("selenium-webdriver");
5
+ Object.defineProperty(exports, "Capabilities", { enumerable: true, get: function () { return selenium_webdriver_1.Capabilities; } });
6
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";;;AAKA,yDAAiD;AAAxC,kHAAA,YAAY,OAAA"}
@@ -0,0 +1,2 @@
1
+ export declare function absolutifyUrl(targetUrl: string, baseUrl: string): string;
2
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAiBA,wBAAgB,aAAa,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAExE"}
package/dist/utils.js ADDED
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ // Licensed to the Software Freedom Conservancy (SFC) under one
3
+ // or more contributor license agreements. See the NOTICE file
4
+ // distributed with this work for additional information
5
+ // regarding copyright ownership. The SFC licenses this file
6
+ // to you under the Apache License, Version 2.0 (the
7
+ // "License"); you may not use this file except in compliance
8
+ // with the License. You may obtain a copy of the License at
9
+ //
10
+ // http://www.apache.org/licenses/LICENSE-2.0
11
+ //
12
+ // Unless required by applicable law or agreed to in writing,
13
+ // software distributed under the License is distributed on an
14
+ // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
+ // KIND, either express or implied. See the License for the
16
+ // specific language governing permissions and limitations
17
+ // under the License.
18
+ Object.defineProperty(exports, "__esModule", { value: true });
19
+ exports.absolutifyUrl = void 0;
20
+ function absolutifyUrl(targetUrl, baseUrl) {
21
+ return new URL(targetUrl, baseUrl).href;
22
+ }
23
+ exports.absolutifyUrl = absolutifyUrl;
24
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":";AAAA,+DAA+D;AAC/D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;;;AAErB,SAAgB,aAAa,CAAC,SAAiB,EAAE,OAAe;IAC9D,OAAO,IAAI,GAAG,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,IAAI,CAAA;AACzC,CAAC;AAFD,sCAEC"}
@@ -0,0 +1,10 @@
1
+ export default class Variables {
2
+ constructor();
3
+ storedVars: Map<string, any>;
4
+ get(key: string): any;
5
+ set(key: string, value: any): void;
6
+ has(key: string): boolean;
7
+ delete(key: string): void;
8
+ clear(): void;
9
+ }
10
+ //# sourceMappingURL=variables.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"variables.d.ts","sourceRoot":"","sources":["../src/variables.ts"],"names":[],"mappings":"AAiBA,MAAM,CAAC,OAAO,OAAO,SAAS;;IAI5B,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAE5B,GAAG,CAAC,GAAG,EAAE,MAAM;IAIf,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG;IAI3B,GAAG,CAAC,GAAG,EAAE,MAAM;IAIf,MAAM,CAAC,GAAG,EAAE,MAAM;IAIlB,KAAK;CAGN"}
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ // Licensed to the Software Freedom Conservancy (SFC) under one
3
+ // or more contributor license agreements. See the NOTICE file
4
+ // distributed with this work for additional information
5
+ // regarding copyright ownership. The SFC licenses this file
6
+ // to you under the Apache License, Version 2.0 (the
7
+ // "License"); you may not use this file except in compliance
8
+ // with the License. You may obtain a copy of the License at
9
+ //
10
+ // http://www.apache.org/licenses/LICENSE-2.0
11
+ //
12
+ // Unless required by applicable law or agreed to in writing,
13
+ // software distributed under the License is distributed on an
14
+ // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
+ // KIND, either express or implied. See the License for the
16
+ // specific language governing permissions and limitations
17
+ // under the License.
18
+ Object.defineProperty(exports, "__esModule", { value: true });
19
+ class Variables {
20
+ constructor() {
21
+ this.storedVars = new Map();
22
+ }
23
+ get(key) {
24
+ return this.storedVars.get(key);
25
+ }
26
+ set(key, value) {
27
+ this.storedVars.set(key, value);
28
+ }
29
+ has(key) {
30
+ return this.storedVars.has(key);
31
+ }
32
+ delete(key) {
33
+ if (this.storedVars.has(key))
34
+ this.storedVars.delete(key);
35
+ }
36
+ clear() {
37
+ this.storedVars.clear();
38
+ }
39
+ }
40
+ exports.default = Variables;
41
+ //# sourceMappingURL=variables.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"variables.js","sourceRoot":"","sources":["../src/variables.ts"],"names":[],"mappings":";AAAA,+DAA+D;AAC/D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;;AAErB,MAAqB,SAAS;IAC5B;QACE,IAAI,CAAC,UAAU,GAAG,IAAI,GAAG,EAAE,CAAA;IAC7B,CAAC;IAGD,GAAG,CAAC,GAAW;QACb,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;IACjC,CAAC;IAED,GAAG,CAAC,GAAW,EAAE,KAAU;QACzB,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAA;IACjC,CAAC;IAED,GAAG,CAAC,GAAW;QACb,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;IACjC,CAAC;IAED,MAAM,CAAC,GAAW;QAChB,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC;YAAE,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;IAC3D,CAAC;IAED,KAAK;QACH,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,CAAA;IACzB,CAAC;CACF;AAzBD,4BAyBC"}