@applitools/spec-driver-selenium 1.5.100 → 1.6.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,43 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.6.0](https://github.com/Applitools-Dev/sdk/compare/js/spec-driver-selenium@1.5.101...js/spec-driver-selenium@1.6.0) (2025-07-07)
4
+
5
+
6
+ ### Features
7
+
8
+ * canvas webgl without preserveDrawingBuffer=1 | FLD-3144 ([#3040](https://github.com/Applitools-Dev/sdk/issues/3040)) ([f82d8f1](https://github.com/Applitools-Dev/sdk/commit/f82d8f148f913098752ec7bef8635a46b453d6fa))
9
+
10
+
11
+ ### Dependencies
12
+
13
+ * @applitools/utils bumped to 1.9.0
14
+ #### Features
15
+
16
+ * support https_proxy and http_proxy env variables | FLD-2702 ([#3046](https://github.com/Applitools-Dev/sdk/issues/3046)) ([0633809](https://github.com/Applitools-Dev/sdk/commit/06338099f44bfb149a5829f62c2f9b19e2392850))
17
+ * @applitools/logger bumped to 2.1.5
18
+
19
+ * @applitools/driver bumped to 1.22.0
20
+ #### Features
21
+
22
+ * canvas webgl without preserveDrawingBuffer=1 | FLD-3144 ([#3040](https://github.com/Applitools-Dev/sdk/issues/3040)) ([f82d8f1](https://github.com/Applitools-Dev/sdk/commit/f82d8f148f913098752ec7bef8635a46b453d6fa))
23
+
24
+
25
+
26
+
27
+ ## [1.5.101](https://github.com/Applitools-Dev/sdk/compare/js/spec-driver-selenium@1.5.100...js/spec-driver-selenium@1.5.101) (2025-05-11)
28
+
29
+
30
+ ### Dependencies
31
+
32
+ * @applitools/utils bumped to 1.8.2
33
+ #### Bug Fixes
34
+
35
+ * remove redundant file readings and added rendering concurrency limit ([#2956](https://github.com/Applitools-Dev/sdk/issues/2956)) ([b970180](https://github.com/Applitools-Dev/sdk/commit/b97018010fdf12cb0d202192b22f643c16c569d5))
36
+ * @applitools/logger bumped to 2.1.4
37
+
38
+ * @applitools/driver bumped to 1.21.4
39
+
40
+
3
41
  ## [1.5.100](https://github.com/Applitools-Dev/sdk/compare/js/spec-driver-selenium@1.5.99...js/spec-driver-selenium@1.5.100) (2025-05-07)
4
42
 
5
43
 
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.build = exports.switchWorld = exports.getWorlds = exports.getCurrentWorld = exports.takeScreenshot = exports.performAction = exports.visit = exports.getUrl = exports.getTitle = exports.getCookies = exports.getSystemBars = exports.setOrientation = exports.getOrientation = exports.setWindowSize = exports.getWindowSize = exports.getCapabilities = exports.getDriverInfo = exports.childContext = exports.parentContext = exports.mainContext = exports.click = exports.hover = exports.getElementText = exports.setElementText = exports.getElementAttribute = exports.getElementRegion = exports.waitForSelector = exports.findElements = exports.findElement = exports.executeScript = exports.toSimpleCommonSelector = exports.toSelector = exports.toDriver = exports.isStaleElementError = exports.isEqualElements = exports.isSelector = exports.isElement = exports.isDriver = void 0;
26
+ exports.build = exports.executeBrowserCommands = exports.switchWorld = exports.getWorlds = exports.getCurrentWorld = exports.takeScreenshot = exports.performAction = exports.visit = exports.getUrl = exports.getTitle = exports.getCookies = exports.getSystemBars = exports.setOrientation = exports.getOrientation = exports.setWindowSize = exports.getWindowSize = exports.getCapabilities = exports.getDriverInfo = exports.childContext = exports.parentContext = exports.mainContext = exports.click = exports.hover = exports.getElementText = exports.setElementText = exports.getElementAttribute = exports.getElementRegion = exports.waitForSelector = exports.findElements = exports.findElement = exports.executeScript = exports.toSimpleCommonSelector = exports.toSelector = exports.toDriver = exports.isStaleElementError = exports.isEqualElements = exports.isSelector = exports.isElement = exports.isDriver = void 0;
27
27
  const command_1 = require("selenium-webdriver/lib/command");
28
28
  const Selenium = __importStar(require("selenium-webdriver"));
29
29
  const utils = __importStar(require("@applitools/utils"));
@@ -336,6 +336,27 @@ async function switchWorld(driver, name) {
336
336
  return executeCustomCommand(driver, new command_1.Command('switchToContext').setParameters({ name }));
337
337
  }
338
338
  exports.switchWorld = switchWorld;
339
+ async function executeBrowserCommands(driver, commands, logger) {
340
+ var _a;
341
+ let lastResponse;
342
+ driver.sendDevToolsCommand;
343
+ if (utils.types.isFunction(driver, 'sendAndGetDevToolsCommand')) {
344
+ for (const currentCommand of commands) {
345
+ lastResponse = await driver.sendAndGetDevToolsCommand(currentCommand.command.toString(), (_a = currentCommand.params) !== null && _a !== void 0 ? _a : {});
346
+ logger === null || logger === void 0 ? void 0 : logger.debug(`executeBrowserCommands ${currentCommand.command}, params: ${currentCommand.params}, response: ${JSON.stringify(lastResponse)}`);
347
+ }
348
+ }
349
+ else {
350
+ for (const currentCommand of commands) {
351
+ lastResponse = await executeCustomCommand(driver, new command_1.Command('executeCdp')
352
+ .setParameter('cmd', currentCommand.command)
353
+ .setParameter('params', currentCommand.params));
354
+ logger === null || logger === void 0 ? void 0 : logger.debug(`executeBrowserCommands ${currentCommand.command}, params: ${currentCommand.params}, response: ${JSON.stringify(lastResponse)}`);
355
+ }
356
+ }
357
+ return lastResponse;
358
+ }
359
+ exports.executeBrowserCommands = executeBrowserCommands;
339
360
  const browserOptionsNames = {
340
361
  chrome: 'goog:chromeOptions',
341
362
  firefox: 'moz:firefoxOptions',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applitools/spec-driver-selenium",
3
- "version": "1.5.100",
3
+ "version": "1.6.0",
4
4
  "keywords": [
5
5
  "selenium",
6
6
  "selenium-webdriver",
@@ -46,8 +46,8 @@
46
46
  "up:framework": "echo \"$(jq '.devDependencies[\"selenium-webdriver\"] = $ENV.APPLITOOLS_FRAMEWORK_VERSION' ./package.json)\" > ./package.json"
47
47
  },
48
48
  "dependencies": {
49
- "@applitools/driver": "1.21.3",
50
- "@applitools/utils": "1.8.1"
49
+ "@applitools/driver": "1.22.0",
50
+ "@applitools/utils": "1.9.0"
51
51
  },
52
52
  "devDependencies": {
53
53
  "@applitools/api-extractor": "^1.2.22",
package/types/index.d.ts CHANGED
@@ -54,6 +54,7 @@ export function takeScreenshot(driver: Driver): Promise<string>;
54
54
  export function getCurrentWorld(driver: Driver): Promise<string>;
55
55
  export function getWorlds(driver: Driver): Promise<Array<string>>;
56
56
  export function switchWorld(driver: Driver, name: string): Promise<void>;
57
+ export function executeBrowserCommands(driver: Driver, commands: Array<import('@applitools/driver').BrowserCommand>, logger?: any): Promise<any>;
57
58
  export function build(env: any): Promise<[import('selenium-webdriver').WebDriver & { __applitoolsBrand?: undefined; } & { __serverUrl?: undefined | string; }, () => Promise<void>]>;
58
59
  export type Driver = import('selenium-webdriver').WebDriver & { __applitoolsBrand?: undefined; };
59
60
  export type Element = import('selenium-webdriver').WebElement & { __applitoolsBrand?: undefined; };