Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@applitools/driver

Package Overview
Dependencies
Maintainers
22
Versions
216
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@applitools/driver - npm Package Compare versions

Comparing version 1.0.6 to 1.0.7

2

.bongo/dry-run/package-lock.json

@@ -7,3 +7,3 @@ {

"version": "file:../dry-run.tgz",
"integrity": "sha512-TtHV9qaFeACFqYqzuSJKBKo2hnU0XH4cWZeJNlvJR6mTXNALpXb5eqMRZIfPQFy+1tmHmusPNLQJ8BlQmIPbUw==",
"integrity": "sha512-HyFiAetTZmMS1IbKZrHKlJG0tOhbze0pZPDDjFKB/Q4g68Q2+bqZw1SOqrc1bRlnHtNJ8T8FAU1+rlmtbsInqw==",
"requires": {

@@ -10,0 +10,0 @@ "@applitools/snippets": "2.1.3",

@@ -6,2 +6,6 @@ # Change Log

## 1.0.7 - 2021/6/8
- replace setWindowRect with setWindowSize
## 1.0.6 - 2021/5/24

@@ -8,0 +12,0 @@

{
"name": "@applitools/driver",
"version": "1.0.6",
"version": "1.0.7",
"description": "Applitools universal framework wrapper",

@@ -5,0 +5,0 @@ "keywords": [

@@ -401,7 +401,6 @@ const scripts = require('./scripts')

*/
async getWindowRect() {
const {x = 0, y = 0, width, height} = this.spec.getWindowRect
? await this.spec.getWindowRect(this._driver)
: await this.spec.getViewportSize(this._driver)
return {x, y, width, height}
async getWindowSize() {
return this.spec.getWindowSize
? this.spec.getWindowSize(this._driver)
: this.spec.getViewportSize(this._driver)
}

@@ -412,8 +411,5 @@ /**

*/
async setWindowRect(rect) {
if (this.spec.setWindowRect) {
await this.spec.setWindowRect(this._driver, rect)
} else if (rect.width && rect.height) {
await this.spec.setViewportSize(this._driver, {width: rect.width, height: rect.height})
}
async setWindowSize(size) {
if (this.spec.setWindowSize) await this.spec.setWindowSize(this._driver, size)
else await this.spec.setViewportSize(this._driver, size)
}

@@ -420,0 +416,0 @@ /**

@@ -16,3 +16,3 @@ const utils = require('@applitools/utils')

} else {
const rect = await context.driver.getWindowRect()
const rect = await context.driver.getWindowSize()
size = {width: rect.width, height: rect.height}

@@ -45,9 +45,3 @@ if (size.height > size.width) {

// We move the window to (0,0) to have the best chance to be able to
// set the viewport size as requested.
await context.driver.setWindowRect({x: 0, y: 0}).catch(err => {
logger.verbose('Warning: Failed to move the browser window to (0,0)', err)
})
let actualWindowSize = await context.driver.getWindowRect()
let actualWindowSize = await context.driver.getWindowSize()
actualViewportSize = await getViewportSize(logger, context)

@@ -65,3 +59,3 @@ logger.verbose(`actualWindowSize: ${actualWindowSize}, actualViewportSize: ${actualViewportSize}`)

logger.verbose(`Attempt to set window size to ${requiredWindowSize}. Retries left: ${retries}`)
await context.driver.setWindowRect(requiredWindowSize)
await context.driver.setWindowSize(requiredWindowSize)
await utils.general.sleep(sleep)

@@ -68,0 +62,0 @@ actualViewportSize = await getViewportSize(logger, context)

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc