@applitools/snippets 2.4.6 → 2.4.8

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.
Files changed (2) hide show
  1. package/dist/index.js +4 -12
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -22,6 +22,10 @@ exports.focusElement=function(arg){
22
22
  var s=function(){"use strict";return function(n){var r=(void 0===n?[]:n)[0];r&&r.focus()}}();
23
23
  return s(arg)
24
24
  }
25
+ exports.getBrowserInfo=function(arg){
26
+ var s=function(){"use strict";var r="__EYES__APPLITOOLS__";return window[r]=window[r]||{},function(){try{if(window[r].browserInfo){var o=window[r].browserInfo;return"WIP"!==o.status&&delete window[r].browserInfo,JSON.stringify(o)}var n={userAgent:window.navigator.userAgent,pixelRatio:window.devicePixelRatio,viewportScale:window.visualViewport&&window.visualViewport.scale};return window.navigator.userAgentData?(window[r].browserInfo={status:"WIP"},window.navigator.userAgentData.getHighEntropyValues(["brands","platform","platformVersion","model"]).then((function(o){n.userAgentData=o,window[r].browserInfo={status:"SUCCESS",value:n}})).catch((function(o){window[r].browserInfo={status:"ERROR",error:o.message}}))):window[r].browserInfo={status:"SUCCESS",value:n},JSON.stringify(window[r].browserInfo)}catch(o){return window[r].browserInfo={status:"ERROR",error:o.message},JSON.stringify(window[r].browserInfo)}}}();
27
+ return s(arg)
28
+ }
25
29
  exports.getChildFramesInfo=function(arg){
26
30
  var s=function(){"use strict";return function(){var r=document.querySelectorAll("frame, iframe");return Array.prototype.map.call(r,(function(r){return[r,!r.contentDocument,r.src]}))}}();
27
31
  return s(arg)
@@ -78,10 +82,6 @@ exports.getElementXpath=function(arg){
78
82
  var s=function(){"use strict";return function(r){var e=(void 0===r?[]:r)[0],t="",n=e.ownerDocument;if(!n)return t;for(var a=e;a!==n;){var o=Array.prototype.filter.call(a.parentNode.childNodes,(function(r){return r.tagName===a.tagName})).indexOf(a);t="/"+a.tagName+"["+(o+1)+"]"+t,a=a.parentNode}return t}}();
79
83
  return s(arg)
80
84
  }
81
- exports.getPixelRatio=function(arg){
82
- var s=function(){"use strict";return function(){return window.devicePixelRatio}}();
83
- return s(arg)
84
- }
85
85
  exports.getShadowRoot=function(arg){
86
86
  var s=function(){"use strict";return function(t){return(void 0===t?[]:t)[0].shadowRoot}}();
87
87
  return s(arg)
@@ -90,14 +90,6 @@ exports.getText=function(arg){
90
90
  var s=function(){"use strict";return function(n){return n[0].innerText}}();
91
91
  return s(arg)
92
92
  }
93
- exports.getUserAgent=function(arg){
94
- var s=function(){"use strict";return function(){return window.navigator.userAgent}}();
95
- return s(arg)
96
- }
97
- exports.getViewportScale=function(arg){
98
- var s=function(){"use strict";return function(){return window.visualViewport&&window.visualViewport.scale}}();
99
- return s(arg)
100
- }
101
93
  exports.getViewportSize=function(arg){
102
94
  var s=function(){"use strict";return function(){var e=0,t=0;return window.innerHeight?t=window.innerHeight:document.documentElement&&document.documentElement.clientHeight?t=document.documentElement.clientHeight:document.body&&document.body.clientHeight&&(t=document.body.clientHeight),window.innerWidth?e=window.innerWidth:document.documentElement&&document.documentElement.clientWidth?e=document.documentElement.clientWidth:document.body&&document.body.clientWidth&&(e=document.body.clientWidth),{width:e,height:t}}}();
103
95
  return s(arg)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applitools/snippets",
3
- "version": "2.4.6",
3
+ "version": "2.4.8",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/applitools/eyes.sdk.javascript1.git",
@@ -43,11 +43,11 @@
43
43
  "glob": "^7.1.6",
44
44
  "husky": "^4.3.7",
45
45
  "mocha": "^8.1.3",
46
- "playwright": "1.16.3",
46
+ "playwright": "1.27.1",
47
47
  "prettier": "1.19.0",
48
48
  "rollup": "^2.26.11",
49
49
  "rollup-plugin-terser": "^7.0.2",
50
- "webdriverio": "^7.20.2",
50
+ "webdriverio": "^7.25.4",
51
51
  "yargs": "^16.0.3"
52
52
  },
53
53
  "resolutions": {