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

@applitools/screenshoter

Package Overview
Dependencies
Maintainers
23
Versions
173
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@applitools/screenshoter - npm Package Compare versions

Comparing version 3.2.3 to 3.2.4

18

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

@@ -7,6 +7,6 @@ {

"version": "file:../dry-run.tgz",
"integrity": "sha512-g1lcC02PDAyrfC+1pqfHV9TMoDFoudaxC8XJ70F8HblyeIacygUhZbeKERi8nWG9t8Wuztsn/XIGC0N4vcJzjA==",
"integrity": "sha512-Lb3Yt6kerHemQ1wViG33DcqxwC3bylxdL9A4PZXWs1cwYjxpm05j8k/L+fUJKsiR+0jCQJF3AdzFv/SUlooeyw==",
"requires": {
"@applitools/snippets": "2.1.4",
"@applitools/utils": "1.2.2",
"@applitools/snippets": "2.1.7",
"@applitools/utils": "1.2.3",
"png-async": "0.9.4"

@@ -16,10 +16,10 @@ }

"@applitools/snippets": {
"version": "2.1.4",
"resolved": "https://registry.npmjs.org/@applitools/snippets/-/snippets-2.1.4.tgz",
"integrity": "sha512-Jmp+DM9Kj24+ByMaqoKxhMNsefsSshN5+MLyMyrFurb1FGRGoSMmAT5bZCI7zKFG02pxZmjBmenMhpNQbzZR/A=="
"version": "2.1.7",
"resolved": "https://registry.npmjs.org/@applitools/snippets/-/snippets-2.1.7.tgz",
"integrity": "sha512-Tr4Gj7Qov/oPy+8WI4oVmmubxqpOzr8P3Wjzpl6rA57xKLg6/TiIg5oZNb4+jEmO2ShjNYLaEwRWHl7kPgb4fw=="
},
"@applitools/utils": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/@applitools/utils/-/utils-1.2.2.tgz",
"integrity": "sha512-SyHY41J+hkZR9gma/M8gjbJXLXeLoVS5DQVYd/RinzWAq62Yvg9eA97+8oHDl8s+6ELK6wMcs4yajjqCPdpF0A=="
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/@applitools/utils/-/utils-1.2.3.tgz",
"integrity": "sha512-MZXsrzeHTvjFLzpfyKRDUmZWzNxH3gWd3reqYf+1kYimALKB3CO82VDNmkaGJykrRbxEP03Yqha7fHJj9eKslQ=="
},

@@ -26,0 +26,0 @@ "png-async": {

@@ -7,2 +7,8 @@

## 3.2.4 - 2021/9/9
- handle selectors that evaluate to elements from a different context
- updated to @applitools/snippets@2.1.7 (from 2.1.4)
- updated to @applitools/utils@1.2.3 (from 1.2.2)
## 3.2.3 - 2021/8/13

@@ -9,0 +15,0 @@

{
"name": "@applitools/screenshoter",
"version": "3.2.3",
"version": "3.2.4",
"description": "Applitools universal screenshoter for web and native applications",

@@ -51,9 +51,9 @@ "keywords": [

"dependencies": {
"@applitools/snippets": "2.1.4",
"@applitools/utils": "1.2.2",
"@applitools/snippets": "2.1.7",
"@applitools/utils": "1.2.3",
"png-async": "0.9.4"
},
"devDependencies": {
"@applitools/driver": "1.1.3",
"@applitools/sdk-release-kit": "0.13.0",
"@applitools/driver": "1.2.0",
"@applitools/sdk-release-kit": "0.13.3",
"eslint": "^7.9.0",

@@ -60,0 +60,0 @@ "eslint-plugin-mocha-no-only": "^1.1.1",

@@ -112,2 +112,4 @@ const utils = require('@applitools/utils')

const elementContext = element.context
if (fully) {

@@ -117,7 +119,7 @@ const isScrollable = await element.isScrollable()

const region = isScrollable ? null : await element.getRegion()
const scrollingElement = isScrollable ? element : await context.getScrollingElement()
const scrollingElement = isScrollable ? element : await elementContext.getScrollingElement()
// css stitching could be applied only to root element of its context
scrollingMode = scrollingMode === 'css' && !(await scrollingElement.isRoot()) ? 'mixed' : scrollingMode
return {
context,
context: elementContext,
region,

@@ -129,3 +131,3 @@ scroller: makeScroller({element: scrollingElement, scrollingMode, logger}),

return {
context,
context: elementContext,
region: await element.getRegion(),

@@ -132,0 +134,0 @@ scroller: makeScroller({element: scrollingElement, scrollingMode, logger}),

@@ -13,8 +13,2 @@ const webdriverio = require('webdriverio')

function transformSelector(selector) {
if (!utils.types.has(selector, ['type', 'selector'])) return selector
else if (selector.type === 'css') return `css selector:${selector.selector}`
else return `${selector.type}:${selector.selector}`
}
// #endregion

@@ -33,7 +27,3 @@

function isSelector(selector) {
return (
utils.types.isString(selector) ||
utils.types.isFunction(selector) ||
utils.types.has(selector, ['type', 'selector'])
)
return utils.types.isString(selector) || utils.types.isFunction(selector)
}

@@ -44,2 +34,10 @@ function transformElement(element) {

}
function transformSelector(selector) {
if (utils.types.has(selector, 'selector')) {
if (!utils.types.has(selector, 'type')) return selector.selector
if (selector.type === 'css') return `css selector:${selector.selector}`
else return `${selector.type}:${selector.selector}`
}
return selector
}
function extractSelector(element) {

@@ -80,7 +78,7 @@ return element.selector

async function findElement(browser, selector) {
const element = await browser.$(transformSelector(selector))
const element = await browser.$(selector)
return !element.error ? element : null
}
async function findElements(browser, selector) {
const elements = await browser.$$(transformSelector(selector))
const elements = await browser.$$(selector)
return Array.from(elements)

@@ -272,2 +270,3 @@ }

transformElement,
transformSelector,
extractSelector,

@@ -274,0 +273,0 @@ isEqualElements,

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