mirror of
https://github.com/appium/appium.git
synced 2026-11-04 16:25:32 +08:00
Compare commits
5
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5b043cc1ab | ||
|
|
3fbc4f1fe0 | ||
|
|
7492c3357e | ||
|
|
7fd9d5f626 | ||
|
|
5f25351c9d |
@@ -37,6 +37,9 @@ certificate.key
|
||||
*.pdb
|
||||
.vs
|
||||
|
||||
#vscode
|
||||
.history
|
||||
|
||||
old
|
||||
.tern-project
|
||||
coverage
|
||||
@@ -62,3 +65,4 @@ appium.zip
|
||||
packages/*/LICENSE
|
||||
local_appium_home
|
||||
*.tgz
|
||||
|
||||
|
||||
Generated
+56
-50
@@ -21665,16 +21665,17 @@
|
||||
}
|
||||
},
|
||||
"packages/appium": {
|
||||
"version": "2.7.0",
|
||||
"version": "2.8.0",
|
||||
"hasInstallScript": true,
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@appium/base-driver": "^9.8.0",
|
||||
"@appium/base-plugin": "^2.2.33",
|
||||
"@appium/docutils": "^1.0.9",
|
||||
"@appium/base-driver": "^9.8.1",
|
||||
"@appium/base-plugin": "^2.2.34",
|
||||
"@appium/docutils": "^1.0.10",
|
||||
"@appium/logger": "^1.2.0",
|
||||
"@appium/schema": "~0.5.0",
|
||||
"@appium/support": "^4.3.0",
|
||||
"@appium/types": "^0.19.0",
|
||||
"@appium/support": "^4.4.0",
|
||||
"@appium/types": "^0.19.1",
|
||||
"@sidvind/better-ajv-errors": "2.1.3",
|
||||
"@types/argparse": "2.0.16",
|
||||
"@types/bluebird": "3.5.42",
|
||||
@@ -21766,11 +21767,11 @@
|
||||
},
|
||||
"packages/base-driver": {
|
||||
"name": "@appium/base-driver",
|
||||
"version": "9.8.0",
|
||||
"version": "9.8.1",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@appium/support": "^4.3.0",
|
||||
"@appium/types": "^0.19.0",
|
||||
"@appium/support": "^4.4.0",
|
||||
"@appium/types": "^0.19.1",
|
||||
"@colors/colors": "1.6.0",
|
||||
"@types/async-lock": "1.4.2",
|
||||
"@types/bluebird": "3.5.42",
|
||||
@@ -21834,11 +21835,11 @@
|
||||
},
|
||||
"packages/base-plugin": {
|
||||
"name": "@appium/base-plugin",
|
||||
"version": "2.2.33",
|
||||
"version": "2.2.34",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@appium/base-driver": "^9.8.0",
|
||||
"@appium/support": "^4.3.0"
|
||||
"@appium/base-driver": "^9.8.1",
|
||||
"@appium/support": "^4.4.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^14.17.0 || ^16.13.0 || >=18.0.0",
|
||||
@@ -21847,10 +21848,10 @@
|
||||
},
|
||||
"packages/doctor": {
|
||||
"name": "@appium/doctor",
|
||||
"version": "2.1.0",
|
||||
"version": "2.1.1",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@appium/support": "^4.3.0",
|
||||
"@appium/support": "^4.4.0",
|
||||
"@colors/colors": "1.6.0",
|
||||
"@types/bluebird": "3.5.42",
|
||||
"@types/teen_process": "2.0.4",
|
||||
@@ -22063,10 +22064,10 @@
|
||||
},
|
||||
"packages/docutils": {
|
||||
"name": "@appium/docutils",
|
||||
"version": "1.0.9",
|
||||
"version": "1.0.10",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@appium/support": "^4.3.0",
|
||||
"@appium/support": "^4.4.0",
|
||||
"@appium/tsconfig": "^0.3.3",
|
||||
"@sliphua/lilconfig-ts-loader": "3.2.2",
|
||||
"@types/which": "3.0.4",
|
||||
@@ -22205,10 +22206,10 @@
|
||||
},
|
||||
"packages/driver-test-support": {
|
||||
"name": "@appium/driver-test-support",
|
||||
"version": "0.4.25",
|
||||
"version": "0.4.26",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@appium/types": "^0.19.0",
|
||||
"@appium/types": "^0.19.1",
|
||||
"@types/lodash": "4.17.4",
|
||||
"@types/stoppable": "1.1.3",
|
||||
"axios": "1.7.2",
|
||||
@@ -22330,11 +22331,11 @@
|
||||
},
|
||||
"packages/fake-plugin": {
|
||||
"name": "@appium/fake-plugin",
|
||||
"version": "3.1.37",
|
||||
"version": "3.1.38",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@appium/base-plugin": "^2.2.33",
|
||||
"@appium/support": "^4.3.0",
|
||||
"@appium/base-plugin": "^2.2.34",
|
||||
"@appium/support": "^4.4.0",
|
||||
"@types/bluebird": "3.5.42",
|
||||
"bluebird": "3.7.2",
|
||||
"lodash": "4.17.21",
|
||||
@@ -22350,11 +22351,11 @@
|
||||
},
|
||||
"packages/images-plugin": {
|
||||
"name": "@appium/images-plugin",
|
||||
"version": "3.0.8",
|
||||
"version": "3.0.9",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@appium/opencv": "^3.0.4",
|
||||
"@appium/support": "^4.3.0",
|
||||
"@appium/support": "^4.4.0",
|
||||
"lodash": "4.17.21",
|
||||
"lru-cache": "10.2.2",
|
||||
"sharp": "0.33.4",
|
||||
@@ -22445,7 +22446,7 @@
|
||||
},
|
||||
"packages/logger": {
|
||||
"name": "@appium/logger",
|
||||
"version": "1.1.0",
|
||||
"version": "1.2.0",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"console-control-strings": "1.1.0",
|
||||
@@ -22542,10 +22543,10 @@
|
||||
},
|
||||
"packages/plugin-test-support": {
|
||||
"name": "@appium/plugin-test-support",
|
||||
"version": "0.3.32",
|
||||
"version": "0.3.33",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@appium/types": "^0.19.0",
|
||||
"@appium/types": "^0.19.1",
|
||||
"get-port": "5.1.1",
|
||||
"log-symbols": "4.1.0",
|
||||
"source-map-support": "0.5.21",
|
||||
@@ -22605,11 +22606,12 @@
|
||||
},
|
||||
"packages/support": {
|
||||
"name": "@appium/support",
|
||||
"version": "4.3.0",
|
||||
"version": "4.4.0",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@appium/logger": "^1.2.0",
|
||||
"@appium/tsconfig": "^0.3.3",
|
||||
"@appium/types": "^0.19.0",
|
||||
"@appium/types": "^0.19.1",
|
||||
"@colors/colors": "1.6.0",
|
||||
"@types/archiver": "6.0.2",
|
||||
"@types/base64-stream": "1.0.5",
|
||||
@@ -22875,10 +22877,10 @@
|
||||
},
|
||||
"packages/test-support": {
|
||||
"name": "@appium/test-support",
|
||||
"version": "3.0.37",
|
||||
"version": "3.0.38",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@appium/support": "^4.3.0",
|
||||
"@appium/support": "^4.4.0",
|
||||
"@colors/colors": "1.6.0",
|
||||
"bluebird": "3.7.2",
|
||||
"lodash": "4.17.21",
|
||||
@@ -22909,9 +22911,10 @@
|
||||
},
|
||||
"packages/types": {
|
||||
"name": "@appium/types",
|
||||
"version": "0.19.0",
|
||||
"version": "0.19.1",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@appium/logger": "^1.2.0",
|
||||
"@appium/schema": "^0.5.0",
|
||||
"@appium/tsconfig": "^0.3.3",
|
||||
"@types/express": "4.17.21",
|
||||
@@ -22937,7 +22940,7 @@
|
||||
},
|
||||
"packages/universal-xml-plugin": {
|
||||
"name": "@appium/universal-xml-plugin",
|
||||
"version": "1.0.19",
|
||||
"version": "1.0.20",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@types/xmldom": "0.1.34",
|
||||
@@ -22984,8 +22987,8 @@
|
||||
"@appium/base-driver": {
|
||||
"version": "file:packages/base-driver",
|
||||
"requires": {
|
||||
"@appium/support": "^4.3.0",
|
||||
"@appium/types": "^0.19.0",
|
||||
"@appium/support": "^4.4.0",
|
||||
"@appium/types": "^0.19.1",
|
||||
"@colors/colors": "1.6.0",
|
||||
"@types/async-lock": "1.4.2",
|
||||
"@types/bluebird": "3.5.42",
|
||||
@@ -23035,14 +23038,14 @@
|
||||
"@appium/base-plugin": {
|
||||
"version": "file:packages/base-plugin",
|
||||
"requires": {
|
||||
"@appium/base-driver": "^9.8.0",
|
||||
"@appium/support": "^4.3.0"
|
||||
"@appium/base-driver": "^9.8.1",
|
||||
"@appium/support": "^4.4.0"
|
||||
}
|
||||
},
|
||||
"@appium/doctor": {
|
||||
"version": "file:packages/doctor",
|
||||
"requires": {
|
||||
"@appium/support": "^4.3.0",
|
||||
"@appium/support": "^4.4.0",
|
||||
"@colors/colors": "1.6.0",
|
||||
"@types/bluebird": "3.5.42",
|
||||
"@types/teen_process": "2.0.4",
|
||||
@@ -23192,7 +23195,7 @@
|
||||
"@appium/docutils": {
|
||||
"version": "file:packages/docutils",
|
||||
"requires": {
|
||||
"@appium/support": "^4.3.0",
|
||||
"@appium/support": "^4.4.0",
|
||||
"@appium/tsconfig": "^0.3.3",
|
||||
"@sliphua/lilconfig-ts-loader": "3.2.2",
|
||||
"@types/which": "3.0.4",
|
||||
@@ -23276,7 +23279,7 @@
|
||||
"@appium/driver-test-support": {
|
||||
"version": "file:packages/driver-test-support",
|
||||
"requires": {
|
||||
"@appium/types": "^0.19.0",
|
||||
"@appium/types": "^0.19.1",
|
||||
"@types/lodash": "4.17.4",
|
||||
"@types/stoppable": "1.1.3",
|
||||
"axios": "1.7.2",
|
||||
@@ -23339,8 +23342,8 @@
|
||||
"@appium/fake-plugin": {
|
||||
"version": "file:packages/fake-plugin",
|
||||
"requires": {
|
||||
"@appium/base-plugin": "^2.2.33",
|
||||
"@appium/support": "^4.3.0",
|
||||
"@appium/base-plugin": "^2.2.34",
|
||||
"@appium/support": "^4.4.0",
|
||||
"@types/bluebird": "3.5.42",
|
||||
"bluebird": "3.7.2",
|
||||
"lodash": "4.17.21",
|
||||
@@ -23351,7 +23354,7 @@
|
||||
"version": "file:packages/images-plugin",
|
||||
"requires": {
|
||||
"@appium/opencv": "^3.0.4",
|
||||
"@appium/support": "^4.3.0",
|
||||
"@appium/support": "^4.4.0",
|
||||
"lodash": "4.17.21",
|
||||
"lru-cache": "10.2.2",
|
||||
"sharp": "0.33.4",
|
||||
@@ -23488,7 +23491,7 @@
|
||||
"@appium/plugin-test-support": {
|
||||
"version": "file:packages/plugin-test-support",
|
||||
"requires": {
|
||||
"@appium/types": "^0.19.0",
|
||||
"@appium/types": "^0.19.1",
|
||||
"get-port": "5.1.1",
|
||||
"log-symbols": "4.1.0",
|
||||
"source-map-support": "0.5.21",
|
||||
@@ -23520,8 +23523,9 @@
|
||||
"@appium/support": {
|
||||
"version": "file:packages/support",
|
||||
"requires": {
|
||||
"@appium/logger": "^1.2.0",
|
||||
"@appium/tsconfig": "^0.3.3",
|
||||
"@appium/types": "^0.19.0",
|
||||
"@appium/types": "^0.19.1",
|
||||
"@colors/colors": "1.6.0",
|
||||
"@types/archiver": "6.0.2",
|
||||
"@types/base64-stream": "1.0.5",
|
||||
@@ -23715,7 +23719,7 @@
|
||||
"@appium/test-support": {
|
||||
"version": "file:packages/test-support",
|
||||
"requires": {
|
||||
"@appium/support": "^4.3.0",
|
||||
"@appium/support": "^4.4.0",
|
||||
"@colors/colors": "1.6.0",
|
||||
"bluebird": "3.7.2",
|
||||
"lodash": "4.17.21",
|
||||
@@ -23733,6 +23737,7 @@
|
||||
"@appium/types": {
|
||||
"version": "file:packages/types",
|
||||
"requires": {
|
||||
"@appium/logger": "^1.2.0",
|
||||
"@appium/schema": "^0.5.0",
|
||||
"@appium/tsconfig": "^0.3.3",
|
||||
"@types/express": "4.17.21",
|
||||
@@ -26920,12 +26925,13 @@
|
||||
"appium": {
|
||||
"version": "file:packages/appium",
|
||||
"requires": {
|
||||
"@appium/base-driver": "^9.8.0",
|
||||
"@appium/base-plugin": "^2.2.33",
|
||||
"@appium/docutils": "^1.0.9",
|
||||
"@appium/base-driver": "^9.8.1",
|
||||
"@appium/base-plugin": "^2.2.34",
|
||||
"@appium/docutils": "^1.0.10",
|
||||
"@appium/logger": "^1.2.0",
|
||||
"@appium/schema": "~0.5.0",
|
||||
"@appium/support": "^4.3.0",
|
||||
"@appium/types": "^0.19.0",
|
||||
"@appium/support": "^4.4.0",
|
||||
"@appium/types": "^0.19.1",
|
||||
"@sidvind/better-ajv-errors": "2.1.3",
|
||||
"@types/argparse": "2.0.16",
|
||||
"@types/bluebird": "3.5.42",
|
||||
|
||||
@@ -3,6 +3,20 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [2.8.0](https://github.com/appium/appium/compare/appium@2.7.0...appium@2.8.0) (2024-06-06)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **logger:** Add the 'debug' level to the default logger ([#20203](https://github.com/appium/appium/issues/20203)) ([7fd9d5f](https://github.com/appium/appium/commit/7fd9d5f6261b385c234580c2bfee4d576905458b))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* add logger dependencies in package.json ([#20205](https://github.com/appium/appium/issues/20205)) ([3fbc4f1](https://github.com/appium/appium/commit/3fbc4f1fe07eadf9c7a2ef8fc9f4ba78dc3486a3))
|
||||
|
||||
|
||||
|
||||
## [2.7.0](https://github.com/appium/appium/compare/appium@2.6.0...appium@2.7.0) (2024-06-06)
|
||||
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ href="https://www.headspin.io/solutions/appium-mobile-test-automation">HeadSpin<
|
||||
|
||||
<div style="text-align:center;width:100%">
|
||||
<a href="https://www.headspin.io/solutions/appium-mobile-test-automation"><img
|
||||
src="/docs/en/assets/images/sponsor-logo-headspin.png" style="width: 300px"/></a>
|
||||
src="/docs/en/latest/assets/images/sponsor-logo-headspin.png" style="width: 300px"/></a>
|
||||
</div>
|
||||
|
||||
HeadSpin is a real device performance and UX analysis cloud, with full support for Appium. When you
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<div class="appium-sponsor-thanks">
|
||||
Supported by
|
||||
<a href="https://www.headspin.io/solutions/appium-mobile-test-automation">
|
||||
<img src="/docs/en/assets/images/sponsor-logo-headspin.png" />
|
||||
<img src="/docs/en/latest/assets/images/sponsor-logo-headspin.png" />
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
import globalLog from '@appium/logger';
|
||||
import {createLogger, format, transports} from 'winston';
|
||||
import {fs, logger} from '@appium/support';
|
||||
import {fs} from '@appium/support';
|
||||
import { APPIUM_LOGGER_NAME } from './logger';
|
||||
import _ from 'lodash';
|
||||
|
||||
// set up distributed logging before everything else
|
||||
logger.patchLogger(globalLog);
|
||||
global._global_npmlog = globalLog;
|
||||
|
||||
// npmlog is used only for emitting, we use winston for output
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "appium",
|
||||
"version": "2.7.0",
|
||||
"version": "2.8.0",
|
||||
"description": "Automation for Apps.",
|
||||
"keywords": [
|
||||
"automation",
|
||||
@@ -60,12 +60,13 @@
|
||||
"test:unit": "mocha \"./test/unit/**/*.spec.js\""
|
||||
},
|
||||
"dependencies": {
|
||||
"@appium/base-driver": "^9.8.0",
|
||||
"@appium/base-plugin": "^2.2.33",
|
||||
"@appium/docutils": "^1.0.9",
|
||||
"@appium/base-driver": "^9.8.1",
|
||||
"@appium/base-plugin": "^2.2.34",
|
||||
"@appium/docutils": "^1.0.10",
|
||||
"@appium/logger": "^1.2.0",
|
||||
"@appium/schema": "~0.5.0",
|
||||
"@appium/support": "^4.3.0",
|
||||
"@appium/types": "^0.19.0",
|
||||
"@appium/support": "^4.4.0",
|
||||
"@appium/types": "^0.19.1",
|
||||
"@sidvind/better-ajv-errors": "2.1.3",
|
||||
"@types/argparse": "2.0.16",
|
||||
"@types/bluebird": "3.5.42",
|
||||
|
||||
@@ -3,6 +3,14 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [9.8.1](https://github.com/appium/appium/compare/@appium/base-driver@9.8.0...@appium/base-driver@9.8.1) (2024-06-06)
|
||||
|
||||
**Note:** Version bump only for package @appium/base-driver
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [9.8.0](https://github.com/appium/appium/compare/@appium/base-driver@9.7.0...@appium/base-driver@9.8.0) (2024-06-06)
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@appium/base-driver",
|
||||
"version": "9.8.0",
|
||||
"version": "9.8.1",
|
||||
"description": "Base driver class for Appium drivers",
|
||||
"keywords": [
|
||||
"automation",
|
||||
@@ -44,8 +44,8 @@
|
||||
"test:types": "tsd"
|
||||
},
|
||||
"dependencies": {
|
||||
"@appium/support": "^4.3.0",
|
||||
"@appium/types": "^0.19.0",
|
||||
"@appium/support": "^4.4.0",
|
||||
"@appium/types": "^0.19.1",
|
||||
"@colors/colors": "1.6.0",
|
||||
"@types/async-lock": "1.4.2",
|
||||
"@types/bluebird": "3.5.42",
|
||||
|
||||
@@ -3,6 +3,14 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [2.2.34](https://github.com/appium/appium/compare/@appium/base-plugin@2.2.33...@appium/base-plugin@2.2.34) (2024-06-06)
|
||||
|
||||
**Note:** Version bump only for package @appium/base-plugin
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [2.2.33](https://github.com/appium/appium/compare/@appium/base-plugin@2.2.32...@appium/base-plugin@2.2.33) (2024-06-06)
|
||||
|
||||
**Note:** Version bump only for package @appium/base-plugin
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@appium/base-plugin",
|
||||
"version": "2.2.33",
|
||||
"version": "2.2.34",
|
||||
"description": "The base plugin used to create Appium 2.0 plugins",
|
||||
"keywords": [
|
||||
"automation",
|
||||
@@ -40,8 +40,8 @@
|
||||
"test:unit": "mocha \"./test/unit/**/*.spec.js\""
|
||||
},
|
||||
"dependencies": {
|
||||
"@appium/base-driver": "^9.8.0",
|
||||
"@appium/support": "^4.3.0"
|
||||
"@appium/base-driver": "^9.8.1",
|
||||
"@appium/support": "^4.4.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^14.17.0 || ^16.13.0 || >=18.0.0",
|
||||
|
||||
@@ -3,6 +3,14 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [2.1.1](https://github.com/appium/appium/compare/@appium/doctor@2.1.0...@appium/doctor@2.1.1) (2024-06-06)
|
||||
|
||||
**Note:** Version bump only for package @appium/doctor
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [2.1.0](https://github.com/appium/appium/compare/@appium/doctor@2.0.37...@appium/doctor@2.1.0) (2024-06-06)
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@appium/doctor",
|
||||
"version": "2.1.0",
|
||||
"version": "2.1.1",
|
||||
"description": "Test environment for fitness to run Appium",
|
||||
"keywords": [
|
||||
"automation",
|
||||
@@ -44,7 +44,7 @@
|
||||
"test:unit": "mocha \"./test/unit/**/*.spec.js\""
|
||||
},
|
||||
"dependencies": {
|
||||
"@appium/support": "^4.3.0",
|
||||
"@appium/support": "^4.4.0",
|
||||
"@colors/colors": "1.6.0",
|
||||
"@types/bluebird": "3.5.42",
|
||||
"@types/teen_process": "2.0.4",
|
||||
|
||||
@@ -3,6 +3,14 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.0.10](https://github.com/appium/appium/compare/@appium/docutils@1.0.9...@appium/docutils@1.0.10) (2024-06-06)
|
||||
|
||||
**Note:** Version bump only for package @appium/docutils
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [1.0.9](https://github.com/appium/appium/compare/@appium/docutils@1.0.8...@appium/docutils@1.0.9) (2024-06-06)
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@appium/docutils",
|
||||
"version": "1.0.9",
|
||||
"version": "1.0.10",
|
||||
"description": "Documentation generation utilities for Appium and related projects",
|
||||
"keywords": [
|
||||
"automation",
|
||||
@@ -48,7 +48,7 @@
|
||||
"start": "node ./build/lib/cli/index.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@appium/support": "^4.3.0",
|
||||
"@appium/support": "^4.4.0",
|
||||
"@appium/tsconfig": "^0.3.3",
|
||||
"@sliphua/lilconfig-ts-loader": "3.2.2",
|
||||
"@types/which": "3.0.4",
|
||||
|
||||
@@ -3,6 +3,14 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [0.4.26](https://github.com/appium/appium/compare/@appium/driver-test-support@0.4.25...@appium/driver-test-support@0.4.26) (2024-06-06)
|
||||
|
||||
**Note:** Version bump only for package @appium/driver-test-support
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [0.4.25](https://github.com/appium/appium/compare/@appium/driver-test-support@0.4.24...@appium/driver-test-support@0.4.25) (2024-06-06)
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@appium/driver-test-support",
|
||||
"version": "0.4.25",
|
||||
"version": "0.4.26",
|
||||
"description": "Test utilities for Appium drivers",
|
||||
"keywords": [
|
||||
"automation",
|
||||
@@ -41,7 +41,7 @@
|
||||
},
|
||||
"types": "./build/lib/index.d.ts",
|
||||
"dependencies": {
|
||||
"@appium/types": "^0.19.0",
|
||||
"@appium/types": "^0.19.1",
|
||||
"@types/lodash": "4.17.4",
|
||||
"@types/stoppable": "1.1.3",
|
||||
"axios": "1.7.2",
|
||||
|
||||
@@ -3,6 +3,14 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [3.1.38](https://github.com/appium/appium/compare/@appium/fake-plugin@3.1.37...@appium/fake-plugin@3.1.38) (2024-06-06)
|
||||
|
||||
**Note:** Version bump only for package @appium/fake-plugin
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [3.1.37](https://github.com/appium/appium/compare/@appium/fake-plugin@3.1.36...@appium/fake-plugin@3.1.37) (2024-06-06)
|
||||
|
||||
**Note:** Version bump only for package @appium/fake-plugin
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@appium/fake-plugin",
|
||||
"version": "3.1.37",
|
||||
"version": "3.1.38",
|
||||
"description": "A fake Appium 2.0 plugin",
|
||||
"keywords": [
|
||||
"automation",
|
||||
@@ -39,8 +39,8 @@
|
||||
"test:unit": "mocha \"./test/unit/**/*.spec.js\""
|
||||
},
|
||||
"dependencies": {
|
||||
"@appium/base-plugin": "^2.2.33",
|
||||
"@appium/support": "^4.3.0",
|
||||
"@appium/base-plugin": "^2.2.34",
|
||||
"@appium/support": "^4.4.0",
|
||||
"@types/bluebird": "3.5.42",
|
||||
"bluebird": "3.7.2",
|
||||
"lodash": "4.17.21",
|
||||
|
||||
@@ -3,6 +3,14 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [3.0.9](https://github.com/appium/appium/compare/@appium/images-plugin@3.0.8...@appium/images-plugin@3.0.9) (2024-06-06)
|
||||
|
||||
**Note:** Version bump only for package @appium/images-plugin
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [3.0.8](https://github.com/appium/appium/compare/@appium/images-plugin@3.0.7...@appium/images-plugin@3.0.8) (2024-06-06)
|
||||
|
||||
**Note:** Version bump only for package @appium/images-plugin
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@appium/images-plugin",
|
||||
"version": "3.0.8",
|
||||
"version": "3.0.9",
|
||||
"description": "Plugin for working with images and image elements in Appium",
|
||||
"keywords": [
|
||||
"automation",
|
||||
@@ -40,7 +40,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@appium/opencv": "^3.0.4",
|
||||
"@appium/support": "^4.3.0",
|
||||
"@appium/support": "^4.4.0",
|
||||
"lodash": "4.17.21",
|
||||
"lru-cache": "10.2.2",
|
||||
"sharp": "0.33.4",
|
||||
|
||||
@@ -3,6 +3,15 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.2.0](https://github.com/appium/appium/compare/@appium/logger@1.1.0...@appium/logger@1.2.0) (2024-06-06)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **logger:** Add the 'debug' level to the default logger ([#20203](https://github.com/appium/appium/issues/20203)) ([7fd9d5f](https://github.com/appium/appium/commit/7fd9d5f6261b385c234580c2bfee4d576905458b))
|
||||
|
||||
|
||||
|
||||
## 1.1.0 (2024-06-06)
|
||||
|
||||
|
||||
|
||||
@@ -6,10 +6,12 @@ import consoleControl from 'console-control-strings';
|
||||
import * as util from 'node:util';
|
||||
import type {MessageObject, StyleObject, Logger, LogLevel} from './types';
|
||||
import type {Writable} from 'node:stream';
|
||||
import { unleakString } from './utils';
|
||||
|
||||
const DEFAULT_LOG_LEVELS: any[][] = [
|
||||
['silly', -Infinity, {inverse: true}, 'sill'],
|
||||
['verbose', 1000, {fg: 'cyan', bg: 'black'}, 'verb'],
|
||||
['debug', 1500, {fg: 'cyan', bg: 'black'}, 'dbug'],
|
||||
['info', 2000, {fg: 'green'}],
|
||||
['timing', 2500, {fg: 'green', bg: 'black'}],
|
||||
['http', 3000, {fg: 'green', bg: 'black'}],
|
||||
@@ -114,6 +116,10 @@ export class Log extends EventEmitter implements Logger {
|
||||
this.log('verbose', prefix, message, ...args);
|
||||
}
|
||||
|
||||
debug(prefix: string, message: any, ...args: any[]): void {
|
||||
this.log('debug', prefix, message, ...args);
|
||||
}
|
||||
|
||||
info(prefix: string, message: any, ...args: any[]): void {
|
||||
this.log('info', prefix, message, ...args);
|
||||
}
|
||||
@@ -190,8 +196,8 @@ export class Log extends EventEmitter implements Logger {
|
||||
id: this._id++,
|
||||
timestamp: Date.now(),
|
||||
level,
|
||||
prefix: String(prefix || ''),
|
||||
message: formattedMessage,
|
||||
prefix: unleakString(prefix || ''),
|
||||
message: unleakString(formattedMessage),
|
||||
};
|
||||
|
||||
this.emit('log', m);
|
||||
|
||||
@@ -25,6 +25,7 @@ export interface Logger extends EventEmitter {
|
||||
*/
|
||||
silly(prefix: string, message: any, ...args: any[]): void;
|
||||
verbose(prefix: string, message: any, ...args: any[]): void;
|
||||
debug(prefix: string, message: any, ...args: any[]): void;
|
||||
info(prefix: string, message: any, ...args: any[]): void;
|
||||
timing(prefix: string, message: any, ...args: any[]): void;
|
||||
http(prefix: string, message: any, ...args: any[]): void;
|
||||
@@ -57,6 +58,7 @@ export interface Logger extends EventEmitter {
|
||||
export type LogLevel =
|
||||
| 'silly'
|
||||
| 'verbose'
|
||||
| 'debug'
|
||||
| 'info'
|
||||
| 'timing'
|
||||
| 'http'
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
/**
|
||||
* This function is necessary to workaround unexpected memory leaks
|
||||
* caused by NodeJS string interning
|
||||
* behavior described in https://bugs.chromium.org/p/v8/issues/detail?id=2869
|
||||
*
|
||||
* @param {any} s - The string to unleak
|
||||
* @return {string} Either the unleaked string or the original object converted to string
|
||||
*/
|
||||
export function unleakString(s: any): string {
|
||||
return ` ${s}`.substring(1);
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@appium/logger",
|
||||
"version": "1.1.0",
|
||||
"version": "1.2.0",
|
||||
"author": "https://github.com/appium",
|
||||
"description": "A Universal Logger For The Appium Ecosystem",
|
||||
"repository": {
|
||||
|
||||
@@ -3,6 +3,14 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [0.3.33](https://github.com/appium/appium/compare/@appium/plugin-test-support@0.3.32...@appium/plugin-test-support@0.3.33) (2024-06-06)
|
||||
|
||||
**Note:** Version bump only for package @appium/plugin-test-support
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [0.3.32](https://github.com/appium/appium/compare/@appium/plugin-test-support@0.3.31...@appium/plugin-test-support@0.3.32) (2024-06-06)
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@appium/plugin-test-support",
|
||||
"version": "0.3.32",
|
||||
"version": "0.3.33",
|
||||
"description": "Testing utilities for Appium plugins",
|
||||
"keywords": [
|
||||
"automation",
|
||||
@@ -41,7 +41,7 @@
|
||||
"test:unit": "exit 0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@appium/types": "^0.19.0",
|
||||
"@appium/types": "^0.19.1",
|
||||
"get-port": "5.1.1",
|
||||
"log-symbols": "4.1.0",
|
||||
"source-map-support": "0.5.21",
|
||||
|
||||
@@ -3,6 +3,20 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [4.4.0](https://github.com/appium/appium/compare/@appium/support@4.3.0...@appium/support@4.4.0) (2024-06-06)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **logger:** Add the 'debug' level to the default logger ([#20203](https://github.com/appium/appium/issues/20203)) ([7fd9d5f](https://github.com/appium/appium/commit/7fd9d5f6261b385c234580c2bfee4d576905458b))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* add logger dependencies in package.json ([#20205](https://github.com/appium/appium/issues/20205)) ([3fbc4f1](https://github.com/appium/appium/commit/3fbc4f1fe07eadf9c7a2ef8fc9f4ba78dc3486a3))
|
||||
|
||||
|
||||
|
||||
## [4.3.0](https://github.com/appium/appium/compare/@appium/support@4.2.6...@appium/support@4.3.0) (2024-06-06)
|
||||
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
import globalLog from '@appium/logger';
|
||||
import _ from 'lodash';
|
||||
import {unleakString} from './util';
|
||||
import moment from 'moment';
|
||||
import SECURE_VALUES_PREPROCESSOR from './log-internal';
|
||||
|
||||
@@ -18,16 +17,6 @@ for (let level of LEVELS) {
|
||||
mockLog[level] = () => {};
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {import('@appium/logger').Logger} logger
|
||||
*/
|
||||
function patchLogger(logger) {
|
||||
if (!logger.debug) {
|
||||
logger.addLevel('debug', 1000, {fg: 'blue', bg: 'black'}, 'dbug');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @returns {[import('@appium/logger').Logger, boolean]}
|
||||
@@ -50,7 +39,6 @@ function _getLogger() {
|
||||
// The default value is 10000, which causes excessive memory usage
|
||||
logger.maxRecordSize = MAX_LOG_RECORDS_COUNT;
|
||||
}
|
||||
patchLogger(logger);
|
||||
return [logger, usingGlobalLog];
|
||||
}
|
||||
|
||||
@@ -100,10 +88,7 @@ function getLogger(prefix = null) {
|
||||
for (const arg of args) {
|
||||
const out = _.isError(arg) && arg.stack ? arg.stack : `${arg}`;
|
||||
for (const line of out.split('\n')) {
|
||||
// it is necessary to unleak each line because `split` call
|
||||
// creates "views" to the original string as well as the `substring` one
|
||||
const unleakedLine = unleakString(line);
|
||||
logger[level](actualPrefix, SECURE_VALUES_PREPROCESSOR.preprocess(unleakedLine));
|
||||
logger[level](actualPrefix, SECURE_VALUES_PREPROCESSOR.preprocess(line));
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -111,7 +96,7 @@ function getLogger(prefix = null) {
|
||||
wrappedLogger.errorWithException = function (/** @type {any[]} */ ...args) {
|
||||
this.error(...args);
|
||||
// make sure we have an `Error` object. Wrap if necessary
|
||||
return _.isError(args[0]) ? args[0] : new Error(args.map(unleakString).join('\n'));
|
||||
return _.isError(args[0]) ? args[0] : new Error(args.join('\n'));
|
||||
};
|
||||
/**
|
||||
* @deprecated Use {@link errorWithException} instead
|
||||
@@ -159,7 +144,7 @@ async function loadSecureValuesPreprocessingRules(rulesJsonPath) {
|
||||
// export a default logger with no prefix
|
||||
const log = getLogger();
|
||||
|
||||
export {log, patchLogger, getLogger, loadSecureValuesPreprocessingRules};
|
||||
export {log, getLogger, loadSecureValuesPreprocessingRules};
|
||||
export default log;
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@appium/support",
|
||||
"version": "4.3.0",
|
||||
"version": "4.4.0",
|
||||
"description": "Support libs used across appium packages",
|
||||
"keywords": [
|
||||
"automation",
|
||||
@@ -41,8 +41,9 @@
|
||||
"test:unit": "mocha \"./test/unit/**/*.spec.js\""
|
||||
},
|
||||
"dependencies": {
|
||||
"@appium/logger": "^1.2.0",
|
||||
"@appium/tsconfig": "^0.3.3",
|
||||
"@appium/types": "^0.19.0",
|
||||
"@appium/types": "^0.19.1",
|
||||
"@colors/colors": "1.6.0",
|
||||
"@types/archiver": "6.0.2",
|
||||
"@types/base64-stream": "1.0.5",
|
||||
|
||||
@@ -3,6 +3,14 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [3.0.38](https://github.com/appium/appium/compare/@appium/test-support@3.0.37...@appium/test-support@3.0.38) (2024-06-06)
|
||||
|
||||
**Note:** Version bump only for package @appium/test-support
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [3.0.37](https://github.com/appium/appium/compare/@appium/test-support@3.0.36...@appium/test-support@3.0.37) (2024-06-06)
|
||||
|
||||
**Note:** Version bump only for package @appium/test-support
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@appium/test-support",
|
||||
"version": "3.0.37",
|
||||
"version": "3.0.38",
|
||||
"description": "A collection of test utilities used across Appium packages",
|
||||
"keywords": [
|
||||
"automation",
|
||||
@@ -45,7 +45,7 @@
|
||||
"test:unit": "mocha \"./test/unit/**/*.spec.js\""
|
||||
},
|
||||
"dependencies": {
|
||||
"@appium/support": "^4.3.0",
|
||||
"@appium/support": "^4.4.0",
|
||||
"@colors/colors": "1.6.0",
|
||||
"bluebird": "3.7.2",
|
||||
"lodash": "4.17.21",
|
||||
|
||||
@@ -3,6 +3,15 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [0.19.1](https://github.com/appium/appium/compare/@appium/types@0.19.0...@appium/types@0.19.1) (2024-06-06)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* add logger dependencies in package.json ([#20205](https://github.com/appium/appium/issues/20205)) ([3fbc4f1](https://github.com/appium/appium/commit/3fbc4f1fe07eadf9c7a2ef8fc9f4ba78dc3486a3))
|
||||
|
||||
|
||||
|
||||
## [0.19.0](https://github.com/appium/appium/compare/@appium/types@0.18.0...@appium/types@0.19.0) (2024-06-06)
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@appium/types",
|
||||
"version": "0.19.0",
|
||||
"version": "0.19.1",
|
||||
"description": "Various type declarations used across Appium",
|
||||
"keywords": [
|
||||
"automation",
|
||||
@@ -38,6 +38,7 @@
|
||||
"test:types": "tsd"
|
||||
},
|
||||
"dependencies": {
|
||||
"@appium/logger": "^1.2.0",
|
||||
"@appium/schema": "^0.5.0",
|
||||
"@appium/tsconfig": "^0.3.3",
|
||||
"@types/express": "4.17.21",
|
||||
|
||||
@@ -3,6 +3,15 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.0.20](https://github.com/appium/appium-plugins/compare/@appium/universal-xml-plugin@1.0.19...@appium/universal-xml-plugin@1.0.20) (2024-06-06)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **universal-xml-plugin:** add checks to disable the plguin in webview ([#20179](https://github.com/appium/appium-plugins/issues/20179)) ([7492c33](https://github.com/appium/appium-plugins/commit/7492c3357e72b76d301924fdf35a42d228c09175))
|
||||
|
||||
|
||||
|
||||
## [1.0.19](https://github.com/appium/appium-plugins/compare/@appium/universal-xml-plugin@1.0.18...@appium/universal-xml-plugin@1.0.19) (2024-05-27)
|
||||
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ export default class UniversalXMLPlugin extends BasePlugin {
|
||||
`The XML mapper found ${unknowns.nodes.length} node(s) / ` +
|
||||
`tag name(s) that it didn't know about. These should be ` +
|
||||
`reported to improve the quality of the plugin: ` +
|
||||
unknowns.nodes.join(', ')
|
||||
unknowns.nodes.join(', '),
|
||||
);
|
||||
}
|
||||
if (unknowns.attrs.length) {
|
||||
@@ -31,7 +31,7 @@ export default class UniversalXMLPlugin extends BasePlugin {
|
||||
`The XML mapper found ${unknowns.attrs.length} attributes ` +
|
||||
`that it didn't know about. These should be reported to ` +
|
||||
`improve the quality of the plugin: ` +
|
||||
unknowns.attrs.join(', ')
|
||||
unknowns.attrs.join(', '),
|
||||
);
|
||||
}
|
||||
return xml;
|
||||
@@ -47,7 +47,7 @@ export default class UniversalXMLPlugin extends BasePlugin {
|
||||
|
||||
async _find(multiple, next, driver, strategy, selector) {
|
||||
const {platformName} = driver.caps;
|
||||
if (strategy.toLowerCase() !== 'xpath') {
|
||||
if (strategy.toLowerCase() !== 'xpath' || (await driver.getCurrentContext()) !== 'NATIVE_APP') {
|
||||
return await next();
|
||||
}
|
||||
const xml = await this.getPageSource(null, driver, null, true);
|
||||
@@ -58,7 +58,7 @@ export default class UniversalXMLPlugin extends BasePlugin {
|
||||
if (newSelector === null) {
|
||||
log.warn(
|
||||
`Selector was not able to be translated to underlying XML. Either the requested ` +
|
||||
`element does not exist or there was an error in translation`
|
||||
`element does not exist or there was an error in translation`,
|
||||
);
|
||||
if (multiple) {
|
||||
return [];
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@appium/universal-xml-plugin",
|
||||
"version": "1.0.19",
|
||||
"version": "1.0.20",
|
||||
"description": "Appium plugin for making XML source and XPath queries the same across iOS and Android",
|
||||
"keywords": [
|
||||
"automation",
|
||||
|
||||
+2
-1
@@ -9,6 +9,7 @@ const XML_IOS_EDGE_TRANSFORMED = fs.readFileSync(path.resolve(__dirname, 'ios-tr
|
||||
const XML_ANDROID = fs.readFileSync(path.resolve(__dirname, 'android.xml'), 'utf8').trim();
|
||||
const XML_ANDROID_TRANSFORMED = fs.readFileSync(path.resolve(__dirname, 'android-transformed.xml'), 'utf8').trim();
|
||||
const XML_ANDROID_TRANSFORMED_INDEX_PATH = fs.readFileSync(path.resolve(__dirname, 'android-transformed-path.xml'), 'utf8').trim();
|
||||
const XML_WEBVIEW = fs.readFileSync(path.resolve(__dirname, 'web-view.xml'), 'utf8').trim();
|
||||
|
||||
export { XML_IOS, XML_ANDROID, XML_IOS_TRANSFORMED, XML_ANDROID_TRANSFORMED, XML_IOS_TRANSFORMED_INDEX_PATH,
|
||||
XML_ANDROID_TRANSFORMED_INDEX_PATH, XML_IOS_EDGE, XML_IOS_EDGE_TRANSFORMED };
|
||||
XML_ANDROID_TRANSFORMED_INDEX_PATH, XML_IOS_EDGE, XML_IOS_EDGE_TRANSFORMED, XML_WEBVIEW };
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
<html>
|
||||
<body>
|
||||
<div id="section-1">Section 1</div>
|
||||
<div id="section-2">Section 2</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,6 +1,12 @@
|
||||
import {UniversalXMLPlugin} from '../..';
|
||||
import BaseDriver from 'appium/driver';
|
||||
import {XML_IOS, XML_ANDROID, XML_IOS_TRANSFORMED, XML_ANDROID_TRANSFORMED} from '../fixtures';
|
||||
import {
|
||||
XML_IOS,
|
||||
XML_ANDROID,
|
||||
XML_IOS_TRANSFORMED,
|
||||
XML_ANDROID_TRANSFORMED,
|
||||
XML_WEBVIEW,
|
||||
} from '../fixtures';
|
||||
import {runQuery, getNodeAttrVal} from '../../lib/xpath';
|
||||
|
||||
describe('UniversalXMLPlugin', function () {
|
||||
@@ -9,11 +15,13 @@ describe('UniversalXMLPlugin', function () {
|
||||
describe('getPageSource', function () {
|
||||
const driver = new BaseDriver();
|
||||
it('should transform page source for ios', async function () {
|
||||
driver.getCurrentContext = () => 'NATIVE_APP';
|
||||
next = driver.getPageSource = () => XML_IOS;
|
||||
driver.caps = {platformName: 'iOS'};
|
||||
await p.getPageSource(next, driver).should.eventually.eql(XML_IOS_TRANSFORMED);
|
||||
});
|
||||
it('should transform page source for android', async function () {
|
||||
driver.getCurrentContext = () => 'NATIVE_APP';
|
||||
next = driver.getPageSource = () => XML_ANDROID;
|
||||
driver.caps = {platformName: 'Android'};
|
||||
driver.opts = {appPackage: 'io.cloudgrey.the_app'};
|
||||
@@ -24,6 +32,7 @@ describe('UniversalXMLPlugin', function () {
|
||||
describe('findElement(s)', function () {
|
||||
const driver = new BaseDriver();
|
||||
it('should turn an xpath query into another query run on the original ios source', async function () {
|
||||
driver.getCurrentContext = () => 'NATIVE_APP';
|
||||
next = driver.getPageSource = () => XML_IOS;
|
||||
driver.caps = {platformName: 'iOS'};
|
||||
// mock out the findElement function to just return an xml node from the fixture
|
||||
@@ -37,6 +46,7 @@ describe('UniversalXMLPlugin', function () {
|
||||
});
|
||||
|
||||
it('should turn an xpath query into another query run on the original android source', async function () {
|
||||
driver.getCurrentContext = () => 'NATIVE_APP';
|
||||
next = driver.getPageSource = () => XML_ANDROID;
|
||||
driver.caps = {platformName: 'Android'};
|
||||
driver.opts = {appPackage: 'io.cloudgrey.the_app'};
|
||||
@@ -48,5 +58,20 @@ describe('UniversalXMLPlugin', function () {
|
||||
getNodeAttrVal(node, 'content-desc').should.eql('username');
|
||||
node.nodeName.should.eql('android.widget.EditText');
|
||||
});
|
||||
|
||||
it('should not modify the xpath query and proxy the call to underlying driver', async function () {
|
||||
driver.getCurrentContext = () => 'WEB_VIEW';
|
||||
driver.findElement = () => {};
|
||||
driver.caps = {platformName: 'Android'};
|
||||
driver.opts = {appPackage: 'io.cloudgrey.the_app'};
|
||||
const selector = '//div[@id="section-1"]';
|
||||
next = () => {
|
||||
const nodes = runQuery(selector, XML_WEBVIEW);
|
||||
return nodes[0];
|
||||
};
|
||||
const node = await p.findElement(next, driver, 'xpath', selector);
|
||||
getNodeAttrVal(node, 'id').should.eql('section-1');
|
||||
node.nodeName.should.eql('div');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user