@applitools/driver 1.11.51 → 1.12.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.
@@ -28,7 +28,9 @@ function extractCapabilitiesEnvironment(capabilities) {
28
28
  if (!environment.browserName) {
29
29
  environment.isNative = true;
30
30
  }
31
- else if (environment.isIOS && !/mobilesafari/i.test(capabilities.CFBundleIdentifier)) {
31
+ else if (environment.isIOS &&
32
+ capabilities.CFBundleIdentifier &&
33
+ !/mobilesafari/i.test(capabilities.CFBundleIdentifier)) {
32
34
  environment.browserName = undefined;
33
35
  environment.isNative = true;
34
36
  }
package/dist/driver.js CHANGED
@@ -677,8 +677,8 @@ class Driver {
677
677
  let attempt = 0;
678
678
  while (attempt++ < 3) {
679
679
  const requiredWindowSize = {
680
- width: currentWindowSize.width + (requiredViewportSize.width - currentViewportSize.width),
681
- height: currentWindowSize.height + (requiredViewportSize.height - currentViewportSize.height),
680
+ width: Math.max(0, currentWindowSize.width + (requiredViewportSize.width - currentViewportSize.width)),
681
+ height: Math.max(0, currentWindowSize.height + (requiredViewportSize.height - currentViewportSize.height)),
682
682
  };
683
683
  this._logger.log(`Attempt #${attempt} to set viewport size by setting window size to`, requiredWindowSize);
684
684
  await this._spec.setWindowSize(this.target, requiredWindowSize);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applitools/driver",
3
- "version": "1.11.51",
3
+ "version": "1.12.0",
4
4
  "description": "Applitools universal framework wrapper",
5
5
  "keywords": [
6
6
  "applitools",
@@ -81,13 +81,13 @@
81
81
  "postversion": "bongo postversion"
82
82
  },
83
83
  "dependencies": {
84
- "@applitools/logger": "2.0.0",
85
- "@applitools/snippets": "2.4.20",
86
- "@applitools/utils": "1.3.36",
84
+ "@applitools/logger": "2.0.1",
85
+ "@applitools/snippets": "2.4.21",
86
+ "@applitools/utils": "1.3.37",
87
87
  "semver": "7.3.7"
88
88
  },
89
89
  "devDependencies": {
90
- "@applitools/bongo": "^3.0.3",
90
+ "@applitools/bongo": "^3.0.4",
91
91
  "@types/node": "^12.20.55"
92
92
  },
93
93
  "engines": {