Compare commits

...
Author SHA1 Message Date
Jonathan Lipps 6344d14665 chore: publish
- appium@2.5.4
 - @appium/base-driver@9.6.0
 - @appium/base-plugin@2.2.31
 - @appium/doctor@2.0.36
 - @appium/docutils@1.0.7
 - @appium/driver-test-support@0.4.23
 - @appium/execute-driver-plugin@3.0.28
 - @appium/fake-plugin@3.1.35
 - @appium/images-plugin@3.0.6
 - @appium/plugin-test-support@0.3.30
 - @appium/support@4.2.5
 - @appium/test-support@3.0.35
 - @appium/types@0.17.0
2024-04-21 14:04:02 -07:00
renovate[bot] 2c2141c8c3 chore(deps): update dependency @types/diff to v5.2.0 2024-04-21 02:46:27 +00:00
renovate[bot] 9d8d43c89a chore(deps): update dependency json-schema-to-typescript to v14 (#20023)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-20 12:29:56 +03:00
renovate[bot] 9ad20ff1c2 fix(execute-driver-plugin): update dependency webdriverio to v8.36.1 2024-04-20 09:15:26 +00:00
Mykola Mokhnach de7e10187c chore(support): Allow to customize shell option for non-windows OSs (#20020) 2024-04-19 23:13:49 +02:00
Mykola Mokhnach 77d2ef74bb chore(bass-driver): Improve capability deprecation warning (#20019) 2024-04-19 20:21:51 +02:00
renovate[bot] 2350c4cd2a chore(deps): update dependency eslint-plugin-mocha to v10.4.3 2024-04-19 15:47:15 +00:00
renovate[bot] 77a27ab16c fix(support): update dependency yauzl to v3.1.3 (#20017)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-19 16:34:26 +03:00
Mykola Mokhnach 8cf3efdbed feat(base-driver): Add onDownload handler to the configureApp helper (#20015) 2024-04-19 13:21:24 +02:00
renovate[bot] 80542b1046 chore(deps): update eslint-related packages to v7.7.0 2024-04-19 05:42:33 +00:00
Mykola Mokhnach 270fd42a20 fix(support): Enable shell option for all npm-related commands on Windows (#20010) 2024-04-18 08:35:32 +02:00
两仪院水月 2205d1d41e docs(appium): update zh uiauto2-driver.md (#20012)
* Docs:Update  zh uiauto2-driver.md

* Update uiauto2-driver.md

delete useless lang usage.
2024-04-17 22:46:46 -07:00
两仪院水月 6738e3d9ee docs(appium): update zh test-py.md (#20011)
* docs: update zh Python Test doc

* Update test-py.md

* Update test-py.md

* Update test-py.md

* Update test-py.md

Make the text more relevant and considerate of Chinese developers, facilitating easier understanding.
2024-04-17 22:46:11 -07:00
renovate[bot] 732cc586c2 chore(docutils): update dependency mkdocs-material to v9.5.18 2024-04-17 11:21:17 +00:00
36 changed files with 887 additions and 485 deletions
+517 -395
View File
File diff suppressed because it is too large Load Diff
+6 -6
View File
@@ -84,7 +84,7 @@
"@tsconfig/node14": "14.1.2",
"@types/chai": "4.3.14",
"@types/chai-as-promised": "7.1.8",
"@types/diff": "5.0.9",
"@types/diff": "5.2.0",
"@types/mocha": "10.0.6",
"@types/node": "20.12.7",
"@types/semver": "7.5.8",
@@ -94,8 +94,8 @@
"@types/teen_process": "2.0.4",
"@types/ws": "8.5.10",
"@types/yargs": "17.0.32",
"@typescript-eslint/eslint-plugin": "7.6.0",
"@typescript-eslint/parser": "7.6.0",
"@typescript-eslint/eslint-plugin": "7.7.0",
"@typescript-eslint/parser": "7.7.0",
"asyncbox": "3.0.0",
"chai": "4.4.1",
"chai-as-promised": "7.1.1",
@@ -107,12 +107,12 @@
"eslint-find-rules": "4.1.0",
"eslint-import-resolver-typescript": "3.6.1",
"eslint-plugin-import": "2.29.1",
"eslint-plugin-mocha": "10.4.2",
"eslint-plugin-mocha": "10.4.3",
"eslint-plugin-promise": "6.1.1",
"fancy-log": "2.0.0",
"finalhandler": "1.2.0",
"get-port": "5.1.1",
"json-schema-to-typescript": "13.1.2",
"json-schema-to-typescript": "14.0.0",
"lerna": "8.1.2",
"log-symbols": "4.1.0",
"midnight-smoker": "8.0.0",
@@ -133,7 +133,7 @@
"tsd": "0.31.0",
"typescript": "5.4.5",
"validate.js": "0.13.1",
"webdriverio": "8.36.0",
"webdriverio": "8.36.1",
"ws": "8.16.0",
"yaml-js": "0.3.1"
},
+9
View File
@@ -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.
## [2.5.4](https://github.com/appium/appium/compare/appium@2.5.3...appium@2.5.4) (2024-04-21)
### Bug Fixes
* **execute-driver-plugin:** update dependency webdriverio to v8.36.1 ([9ad20ff](https://github.com/appium/appium/commit/9ad20ff1c266923f3efe50bfe2ae4b1ab8ecb20a))
## [2.5.3](https://github.com/appium/appium/compare/appium@2.5.2...appium@2.5.3) (2024-04-16)
+46 -2
View File
@@ -1,6 +1,50 @@
---
title: Write a Test (Python)
hide:
- toc
title: 编写一个测试 (Python)
---
[Appium Python Client](https://github.com/appium/python-client) 是官方的Appium Python客户端,可通过pypi里包名为[Appium-Python-Client](https://pypi.org/project/Appium-Python-Client/)进行安装。
它继承自 [Selenium Python Binding](https://pypi.org/project/selenium/),
因此安装Appium Python客户端时会包含selenium绑定。
```bash
pip install Appium-Python-Client
```
TODO
这个示例使用Python内置的`unittest`模块,尽管你可以使用任何你想要的Python测试框架。
Appium Python客户端自动添加`appium:`供应商前缀。
通常你不需要担心前缀。
```python title="test.py"
--8<-- "./sample-code/quickstarts/py/test.py"
```
!!! note
在本指南中,我们不会详细解释Python客户端库或这里发生的所有事情,因此现在不对代码本身进行详细说明。
- 你可能想要特别了解一下Appium [Capabilities](../guides/caps.md)。
- Python客户端GitHub仓库中的[功能测试代码](https://github.com/appium/python-client/tree/master/test/functional)应该有助于找到更多的工作示例。
- [文档](https://appium.github.io/python-client-sphinx/)也有助于找到在Appium Python客户端中定义的方法。
!!! note
示例代码可从 [GitHub Appium仓库](https://github.com/appium/appium/tree/master/packages/appium/sample-code/quickstarts/py) 获取。
基本上,这段代码正在做以下事情:
1. 定义一组“Capabilities”(参数),发送到Appium服务器,以便Appium知道你想要自动化的事物类型。
2. 在内置的 Android 设置应用程序上启动 Appium 会话。
3. 查找“Battery”列表项并点击它。
4. 停顿片刻,纯粹是为了观察自动化视觉效果。。
5. 结束Appium会话。
就这些!让我们试一试。在运行测试之前,请确保你有一个Appium服务器在另一个终端会话中运行,否则你将收到无法连接到服务器的错误。然后,你可以执行脚本:
```bash
python test.py
```
如果一切顺利,在应用再次关闭之前,你会看到 "设置 "应用打开并导航到 "Battery "视图。
恭喜您,您已经开始了您的Appium之旅了!继续阅读一些[下一步骤](./next-steps.md)来探索它吧。
@@ -1,6 +1,86 @@
---
title: Install the UiAutomator2 Driver
---
title: 安装 UiAutomator2 驱动
TODO
---
如果没有[驱动](../intro/drivers.md),你几乎无法使用 Appium,驱动是允许 Appium 自动化特定平台的接口。
!!! info
在本快速入门指南中,我们将自动化一个 Android 平台的应用,因为通过 Appium 进行 Android 自动化的系统要求与 Appium 本身相同(而 iOS 驱动例如,需要你使用 macOS)。
我们将使用的驱动称为 [UiAutomator2 驱动](https://github.com/appium/appium-uiautomator2-driver)。值得访问该驱动的文档并将其加入书签,因为这将是今后不可或缺的参考资料。
## 设置 Android 自动化要求
根据驱动的要求,除了一个运行中的 Appium 服务器,我们还需要设置以下内容:
### Android SDK
- 设置 Android SDK 要求的最简单方法是下载 [Android Studio](https://developer.android.com/studio)。
我们需要使用其 SDK 管理器 (_设置 -> 外观和行为 -> 系统设置 -> Android SDK_) 来下载以下项目:
- Android SDK 平台(选择我们想要自动化的任何 Android 平台,例如,API 级别 30)
- Android SDK 平台工具
- 如果愿意,你也可以不通过 Android Studio 下载这些项目:
- 可以使用 [Android 命令行工具](https://developer.android.com/studio#command-line-tools-only) 中包含的 `sdkmanager` 下载 Android SDK 平台
- [Android SDK 平台工具](https://developer.android.com/tools/releases/platform-tools)
- 设置 `ANDROID_HOME` 环境变量,指向安装 Android SDK 的目录。通常可以在 Android Studio 的 SDK 管理器中找到这个目录的路径。它将包含 `platform-tools` 和其他目录。
### Java JDK
- 安装 Java JDK(对于最新的 Android API 级别,需要 JDK 9,否则需要 JDK 8)。你可以从 [Oracle](https://jdk.java.net/) 或 [Adoptium](https://adoptium.net/en-GB/temurin/releases/) 下载。
确保下载的是 JDK 而不是 JRE。
- 设置 `JAVA_HOME` 环境变量,指向 JDK 的安装目录。它将包含 `bin`、`include` 和其他目录。
### 准备设备
- 如果使用模拟器,使用 Android Studio 创建并启动一个 Android 虚拟设备 (AVD)。
你可能需要下载你想要创建的模拟器的 API 级别的系统镜像。使用 Android Studio 中的 AVD 创建向导通常是完成所有这些操作的最简单方式。
- 如果使用真实设备,应该[为开发设置并启用 USB 调试](https://developer.android.com/studio/debug/dev-options)。
- 连接模拟器或设备后,你可以运行 `adb devices`(通过位于 `$ANDROID_HOME/platform-tools/adb` 的二进制文件)来验证你的设备是否显示为已连接。
一旦你的设备在 `adb` 中显示为已连接,并且你已验证环境变量设置正确,你就可以开始了!如果在这些步骤中遇到任何问题,请参考驱动文档,或必要时查看各种 Android 或 Java 文档网站。
此外,恭喜你:不管你是否打算,你现在已经在你的系统上设置了 Android 开发者工具链,所以你可以开始制作 Android 应用了!
## 安装驱动本身
由于 UiAutomator2 驱动是由核心 Appium 团队维护的,它有一个官方的驱动名称,你可以通过 [Appium 扩展 CLI](../cli/extensions.md) 轻松安装:
```bash
appium driver install uiautomator2
```
它应该产生类似下面的输出:
```
Attempting to find and install driver 'uiautomator2'
✔ Installing 'uiautomator2' using NPM install spec 'appium-uiautomator2-driver'
Driver uiautomator2@2.0.5 successfully installed
- automationName: UiAutomator2
- platformNames: ["Android"]
```
运行此命令将定位并安装 UiAutomator2 驱动的最新版本,使其可用于自动化。请注意,当安装时,它会告诉你哪些平台它适用(在这种情况下是 `Android`),以及在 Appium 会话中使用此驱动时必须使用的自动化名称(在这种情况下是 `UiAutomator2` 的 `appium:automationName` [capability](../guides/caps.md))。
!!! note
在这个快速入门中,我们使用了 [扩展 CLI](../cli/extensions.md) 来安装 UiAutomator2 驱动,但如果你将 Appium 集成到一个 Node.js 项目中,你可能更喜欢使用 `npm` 来管理 Appium 及其相关驱动。要了解更多关于这种技术的信息,请访问关于[管理 Appium 扩展](../guides/managing-exts.md)的指南。
现在,再次启动 Appium 服务器(运行 `appium`),你应该看到新安装的驱动被列为可用:
```
[Appium] Available drivers:
[Appium] - uiautomator2@2.0.5 (automationName 'UiAutomator2')
```
Android 设置完成并且 UiAutomator2 驱动已安装后,你就可以编写你的第一个测试了!现在选择你喜欢的语言并试一试:
<div class="grid cards" markdown>
- :material-language-javascript: [__JavaScript__](./test-js.md)
- :material-language-java: [__Java__](./test-java.md)
- :material-language-python: [__Python__](./test-py.md)
</div>
+6 -6
View File
@@ -1,6 +1,6 @@
{
"name": "appium",
"version": "2.5.3",
"version": "2.5.4",
"description": "Automation for Apps.",
"keywords": [
"automation",
@@ -60,12 +60,12 @@
"test:unit": "mocha \"./test/unit/**/*.spec.js\""
},
"dependencies": {
"@appium/base-driver": "^9.5.4",
"@appium/base-plugin": "^2.2.30",
"@appium/docutils": "^1.0.6",
"@appium/base-driver": "^9.6.0",
"@appium/base-plugin": "^2.2.31",
"@appium/docutils": "^1.0.7",
"@appium/schema": "~0.5.0",
"@appium/support": "^4.2.4",
"@appium/types": "^0.16.2",
"@appium/support": "^4.2.5",
"@appium/types": "^0.17.0",
"@sidvind/better-ajv-errors": "2.1.3",
"@types/argparse": "2.0.16",
"@types/bluebird": "3.5.42",
@@ -1,5 +1,5 @@
{
"devDependencies": {
"webdriverio": "8.36.0"
"webdriverio": "8.36.1"
}
}
+9
View File
@@ -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.
## [9.6.0](https://github.com/appium/appium/compare/@appium/base-driver@9.5.4...@appium/base-driver@9.6.0) (2024-04-21)
### Features
* **base-driver:** Add onDownload handler to the configureApp helper ([#20015](https://github.com/appium/appium/issues/20015)) ([8cf3efd](https://github.com/appium/appium/commit/8cf3efdbed6c0868f2d7838e249a3d2478f186d4))
## [9.5.4](https://github.com/appium/appium/compare/@appium/base-driver@9.5.3...@appium/base-driver@9.5.4) (2024-04-16)
@@ -76,7 +76,10 @@ validator.validators.isArray = function isArray(value) {
validator.validators.deprecated = function deprecated(value, options, key) {
// do not print caps that hasn't been provided.
if (typeof value !== 'undefined' && options) {
log.warn(`${key} is a deprecated capability`);
log.warn(
`The '${key}' capability has been deprecated and must not be used anymore. ` +
`Please check the driver documentation for possible alternatives.`
);
}
return null;
};
+51 -35
View File
@@ -9,7 +9,7 @@ import axios from 'axios';
import B from 'bluebird';
// for compat with running tests transpiled and in-place
const {version: BASEDRIVER_VER} = fs.readPackageJsonFrom(__dirname);
export const {version: BASEDRIVER_VER} = fs.readPackageJsonFrom(__dirname);
const IPA_EXT = '.ipa';
const ZIP_EXTS = new Set(['.zip', IPA_EXT]);
const ZIP_MIME_TYPES = ['application/zip', 'application/x-zip-compressed', 'multipart/x-zip'];
@@ -20,11 +20,11 @@ const DEFAULT_REQ_HEADERS = Object.freeze({
'user-agent': `Appium (BaseDriver v${BASEDRIVER_VER})`,
});
const AVG_DOWNLOAD_SPEED_MEASUREMENT_THRESHOLD_SEC = 2;
/** @type {LRUCache<string, import('@appium/types').CachedAppInfo>} */
const APPLICATIONS_CACHE = new LRUCache({
max: MAX_CACHED_APPS,
ttl: CACHED_APPS_MAX_AGE, // expire after 24 hours
updateAgeOnGet: true,
// @ts-ignore The fullPath property exists
dispose: ({fullPath}, app) => {
logger.info(
`The application '${app}' cached at '${fullPath}' has ` +
@@ -46,16 +46,14 @@ process.on('exit', () => {
return;
}
const appPaths = [...APPLICATIONS_CACHE.values()]
// @ts-ignore The fullPath property exists
.map(({fullPath}) => fullPath);
const appPaths = [...APPLICATIONS_CACHE.values()].map(({fullPath}) => fullPath);
logger.debug(
`Performing cleanup of ${appPaths.length} cached ` +
util.pluralize('application', appPaths.length)
);
for (const appPath of appPaths) {
try {
// Asynchronous calls are not supported in onExit handler
// @ts-ignore it's defined
fs.rimrafSync(appPath);
} catch (e) {
logger.warn(e.message);
@@ -63,6 +61,11 @@ process.on('exit', () => {
}
});
/**
* @param {string} app
* @param {string[]} supportedAppExtensions
* @returns {string}
*/
function verifyAppExtension(app, supportedAppExtensions) {
if (supportedAppExtensions.map(_.toLower).includes(_.toLower(path.extname(app)))) {
return app;
@@ -74,14 +77,27 @@ function verifyAppExtension(app, supportedAppExtensions) {
);
}
/**
* @param {string} folderPath
* @returns {Promise<number>}
*/
async function calculateFolderIntegrity(folderPath) {
return (await fs.glob('**/*', {cwd: folderPath})).length;
}
/**
* @param {string} filePath
* @returns {Promise<string>}
*/
async function calculateFileIntegrity(filePath) {
return await fs.hash(filePath);
}
/**
* @param {string} currentPath
* @param {import('@appium/types').StringRecord} expectedIntegrity
* @returns {Promise<boolean>}
*/
async function isAppIntegrityOk(currentPath, expectedIntegrity = {}) {
if (!(await fs.exists(currentPath))) {
return false;
@@ -104,7 +120,7 @@ async function isAppIntegrityOk(currentPath, expectedIntegrity = {}) {
* @param {string} app
* @param {string|string[]|import('@appium/types').ConfigureAppOptions} options
*/
async function configureApp(
export async function configureApp(
app,
options = /** @type {import('@appium/types').ConfigureAppOptions} */ ({})
) {
@@ -114,8 +130,8 @@ async function configureApp(
}
let supportedAppExtensions;
const onPostProcess =
!_.isString(options) && !_.isArray(options) ? options.onPostProcess : undefined;
const onPostProcess = !_.isString(options) && !_.isArray(options) ? options.onPostProcess : undefined;
const onDownload = !_.isString(options) && !_.isArray(options) ? options.onDownload : undefined;
if (_.isString(options)) {
supportedAppExtensions = [options];
@@ -143,8 +159,6 @@ async function configureApp(
const {protocol, pathname} = url.parse(newApp);
const isUrl = protocol === null ? false : ['http:', 'https:'].includes(protocol);
/** @type {import('@appium/types').CachedAppInfo|undefined} */
// @ts-ignore We know the returned type
const cachedAppInfo = APPLICATIONS_CACHE.get(app);
if (cachedAppInfo) {
logger.debug(`Cached app data: ${JSON.stringify(cachedAppInfo, null, 2)}`);
@@ -162,20 +176,22 @@ async function configureApp(
} else if (cachedAppInfo?.lastModified) {
reqHeaders['if-modified-since'] = cachedAppInfo.lastModified.toUTCString();
}
logger.debug(`Request headers: ${JSON.stringify(reqHeaders)}`);
let {headers, stream, status} = await queryAppLink(newApp, reqHeaders);
logger.debug(`Response status: ${status}`);
try {
if (!_.isEmpty(headers)) {
logger.debug(`Etag: ${headers.etag}`);
if (headers.etag) {
logger.debug(`Etag: ${headers.etag}`);
remoteAppProps.etag = headers.etag;
}
logger.debug(`Last-Modified: ${headers['last-modified']}`);
if (headers['last-modified']) {
logger.debug(`Last-Modified: ${headers['last-modified']}`);
remoteAppProps.lastModified = new Date(headers['last-modified']);
}
logger.debug(`Cache-Control: ${headers['cache-control']}`);
if (headers['cache-control']) {
logger.debug(`Cache-Control: ${headers['cache-control']}`);
remoteAppProps.immutable = /\bimmutable\b/i.test(headers['cache-control']);
const maxAgeMatch = /\bmax-age=(\d+)\b/i.exec(headers['cache-control']);
if (maxAgeMatch) {
@@ -184,9 +200,9 @@ async function configureApp(
}
}
if (cachedAppInfo && status === HTTP_STATUS_NOT_MODIFIED) {
if (await isAppIntegrityOk(cachedAppInfo.fullPath, cachedAppInfo.integrity)) {
if (await isAppIntegrityOk(/** @type {string} */ (cachedAppInfo.fullPath), cachedAppInfo.integrity)) {
logger.info(`Reusing previously downloaded application at '${cachedAppInfo.fullPath}'`);
return verifyAppExtension(cachedAppInfo.fullPath, supportedAppExtensions);
return verifyAppExtension(/** @type {string} */ (cachedAppInfo.fullPath), supportedAppExtensions);
}
logger.info(
`The application at '${cachedAppInfo.fullPath}' does not exist anymore ` +
@@ -251,11 +267,15 @@ async function configureApp(
}
fileName = `${resultingName}${resultingExt}`;
}
const targetPath = await tempDir.path({
prefix: fileName,
suffix: '',
});
newApp = await fetchApp(stream, targetPath);
newApp = onDownload
? await onDownload({
headers: /** @type {import('@appium/types').HTTPHeaders} */ (_.clone(headers)),
stream,
})
: await fetchApp(stream, await tempDir.path({
prefix: fileName,
suffix: '',
}));
} finally {
if (!stream.closed) {
stream.destroy();
@@ -285,12 +305,12 @@ async function configureApp(
const archivePath = newApp;
if (packageHash === cachedAppInfo?.packageHash) {
const fullPath = cachedAppInfo?.fullPath;
if (await isAppIntegrityOk(fullPath, cachedAppInfo?.integrity)) {
if (await isAppIntegrityOk(/** @type {string} */ (fullPath), cachedAppInfo?.integrity)) {
if (archivePath !== app) {
await fs.rimraf(archivePath);
}
logger.info(`Will reuse previously cached application at '${fullPath}'`);
return verifyAppExtension(fullPath, supportedAppExtensions);
return verifyAppExtension(/** @type {string} */ (fullPath), supportedAppExtensions);
}
logger.info(
`The application at '${fullPath}' does not exist anymore ` +
@@ -518,7 +538,11 @@ async function unzipApp(zipPath, dstRoot, supportedAppExtensions) {
}
}
function isPackageOrBundle(app) {
/**
* @param {string} app
* @returns {boolean}
*/
export function isPackageOrBundle(app) {
return /^([a-zA-Z0-9\-_]+\.[a-zA-Z0-9\-_]+)+$/.test(app);
}
@@ -532,7 +556,7 @@ function isPackageOrBundle(app) {
* @param {String} firstKey The first key to duplicate
* @param {String} secondKey The second key to duplicate
*/
function duplicateKeys(input, firstKey, secondKey) {
export function duplicateKeys(input, firstKey, secondKey) {
// If array provided, recursively call on all elements
if (_.isArray(input)) {
return input.map((item) => duplicateKeys(item, firstKey, secondKey));
@@ -563,7 +587,7 @@ function duplicateKeys(input, firstKey, secondKey) {
*
* @param {string|Array<String>} cap A desired capability
*/
function parseCapsArray(cap) {
export function parseCapsArray(cap) {
if (_.isArray(cap)) {
return cap;
}
@@ -590,7 +614,7 @@ function parseCapsArray(cap) {
* @param {string?} sessionId session identifier (if exists)
* @returns {string}
*/
function generateDriverLogPrefix(obj, sessionId = null) {
export function generateDriverLogPrefix(obj, sessionId = null) {
const instanceName = `${obj.constructor.name}@${node.getObjectId(obj).substring(0, 4)}`;
return sessionId ? `${instanceName} (${sessionId.substring(0, 8)})` : instanceName;
}
@@ -603,14 +627,6 @@ export default {
parseCapsArray,
generateDriverLogPrefix,
};
export {
configureApp,
isPackageOrBundle,
duplicateKeys,
parseCapsArray,
generateDriverLogPrefix,
BASEDRIVER_VER,
};
/**
* @typedef RemoteAppProps
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@appium/base-driver",
"version": "9.5.4",
"version": "9.6.0",
"description": "Base driver class for Appium drivers",
"keywords": [
"automation",
@@ -44,8 +44,8 @@
"test:types": "tsd"
},
"dependencies": {
"@appium/support": "^4.2.4",
"@appium/types": "^0.16.2",
"@appium/support": "^4.2.5",
"@appium/types": "^0.17.0",
"@colors/colors": "1.6.0",
"@types/async-lock": "1.4.2",
"@types/bluebird": "3.5.42",
+8
View File
@@ -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.31](https://github.com/appium/appium/compare/@appium/base-plugin@2.2.30...@appium/base-plugin@2.2.31) (2024-04-21)
**Note:** Version bump only for package @appium/base-plugin
## [2.2.30](https://github.com/appium/appium/compare/@appium/base-plugin@2.2.29...@appium/base-plugin@2.2.30) (2024-04-16)
**Note:** Version bump only for package @appium/base-plugin
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@appium/base-plugin",
"version": "2.2.30",
"version": "2.2.31",
"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.5.4",
"@appium/support": "^4.2.4"
"@appium/base-driver": "^9.6.0",
"@appium/support": "^4.2.5"
},
"engines": {
"node": "^14.17.0 || ^16.13.0 || >=18.0.0",
+8
View File
@@ -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.0.36](https://github.com/appium/appium/compare/@appium/doctor@2.0.35...@appium/doctor@2.0.36) (2024-04-21)
**Note:** Version bump only for package @appium/doctor
## [2.0.35](https://github.com/appium/appium/compare/@appium/doctor@2.0.34...@appium/doctor@2.0.35) (2024-04-16)
**Note:** Version bump only for package @appium/doctor
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@appium/doctor",
"version": "2.0.35",
"version": "2.0.36",
"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.2.4",
"@appium/support": "^4.2.5",
"@colors/colors": "1.6.0",
"@types/bluebird": "3.5.42",
"@types/teen_process": "2.0.4",
+8
View File
@@ -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.7](https://github.com/appium/appium/compare/@appium/docutils@1.0.6...@appium/docutils@1.0.7) (2024-04-21)
**Note:** Version bump only for package @appium/docutils
## [1.0.6](https://github.com/appium/appium/compare/@appium/docutils@1.0.5...@appium/docutils@1.0.6) (2024-04-16)
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@appium/docutils",
"version": "1.0.6",
"version": "1.0.7",
"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.2.4",
"@appium/support": "^4.2.5",
"@appium/tsconfig": "^0.3.3",
"@sliphua/lilconfig-ts-loader": "3.2.2",
"@types/which": "3.0.3",
+1 -1
View File
@@ -1,5 +1,5 @@
mkdocs==1.5.3
mkdocs-git-revision-date-localized-plugin==1.2.4
mkdocs-material==9.5.17
mkdocs-material==9.5.18
mkdocs-redirects==1.2.1
mike==2.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.
## [0.4.23](https://github.com/appium/appium/compare/@appium/driver-test-support@0.4.22...@appium/driver-test-support@0.4.23) (2024-04-21)
**Note:** Version bump only for package @appium/driver-test-support
## [0.4.22](https://github.com/appium/appium/compare/@appium/driver-test-support@0.4.21...@appium/driver-test-support@0.4.22) (2024-04-08)
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@appium/driver-test-support",
"version": "0.4.22",
"version": "0.4.23",
"description": "Test utilities for Appium drivers",
"keywords": [
"automation",
@@ -41,7 +41,7 @@
},
"types": "./build/lib/index.d.ts",
"dependencies": {
"@appium/types": "^0.16.2",
"@appium/types": "^0.17.0",
"@types/lodash": "4.17.0",
"@types/stoppable": "1.1.3",
"axios": "1.6.8",
@@ -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.
## [3.0.28](https://github.com/appium/appium/compare/@appium/execute-driver-plugin@3.0.27...@appium/execute-driver-plugin@3.0.28) (2024-04-21)
### Bug Fixes
* **execute-driver-plugin:** update dependency webdriverio to v8.36.1 ([9ad20ff](https://github.com/appium/appium/commit/9ad20ff1c266923f3efe50bfe2ae4b1ab8ecb20a))
## [3.0.27](https://github.com/appium/appium/compare/@appium/execute-driver-plugin@3.0.26...@appium/execute-driver-plugin@3.0.27) (2024-04-16)
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@appium/execute-driver-plugin",
"version": "3.0.27",
"version": "3.0.28",
"description": "Plugin for batching and executing driver commands with Appiums",
"keywords": [
"automation",
@@ -43,7 +43,7 @@
"lodash": "4.17.21",
"source-map-support": "0.5.21",
"vm2": "3.9.19",
"webdriverio": "8.36.0"
"webdriverio": "8.36.1"
},
"peerDependencies": {
"appium": "^2.0.0-beta.35"
+8
View File
@@ -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.35](https://github.com/appium/appium/compare/@appium/fake-plugin@3.1.34...@appium/fake-plugin@3.1.35) (2024-04-21)
**Note:** Version bump only for package @appium/fake-plugin
## [3.1.34](https://github.com/appium/appium/compare/@appium/fake-plugin@3.1.33...@appium/fake-plugin@3.1.34) (2024-04-16)
**Note:** Version bump only for package @appium/fake-plugin
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@appium/fake-plugin",
"version": "3.1.34",
"version": "3.1.35",
"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.30",
"@appium/support": "^4.2.4",
"@appium/base-plugin": "^2.2.31",
"@appium/support": "^4.2.5",
"@types/bluebird": "3.5.42",
"bluebird": "3.7.2",
"lodash": "4.17.21",
+8
View File
@@ -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.6](https://github.com/appium/appium/compare/@appium/images-plugin@3.0.5...@appium/images-plugin@3.0.6) (2024-04-21)
**Note:** Version bump only for package @appium/images-plugin
## [3.0.5](https://github.com/appium/appium/compare/@appium/images-plugin@3.0.4...@appium/images-plugin@3.0.5) (2024-04-16)
**Note:** Version bump only for package @appium/images-plugin
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@appium/images-plugin",
"version": "3.0.5",
"version": "3.0.6",
"description": "Plugin for working with images and image elements in Appium",
"keywords": [
"automation",
@@ -40,7 +40,7 @@
},
"dependencies": {
"@appium/opencv": "^3.0.3",
"@appium/support": "^4.2.4",
"@appium/support": "^4.2.5",
"lodash": "4.17.21",
"lru-cache": "10.2.0",
"sharp": "0.33.3",
@@ -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.30](https://github.com/appium/appium/compare/@appium/plugin-test-support@0.3.29...@appium/plugin-test-support@0.3.30) (2024-04-21)
**Note:** Version bump only for package @appium/plugin-test-support
## [0.3.29](https://github.com/appium/appium/compare/@appium/plugin-test-support@0.3.28...@appium/plugin-test-support@0.3.29) (2024-04-08)
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@appium/plugin-test-support",
"version": "0.3.29",
"version": "0.3.30",
"description": "Testing utilities for Appium plugins",
"keywords": [
"automation",
@@ -41,7 +41,7 @@
"test:unit": "exit 0"
},
"dependencies": {
"@appium/types": "^0.16.2",
"@appium/types": "^0.17.0",
"get-port": "5.1.1",
"log-symbols": "4.1.0",
"source-map-support": "0.5.21",
+10
View File
@@ -3,6 +3,16 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [4.2.5](https://github.com/appium/appium/compare/@appium/support@4.2.4...@appium/support@4.2.5) (2024-04-21)
### Bug Fixes
* **support:** Enable shell option for all npm-related commands on Windows ([#20010](https://github.com/appium/appium/issues/20010)) ([270fd42](https://github.com/appium/appium/commit/270fd42a2086e68d061e4bad5cb504125e22a493))
* **support:** update dependency yauzl to v3.1.3 ([#20017](https://github.com/appium/appium/issues/20017)) ([77a27ab](https://github.com/appium/appium/commit/77a27ab16cb9ec6038f9b88762fe7f08c7871a48))
## [4.2.4](https://github.com/appium/appium/compare/@appium/support@4.2.3...@appium/support@4.2.4) (2024-04-16)
+7 -5
View File
@@ -44,11 +44,16 @@ export class NPM {
* @param {Omit<TeenProcessExecOptions, 'cwd'>} [execOpts]
*/
async exec(cmd, args, opts, execOpts = {}) {
let {cwd, json, lockFile} = opts;
const {cwd, json, lockFile} = opts;
// make sure we perform the current operation in cwd
/** @type {TeenProcessExecOptions} */
const teenProcessExecOpts = {...execOpts, cwd};
const teenProcessExecOpts = {
...execOpts,
// https://github.com/nodejs/node/issues/52572
shell: system.isWindows() || execOpts.shell,
cwd,
};
args.unshift(cmd);
if (json) {
@@ -273,9 +278,6 @@ export class NPM {
return (await this.exec('info', [pkg, ...entries], {
cwd: process.cwd(),
json: true,
}, {
// https://discuss.appium.io/t/appium-driver-install-fails-while-checking-drivers-compatibility/42209
shell: system.isWindows(),
})).json;
}
}
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@appium/support",
"version": "4.2.4",
"version": "4.2.5",
"description": "Support libs used across appium packages",
"keywords": [
"automation",
@@ -42,7 +42,7 @@
},
"dependencies": {
"@appium/tsconfig": "^0.3.3",
"@appium/types": "^0.16.2",
"@appium/types": "^0.17.0",
"@colors/colors": "1.6.0",
"@types/archiver": "6.0.2",
"@types/base64-stream": "1.0.5",
@@ -93,7 +93,7 @@
"type-fest": "4.10.1",
"uuid": "9.0.1",
"which": "4.0.0",
"yauzl": "3.1.2"
"yauzl": "3.1.3"
},
"optionalDependencies": {
"sharp": "0.33.3"
+8
View File
@@ -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.35](https://github.com/appium/appium/compare/@appium/test-support@3.0.34...@appium/test-support@3.0.35) (2024-04-21)
**Note:** Version bump only for package @appium/test-support
## [3.0.34](https://github.com/appium/appium/compare/@appium/test-support@3.0.33...@appium/test-support@3.0.34) (2024-04-16)
**Note:** Version bump only for package @appium/test-support
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@appium/test-support",
"version": "3.0.34",
"version": "3.0.35",
"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.2.4",
"@appium/support": "^4.2.5",
"@colors/colors": "1.6.0",
"bluebird": "3.7.2",
"lodash": "4.17.21",
+9
View File
@@ -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.17.0](https://github.com/appium/appium/compare/@appium/types@0.16.2...@appium/types@0.17.0) (2024-04-21)
### Features
* **base-driver:** Add onDownload handler to the configureApp helper ([#20015](https://github.com/appium/appium/issues/20015)) ([8cf3efd](https://github.com/appium/appium/commit/8cf3efdbed6c0868f2d7838e249a3d2478f186d4))
## [0.16.2](https://github.com/appium/appium/compare/@appium/types@0.16.1...@appium/types@0.16.2) (2024-04-08)
**Note:** Version bump only for package @appium/types
+28 -3
View File
@@ -8,6 +8,7 @@ import type {HTTPHeaders, HTTPMethod} from './http';
import type {AppiumLogger} from './logger';
import type {AppiumServer, UpdateServerCallback} from './server';
import type {Class, Element, StringRecord} from './util';
import type internal from 'node:stream';
/**
* Interface implemented by the `DeviceSettings` class in `@appium/base-driver`
@@ -2055,11 +2056,11 @@ export interface CachedAppInfo {
/**
* Date instance; the value of the file's `Last-Modified` header
*/
lastModified?: Date;
lastModified?: Date|null;
/**
* The value of the file's `Etag` header
*/
etag?: string;
etag?: string|null;
/**
* `true` if the file contains an `immutable` mark in `Cache-control` header
*/
@@ -2067,7 +2068,7 @@ export interface CachedAppInfo {
/**
* Integer representation of `maxAge` parameter in `Cache-control` header
*/
maxAge?: number;
maxAge?: number|null;
/**
* The timestamp this item has been added to the cache (measured in Unix epoch milliseconds)
*/
@@ -2109,6 +2110,18 @@ export interface PostProcessOptions<Headers = HTTPHeaders> {
appPath?: string;
}
export interface DownloadAppOptions<Headers = HTTPHeaders> {
/**
* Response headers from the download url.
*/
headers: Headers;
/**
* Response stream.
*/
stream: internal.Readable;
}
export interface ConfigureAppOptions {
/**
*
@@ -2124,5 +2137,17 @@ export interface ConfigureAppOptions {
onPostProcess?: (
obj: PostProcessOptions,
) => Promise<PostProcessResult | undefined> | PostProcessResult | undefined;
/**
* Optional function, which should be applied to the application upon download
* progress initialization instead of the standard download handler.
* The callback does not get invoked if the original application is not a URL.
* It is expected that `onPostProcess` is also provided if this callback is defined.
* Otherwise, there is a possibility the app configuration flow could be broken.
*
* @returns The full path to the downloaded app
*/
onDownload?: (
obj: DownloadAppOptions,
) => Promise<string>;
supportedExtensions: string[];
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@appium/types",
"version": "0.16.2",
"version": "0.17.0",
"description": "Various type declarations used across Appium",
"keywords": [
"automation",