@applitools/driver 1.11.51 → 1.11.52
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/capabilities.js +3 -1
- package/dist/driver.js +2 -2
- package/package.json +1 -1
package/dist/capabilities.js
CHANGED
|
@@ -28,7 +28,9 @@ function extractCapabilitiesEnvironment(capabilities) {
|
|
|
28
28
|
if (!environment.browserName) {
|
|
29
29
|
environment.isNative = true;
|
|
30
30
|
}
|
|
31
|
-
else if (environment.isIOS &&
|
|
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);
|