mirror of
https://github.com/appium/appium.git
synced 2026-11-01 06:45:05 +08:00
Compare commits
53
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
717ec38d8c | ||
|
|
d73cfa75d4 | ||
|
|
aa5ae9a8ca | ||
|
|
0419de743b | ||
|
|
009aa60364 | ||
|
|
b53c0b9674 | ||
|
|
84d96dbae4 | ||
|
|
261cfc8694 | ||
|
|
9b14205288 | ||
|
|
7124eb6075 | ||
|
|
5ae8df3c36 | ||
|
|
c2f543fc10 | ||
|
|
06797350a9 | ||
|
|
7e888d45aa | ||
|
|
b83bd04265 | ||
|
|
1ae85d6e14 | ||
|
|
fbb6fd9a27 | ||
|
|
ed6c7bd2c0 | ||
|
|
699c49306c | ||
|
|
d44a136e55 | ||
|
|
8e453bed3f | ||
|
|
a215a89f68 | ||
|
|
b59acac0e8 | ||
|
|
98ffc60cd1 | ||
|
|
b82f13b893 | ||
|
|
398c9779eb | ||
|
|
2b28b54ab9 | ||
|
|
67198eae83 | ||
|
|
e70dc4dfb6 | ||
|
|
98403151f8 | ||
|
|
1e99f81416 | ||
|
|
dd9348af17 | ||
|
|
196117bab6 | ||
|
|
3b5ae2ab17 | ||
|
|
1f79433059 | ||
|
|
ee1df47b17 | ||
|
|
c7c860bb07 | ||
|
|
db98024203 | ||
|
|
3205b5d06f | ||
|
|
63a0b05e1b | ||
|
|
08af8913fd | ||
|
|
332bb59ee3 | ||
|
|
fa571925b7 | ||
|
|
77307f2722 | ||
|
|
1fbd503a66 | ||
|
|
128b0ae867 | ||
|
|
3d0b97cae7 | ||
|
|
aad2957624 | ||
|
|
bd6e3ac0b0 | ||
|
|
de39013ae5 | ||
|
|
408885a5b2 | ||
|
|
aaa7668ae6 | ||
|
|
a306ce741a |
@@ -1,6 +1,8 @@
|
||||
name: Appium Build
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
# this list of paths could potentially impact the build
|
||||
paths:
|
||||
- '**/tsconfig*.json'
|
||||
@@ -20,6 +22,8 @@ on:
|
||||
- '!**/sample-code/**'
|
||||
- '!packages/*/docs/**'
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- '**/tsconfig*.json'
|
||||
- 'packages/base-driver/static/**/*'
|
||||
@@ -66,9 +70,9 @@ jobs:
|
||||
# - macos-latest
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
|
||||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3
|
||||
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
cache: 'npm'
|
||||
@@ -84,7 +88,7 @@ jobs:
|
||||
name: Lint
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
|
||||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
|
||||
- name: Install dependencies
|
||||
uses: bahmutov/npm-install@1a235c31658a322a3b024444759650ee6345c26d # tag=v1
|
||||
with:
|
||||
|
||||
@@ -12,7 +12,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
|
||||
|
||||
- name: Cleanup
|
||||
run: |
|
||||
|
||||
@@ -18,7 +18,7 @@ jobs:
|
||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||
steps:
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3
|
||||
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- name: Install Appium
|
||||
|
||||
@@ -2,6 +2,8 @@ name: Build Docs
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- '**/typedoc.json'
|
||||
- '**/tsconfig*.json'
|
||||
@@ -16,6 +18,8 @@ on:
|
||||
- '!**/test/**'
|
||||
- '!**/sample-code/**'
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- '**/typedoc.json'
|
||||
- '**/tsconfig*.json'
|
||||
@@ -35,7 +39,7 @@ jobs:
|
||||
name: Docs
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
|
||||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
|
||||
- name: Install dependencies (Node.js)
|
||||
uses: bahmutov/npm-install@1a235c31658a322a3b024444759650ee6345c26d # tag=v1
|
||||
with:
|
||||
|
||||
@@ -11,7 +11,7 @@ jobs:
|
||||
name: Run FOSSA Analysis
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
|
||||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
|
||||
with:
|
||||
ref: master
|
||||
- name: Install dependencies
|
||||
|
||||
@@ -17,7 +17,7 @@ jobs:
|
||||
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
|
||||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
|
||||
- run: |
|
||||
git config user.name github-actions
|
||||
git config user.email github-actions@github.com
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
name: Validate Renovate Configs
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- '.github/workflows/renovate.yml' # this file
|
||||
- '.renovaterc.json'
|
||||
- 'renovate/default.json'
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- '.github/workflows/renovate.yml' # this file
|
||||
- '.renovaterc.json'
|
||||
@@ -19,7 +23,7 @@ jobs:
|
||||
name: Check Renovate Configs
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
|
||||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
|
||||
- name: Validate Renovate Config
|
||||
uses: rinchsan/renovate-config-validator@1ea1e8514f6a33fdd71c40b0a5fa3512b9e7b936 # tag=v0
|
||||
with:
|
||||
|
||||
Generated
+1392
-1508
File diff suppressed because it is too large
Load Diff
+24
-24
@@ -85,34 +85,34 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@colors/colors": "1.6.0",
|
||||
"@commitlint/cli": "17.8.0",
|
||||
"@commitlint/config-conventional": "17.8.0",
|
||||
"@commitlint/cli": "18.4.0",
|
||||
"@commitlint/config-conventional": "18.4.0",
|
||||
"@tsconfig/node14": "14.1.0",
|
||||
"@types/chai": "4.3.8",
|
||||
"@types/chai-as-promised": "7.1.6",
|
||||
"@types/diff": "5.0.6",
|
||||
"@types/mocha": "10.0.2",
|
||||
"@types/node": "18.18.5",
|
||||
"@types/semver": "7.5.3",
|
||||
"@types/sinon": "10.0.19",
|
||||
"@types/sinon-chai": "3.2.10",
|
||||
"@types/source-map-support": "0.5.8",
|
||||
"@types/teen_process": "2.0.1",
|
||||
"@types/ws": "8.5.7",
|
||||
"@types/yargs": "17.0.28",
|
||||
"@typescript-eslint/eslint-plugin": "6.8.0",
|
||||
"@typescript-eslint/parser": "6.8.0",
|
||||
"asyncbox": "2.9.4",
|
||||
"@types/chai": "4.3.10",
|
||||
"@types/chai-as-promised": "7.1.8",
|
||||
"@types/diff": "5.0.8",
|
||||
"@types/mocha": "10.0.4",
|
||||
"@types/node": "20.9.0",
|
||||
"@types/semver": "7.5.5",
|
||||
"@types/sinon": "10.0.20",
|
||||
"@types/sinon-chai": "3.2.12",
|
||||
"@types/source-map-support": "0.5.10",
|
||||
"@types/teen_process": "2.0.3",
|
||||
"@types/ws": "8.5.9",
|
||||
"@types/yargs": "17.0.31",
|
||||
"@typescript-eslint/eslint-plugin": "6.9.1",
|
||||
"@typescript-eslint/parser": "6.9.1",
|
||||
"asyncbox": "3.0.0",
|
||||
"chai": "4.3.10",
|
||||
"chai-as-promised": "7.1.1",
|
||||
"chai-webdriverio-async": "2.7.0",
|
||||
"conventional-changelog-conventionalcommits": "6.1.0",
|
||||
"conventional-changelog-conventionalcommits": "7.0.2",
|
||||
"cpy-cli": "5.0.0",
|
||||
"eslint": "8.51.0",
|
||||
"eslint": "8.53.0",
|
||||
"eslint-config-prettier": "9.0.0",
|
||||
"eslint-find-rules": "4.1.0",
|
||||
"eslint-import-resolver-typescript": "3.6.1",
|
||||
"eslint-plugin-import": "2.28.1",
|
||||
"eslint-plugin-import": "2.29.0",
|
||||
"eslint-plugin-mocha": "10.2.0",
|
||||
"eslint-plugin-promise": "6.1.1",
|
||||
"fancy-log": "2.0.0",
|
||||
@@ -121,8 +121,8 @@
|
||||
"handlebars": "4.7.8",
|
||||
"husky": "8.0.3",
|
||||
"json-schema-to-typescript": "13.1.1",
|
||||
"lerna": "7.4.1",
|
||||
"lint-staged": "15.0.1",
|
||||
"lerna": "7.4.2",
|
||||
"lint-staged": "15.0.2",
|
||||
"log-symbols": "4.1.0",
|
||||
"midnight-smoker": "7.0.4",
|
||||
"mjpeg-consumer": "2.0.0",
|
||||
@@ -134,7 +134,7 @@
|
||||
"rewiremock": "3.14.5",
|
||||
"rimraf": "5.0.5",
|
||||
"serve-static": "1.15.0",
|
||||
"sinon": "16.1.0",
|
||||
"sinon": "16.1.3",
|
||||
"sinon-chai": "3.7.0",
|
||||
"sync-monorepo-packages": "1.0.2",
|
||||
"through2": "4.0.2",
|
||||
@@ -145,7 +145,7 @@
|
||||
"typedoc-plugin-resolve-crossmodule-references": "0.3.3",
|
||||
"typescript": "5.0.4",
|
||||
"validate.js": "0.13.1",
|
||||
"webdriverio": "8.17.0",
|
||||
"webdriverio": "8.21.0",
|
||||
"ws": "8.14.2",
|
||||
"yaml-js": "0.3.1"
|
||||
},
|
||||
|
||||
@@ -3,6 +3,38 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [2.2.2](https://github.com/appium/appium/compare/appium@2.2.1...appium@2.2.2) (2023-11-14)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **appium:** Load plugins in the same order that was used for the CLI command ([#19388](https://github.com/appium/appium/issues/19388)) ([7124eb6](https://github.com/appium/appium/commit/7124eb6075be0fabd83e9023a47b5a8f4c181a52))
|
||||
* **docutils:** update dependency yaml to v2.3.4 ([a215a89](https://github.com/appium/appium/commit/a215a89f684c50da24d669d60a73fb6268b05c7f))
|
||||
* **support:** update definitelytyped ([5ae8df3](https://github.com/appium/appium/commit/5ae8df3c36c7f03fbf3420087b532086f6742348))
|
||||
* **support:** update dependency axios to v1.6.0 ([699c493](https://github.com/appium/appium/commit/699c49306c38e222d618a9611482b06a3e6806aa))
|
||||
* **support:** update dependency axios to v1.6.1 ([9b14205](https://github.com/appium/appium/commit/9b14205288ef09fd4a1144fc93c82b2bb2ed2ec0))
|
||||
* **support:** update dependency teen_process to v2.0.57 ([1fbd503](https://github.com/appium/appium/commit/1fbd503a66b965a9b32bbb6702062861a8480333))
|
||||
* **support:** update dependency teen_process to v2.0.63 ([fa57192](https://github.com/appium/appium/commit/fa571925b7ac980cc99c8d23f659420eacd8546c))
|
||||
* **support:** update dependency teen_process to v2.0.64 ([332bb59](https://github.com/appium/appium/commit/332bb59ee3fdd14c03f6b3c4fd6587a30319d568))
|
||||
* **support:** update dependency teen_process to v2.0.66 ([3205b5d](https://github.com/appium/appium/commit/3205b5d06f073f1e5c7735c6e36ad08fdf091182))
|
||||
* **support:** update dependency teen_process to v2.0.67 ([3b5ae2a](https://github.com/appium/appium/commit/3b5ae2ab17c74c9890b53c081aec146152f11c7a))
|
||||
* **support:** update dependency teen_process to v2.0.73 ([8e453be](https://github.com/appium/appium/commit/8e453bed3f440c1dcf82f016f7d4431365b9cdff))
|
||||
* **support:** update dependency teen_process to v2.0.75 ([fbb6fd9](https://github.com/appium/appium/commit/fbb6fd9a2780eb00c15584abeaf644a1fcdecb4d))
|
||||
* **support:** update teen_process-related packages ([84d96db](https://github.com/appium/appium/commit/84d96dbae45dfe56218d32330f8ff2d26b750fb7))
|
||||
* **support:** update teen_process-related packages ([3d0b97c](https://github.com/appium/appium/commit/3d0b97cae76c616da0aea5b92cebcd38d59263b7))
|
||||
|
||||
|
||||
|
||||
## [2.2.1](https://github.com/appium/appium/compare/appium@2.2.0...appium@2.2.1) (2023-10-19)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **appium:** Make sure type definitions are always in sync across modules ([#19323](https://github.com/appium/appium/issues/19323)) ([de39013](https://github.com/appium/appium/commit/de39013ae501d4fc11988435737efb862cc1d820))
|
||||
* **support:** update definitelytyped ([a306ce7](https://github.com/appium/appium/commit/a306ce741a806d21bc44f3b979803b8af5da99aa))
|
||||
|
||||
|
||||
|
||||
## [2.2.0](https://github.com/appium/appium/compare/appium@2.1.3...appium@2.2.0) (2023-10-18)
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,102 @@
|
||||
---
|
||||
title: Write a Test (dotnet)
|
||||
---
|
||||
|
||||
The [Appium dotnet Client](https://github.com/appium/dotnet-client/) is
|
||||
an official Appium client in C#. This driver is an extension of the Selenium C# client. It has all the functionalities of the regular driver, but add Appium-specific methods on top of this. The driver is available on the public NuGet Gallery as [Appium.WebDriver](https://www.nuget.org/packages/Appium.WebDriver/).
|
||||
|
||||
Now, we get inside the directory and create a new [NUnit](https://nunit.org/) project. We will also add the references to the Appium.Net driver, and other dependencies.
|
||||
|
||||
```bash
|
||||
cd dotnet-client
|
||||
dotnet new nunit --name appiumtest
|
||||
|
||||
cd appiumtest
|
||||
|
||||
# This will install the latest 5.x version
|
||||
dotnet add package Appium.WebDriver --prerelease
|
||||
dotnet add package Newtonsoft.Json --version 13.0.3
|
||||
```
|
||||
|
||||
Once this is done, your project should have a placeholder file `UnitTest1.cs`. We will replace the code to include the OpenQA namespaces, an initialization of the driver, and the actual test.
|
||||
|
||||
```C# title="UnitTest1.cs"
|
||||
using OpenQA.Selenium;
|
||||
using OpenQA.Selenium.Appium;
|
||||
using OpenQA.Selenium.Appium.Android;
|
||||
using OpenQA.Selenium.Appium.Enums;
|
||||
|
||||
namespace appiumtest;
|
||||
|
||||
public class Tests
|
||||
{
|
||||
private AndroidDriver _driver;
|
||||
|
||||
[OneTimeSetUp]
|
||||
public void SetUp()
|
||||
{
|
||||
var serverUri = new Uri(Environment.GetEnvironmentVariable("APPIUM_HOST") ?? "http://127.0.0.1:4723/");
|
||||
var driverOptions = new AppiumOptions() {
|
||||
AutomationName = AutomationName.AndroidUIAutomator2,
|
||||
PlatformName = "Android",
|
||||
DeviceName = "Android Emulator",
|
||||
};
|
||||
|
||||
driverOptions.AddAdditionalAppiumOption("appPackage", "com.android.settings");
|
||||
driverOptions.AddAdditionalAppiumOption("appActivity", ".Settings");
|
||||
// NoReset assumes the app com.google.android is preinstalled on the emulator
|
||||
driverOptions.AddAdditionalAppiumOption("noReset", true);
|
||||
|
||||
_driver = new AndroidDriver(serverUri, driverOptions, TimeSpan.FromSeconds(180));
|
||||
_driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(10);
|
||||
}
|
||||
|
||||
[OneTimeTearDown]
|
||||
public void TearDown()
|
||||
{
|
||||
_driver.Dispose();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestBattery()
|
||||
{
|
||||
_driver.StartActivity("com.android.settings", ".Settings");
|
||||
_driver.FindElement(By.XPath("//*[@text='Battery']")).Click();
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
!!! note
|
||||
|
||||
It's not within the scope of this guide to give a complete run-down on the dotnet client
|
||||
library or everything that's happening here, so we'll leave the code itself unexplained in
|
||||
detail for now. You may want to read up particularly on Appium
|
||||
[Capabilities](../guides/caps.md) in addition to familiarizing yourself with the
|
||||
[dotnet client driver documentation](https://github.com/appium/dotnet-client/) for a fuller explanation
|
||||
of the various API commands you see and what their purpose is.
|
||||
|
||||
Basically, this code is doing the following:
|
||||
|
||||
1. Defining a set of "Capabilities" (parameters) to send to the Appium server so Appium knows what
|
||||
kind of thing you want to automate. Some of these parameters can be overriden using environment variables.
|
||||
1. Starting an Appium session on the built-in Android settings app.
|
||||
1. Finding the "Battery" list item and clicking it.
|
||||
1. Ending the Appium session.
|
||||
|
||||
That's it! Let's give it a try. Before you run the test, make sure that you have an Appium server
|
||||
running in another terminal session, otherwise you'll get an error about not being able to connect
|
||||
to one. Then, you can execute the script:
|
||||
|
||||
```bash
|
||||
dotnet test
|
||||
|
||||
# Example output:
|
||||
# Starting test execution, please wait...
|
||||
# A total of 1 test files matched the specified pattern.
|
||||
|
||||
# Passed! - Failed: 0, Passed: 1, Skipped: 0, Total: 1, Duration: 323 ms - appiumtest.dll (net7.0)
|
||||
```
|
||||
|
||||
If all goes well, you'll see the Settings app open up and navigate to the "Battery" view in the emulator before the app closes again.
|
||||
|
||||
Congratulations, you've started your Appium journey! Read on for some next steps to explore.
|
||||
@@ -23,7 +23,7 @@ According to the driver, in addition to a working Appium server, we also need to
|
||||
- Set an environment variable pointing to the directory on disk where the Android tools are
|
||||
installed. You can usually find the path to this directory in the Android Studio SDK manager. It
|
||||
will contain the `platform-tools` and other directories. We need to define and persist the
|
||||
environment variable as `ANDROID_HOME` (or alternatively `ANDROID_SDK_ROOT`).
|
||||
environment variable as `ANDROID_HOME`.
|
||||
- Use the Android SDK manager to download whichever Android platform we want to automate (for
|
||||
example, API level 30)
|
||||
- Install the Java JDK (for the most recent Android API levels, JDK 9 is required, otherwise JDK
|
||||
|
||||
@@ -24,6 +24,7 @@ nav:
|
||||
- quickstart/test-py.md
|
||||
- quickstart/test-java.md
|
||||
- quickstart/test-rb.md
|
||||
- quickstart/test-dotnet.md
|
||||
- quickstart/next-steps.md
|
||||
- CLI Reference:
|
||||
- cli/index.md
|
||||
|
||||
@@ -159,12 +159,13 @@ class AppiumDriver extends DriverCore {
|
||||
// https://www.w3.org/TR/webdriver/#dfn-status
|
||||
const statusObj = this._isShuttingDown
|
||||
? {
|
||||
ready: false,
|
||||
message: 'The server is shutting down',
|
||||
} : {
|
||||
ready: true,
|
||||
message: 'The server is ready to accept new connections',
|
||||
};
|
||||
ready: false,
|
||||
message: 'The server is shutting down',
|
||||
}
|
||||
: {
|
||||
ready: true,
|
||||
message: 'The server is ready to accept new connections',
|
||||
};
|
||||
return {
|
||||
...statusObj,
|
||||
build: _.clone(getBuildInfo()),
|
||||
@@ -193,18 +194,18 @@ class AppiumDriver extends DriverCore {
|
||||
this.log.info(
|
||||
driverVersion
|
||||
? `Appium v${APPIUM_VER} creating new ${driverName} (v${driverVersion}) session`
|
||||
: `Appium v${APPIUM_VER} creating new ${driverName} session`
|
||||
: `Appium v${APPIUM_VER} creating new ${driverName} session`,
|
||||
);
|
||||
this.log.info(`Checking BaseDriver versions for Appium and ${driverName}`);
|
||||
this.log.info(
|
||||
AppiumDriver.baseVersion
|
||||
? `Appium's BaseDriver version is ${AppiumDriver.baseVersion}`
|
||||
: `Could not determine Appium's BaseDriver version`
|
||||
: `Could not determine Appium's BaseDriver version`,
|
||||
);
|
||||
this.log.info(
|
||||
driverBaseVersion
|
||||
? `${driverName}'s BaseDriver version is ${driverBaseVersion}`
|
||||
: `Could not determine ${driverName}'s BaseDriver version`
|
||||
: `Could not determine ${driverName}'s BaseDriver version`,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -280,7 +281,7 @@ class AppiumDriver extends DriverCore {
|
||||
jsonwpCaps,
|
||||
promoteAppiumOptions(/** @type {W3CAppiumDriverCaps} */ (w3cCapabilities)),
|
||||
this.desiredCapConstraints,
|
||||
defaultCapabilities ? promoteAppiumOptionsForObject(defaultCapabilities) : undefined
|
||||
defaultCapabilities ? promoteAppiumOptionsForObject(defaultCapabilities) : undefined,
|
||||
);
|
||||
|
||||
const {desiredCaps, processedJsonwpCapabilities, processedW3CCapabilities} =
|
||||
@@ -324,7 +325,7 @@ class AppiumDriver extends DriverCore {
|
||||
this.log.info(
|
||||
`Applying relaxed security to '${InnerDriver.name}' as per ` +
|
||||
`server command line argument. All insecure features will be ` +
|
||||
`enabled unless explicitly disabled by --deny-insecure`
|
||||
`enabled unless explicitly disabled by --deny-insecure`,
|
||||
);
|
||||
driverInstance.relaxedSecurityEnabled = true;
|
||||
}
|
||||
@@ -365,7 +366,7 @@ class AppiumDriver extends DriverCore {
|
||||
await pendingDriversGuard.acquire(AppiumDriver.name, () => {
|
||||
this.pendingDrivers[InnerDriver.name] = this.pendingDrivers[InnerDriver.name] || [];
|
||||
otherPendingDriversData = _.compact(
|
||||
this.pendingDrivers[InnerDriver.name].map((drv) => drv.driverData)
|
||||
this.pendingDrivers[InnerDriver.name].map((drv) => drv.driverData),
|
||||
);
|
||||
this.pendingDrivers[InnerDriver.name].push(driverInstance);
|
||||
});
|
||||
@@ -375,7 +376,7 @@ class AppiumDriver extends DriverCore {
|
||||
processedJsonwpCapabilities,
|
||||
reqCaps,
|
||||
processedW3CCapabilities,
|
||||
[...runningDriversData, ...otherPendingDriversData]
|
||||
[...runningDriversData, ...otherPendingDriversData],
|
||||
);
|
||||
protocol = driverInstance.protocol;
|
||||
this.sessions[innerSessionId] = driverInstance;
|
||||
@@ -389,7 +390,7 @@ class AppiumDriver extends DriverCore {
|
||||
|
||||
this.log.info(
|
||||
`New ${InnerDriver.name} session created successfully, session ` +
|
||||
`${innerSessionId} added to master session list`
|
||||
`${innerSessionId} added to master session list`,
|
||||
);
|
||||
|
||||
// set the New Command Timeout for the inner driver
|
||||
@@ -399,13 +400,13 @@ class AppiumDriver extends DriverCore {
|
||||
if (driverInstance.isW3CProtocol() && !_.isEmpty(w3cSettings)) {
|
||||
this.log.info(
|
||||
`Applying the initial values to Appium settings parsed from W3C caps: ` +
|
||||
JSON.stringify(w3cSettings)
|
||||
JSON.stringify(w3cSettings),
|
||||
);
|
||||
await driverInstance.updateSettings(w3cSettings);
|
||||
} else if (driverInstance.isMjsonwpProtocol() && !_.isEmpty(jwpSettings)) {
|
||||
this.log.info(
|
||||
`Applying the initial values to Appium settings parsed from MJSONWP caps: ` +
|
||||
JSON.stringify(jwpSettings)
|
||||
JSON.stringify(jwpSettings),
|
||||
);
|
||||
await driverInstance.updateSettings(jwpSettings);
|
||||
}
|
||||
@@ -435,13 +436,13 @@ class AppiumDriver extends DriverCore {
|
||||
for (const plugin of this.sessionPlugins[innerSessionId]) {
|
||||
if (_.isFunction(plugin.onUnexpectedShutdown)) {
|
||||
this.log.debug(
|
||||
`Plugin ${plugin.name} defines an unexpected shutdown handler; calling it now`
|
||||
`Plugin ${plugin.name} defines an unexpected shutdown handler; calling it now`,
|
||||
);
|
||||
try {
|
||||
plugin.onUnexpectedShutdown(driver, cause);
|
||||
} catch (e) {
|
||||
this.log.warn(
|
||||
`Got an error when running plugin ${plugin.name} shutdown handler: ${e}`
|
||||
`Got an error when running plugin ${plugin.name} shutdown handler: ${e}`,
|
||||
);
|
||||
}
|
||||
} else {
|
||||
@@ -460,7 +461,7 @@ class AppiumDriver extends DriverCore {
|
||||
} else {
|
||||
this.log.warn(
|
||||
`Failed to attach the unexpected shutdown listener. ` +
|
||||
`Is 'onUnexpectedShutdown' method available for '${driver.constructor.name}'?`
|
||||
`Is 'onUnexpectedShutdown' method available for '${driver.constructor.name}'?`,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -476,13 +477,13 @@ class AppiumDriver extends DriverCore {
|
||||
const data = _.compact(
|
||||
_.values(this.sessions)
|
||||
.filter((s) => s.constructor.name === InnerDriver.name)
|
||||
.map((s) => s.driverData)
|
||||
.map((s) => s.driverData),
|
||||
);
|
||||
for (const datum of data) {
|
||||
if (!datum) {
|
||||
throw new Error(
|
||||
`Problem getting session data for driver type ` +
|
||||
`${InnerDriver.name}; does it implement 'get driverData'?`
|
||||
`${InnerDriver.name}; does it implement 'get driverData'?`,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -503,7 +504,7 @@ class AppiumDriver extends DriverCore {
|
||||
const curConstructorName = this.sessions[sessionId].constructor.name;
|
||||
otherSessionsData = _.toPairs(this.sessions)
|
||||
.filter(
|
||||
([key, value]) => value.constructor.name === curConstructorName && key !== sessionId
|
||||
([key, value]) => value.constructor.name === curConstructorName && key !== sessionId,
|
||||
)
|
||||
.map(([, value]) => value.driverData);
|
||||
const dstSession = this.sessions[sessionId];
|
||||
@@ -545,7 +546,7 @@ class AppiumDriver extends DriverCore {
|
||||
this.log.debug(`Cleaning up ${util.pluralize('active session', sessionsCount, true)}`);
|
||||
const cleanupPromises = force
|
||||
? _.values(this.sessions).map((drv) =>
|
||||
drv.startUnexpectedShutdown(reason && new Error(reason))
|
||||
drv.startUnexpectedShutdown(reason && new Error(reason)),
|
||||
)
|
||||
: _.keys(this.sessions).map((id) => this.deleteSession(id));
|
||||
for (const cleanupPromise of cleanupPromises) {
|
||||
@@ -591,7 +592,7 @@ class AppiumDriver extends DriverCore {
|
||||
// to handle a given command, a plugin should either implement that command as a plugin
|
||||
// instance method or it should implement a generic 'handle' method
|
||||
return this.pluginsForSession(sessionId).filter(
|
||||
(p) => _.isFunction(p[cmd]) || _.isFunction(p.handle)
|
||||
(p) => _.isFunction(p[cmd]) || _.isFunction(p.handle),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -667,7 +668,7 @@ class AppiumDriver extends DriverCore {
|
||||
// newCommandTimeout will be cleared. So we do it here as well.
|
||||
if (plugins.length && dstSession) {
|
||||
this.log.debug(
|
||||
'Clearing new command timeout pre-emptively since plugin(s) will handle this command'
|
||||
'Clearing new command timeout pre-emptively since plugin(s) will handle this command',
|
||||
);
|
||||
await dstSession.clearNewCommandTimeout();
|
||||
}
|
||||
@@ -704,7 +705,7 @@ class AppiumDriver extends DriverCore {
|
||||
return await dstSession.proxyCommand(
|
||||
reqForProxy.originalUrl,
|
||||
reqForProxy.method,
|
||||
reqForProxy.body
|
||||
reqForProxy.body,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -748,7 +749,7 @@ class AppiumDriver extends DriverCore {
|
||||
) {
|
||||
this.log.debug(
|
||||
'Restarting new command timeout via umbrella driver since plugin did not ' +
|
||||
'allow default handler to execute'
|
||||
'allow default handler to execute',
|
||||
);
|
||||
await dstSession.startNewCommandTimeout();
|
||||
}
|
||||
@@ -760,7 +761,7 @@ class AppiumDriver extends DriverCore {
|
||||
const sessionId = _.first(res.value);
|
||||
this.log.info(
|
||||
`Promoting ${this.sessionlessPlugins.length} sessionless plugins to be attached ` +
|
||||
`to session ID ${sessionId}`
|
||||
`to session ID ${sessionId}`,
|
||||
);
|
||||
this.sessionPlugins[sessionId] = this.sessionlessPlugins;
|
||||
this.sessionlessPlugins = [];
|
||||
@@ -812,7 +813,7 @@ class AppiumDriver extends DriverCore {
|
||||
this.log.info(
|
||||
`Command '${cmd}' was *not* handled by the following behaviours or plugins, even ` +
|
||||
`though they were registered to handle it: ${JSON.stringify(didntHandle)}. The ` +
|
||||
`command *was* handled by these: ${JSON.stringify(didHandle)}.`
|
||||
`command *was* handled by these: ${JSON.stringify(didHandle)}.`,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -885,7 +886,7 @@ export class NoDriverProxyCommandError extends Error {
|
||||
`The default behavior for this command was to proxy, but the driver ` +
|
||||
`did not have the 'proxyCommand' method defined. To fully support ` +
|
||||
`plugins, drivers should have 'proxyCommand' set to a jwpProxy object's ` +
|
||||
`'command()' method, in addition to the normal 'proxyReqRes'`
|
||||
`'command()' method, in addition to the normal 'proxyReqRes'`,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ export const KNOWN_PLUGINS = Object.freeze(
|
||||
'execute-driver': '@appium/execute-driver-plugin',
|
||||
'relaxed-caps': '@appium/relaxed-caps-plugin',
|
||||
'universal-xml': '@appium/universal-xml-plugin',
|
||||
})
|
||||
}),
|
||||
);
|
||||
|
||||
// This is a map of driver names to npm packages representing those drivers.
|
||||
@@ -46,7 +46,7 @@ export const KNOWN_DRIVERS = Object.freeze(
|
||||
safari: 'appium-safari-driver',
|
||||
gecko: 'appium-geckodriver',
|
||||
chromium: 'appium-chromium-driver',
|
||||
})
|
||||
}),
|
||||
);
|
||||
|
||||
/**
|
||||
|
||||
@@ -38,14 +38,30 @@ export async function loadExtensions(appiumHome) {
|
||||
* @returns {PluginNameMap} Mapping of PluginClass to name
|
||||
*/
|
||||
export function getActivePlugins(pluginConfig, usePlugins = []) {
|
||||
/** @type {string[]} */
|
||||
let filteredPluginNames = [];
|
||||
if (usePlugins.length === 1 && usePlugins[0] === USE_ALL_PLUGINS) {
|
||||
filteredPluginNames = _.keys(pluginConfig.installedExtensions);
|
||||
} else {
|
||||
// It is important to load plugins in the same order that was used while enumerating them
|
||||
for (const pluginName of usePlugins) {
|
||||
if (pluginName in pluginConfig.installedExtensions) {
|
||||
filteredPluginNames.push(pluginName);
|
||||
} else if (pluginName === USE_ALL_PLUGINS) {
|
||||
throw new Error(
|
||||
`The reserved plugin name '${pluginName}' cannot be combined with other names.`
|
||||
);
|
||||
} else {
|
||||
throw new Error(
|
||||
`Could not load the plugin '${pluginName}' because it is not installed. ` +
|
||||
`Only the following plugins are available: ${_.keys(pluginConfig.installedExtensions)}`
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
return new Map(
|
||||
_.compact(
|
||||
Object.keys(pluginConfig.installedExtensions)
|
||||
.filter(
|
||||
(pluginName) =>
|
||||
_.includes(usePlugins, pluginName) ||
|
||||
(usePlugins.length === 1 && usePlugins[0] === USE_ALL_PLUGINS)
|
||||
)
|
||||
filteredPluginNames
|
||||
.map((pluginName) => {
|
||||
try {
|
||||
log.info(`Attempting to load plugin ${pluginName}...`);
|
||||
|
||||
+20
-20
@@ -92,7 +92,7 @@ function logNonDefaultArgsWarning(args) {
|
||||
function logDefaultCapabilitiesWarning(caps) {
|
||||
logger.info(
|
||||
'Default capabilities, which will be added to each request ' +
|
||||
'unless overridden by desired capabilities:'
|
||||
'unless overridden by desired capabilities:',
|
||||
);
|
||||
inspect(caps);
|
||||
}
|
||||
@@ -144,7 +144,7 @@ function getExtraMethodMap(driverClasses, pluginClasses) {
|
||||
...map,
|
||||
...(klass.newMethodMap ?? {}),
|
||||
}),
|
||||
{}
|
||||
{},
|
||||
);
|
||||
}
|
||||
|
||||
@@ -173,12 +173,12 @@ async function prepareAppiumHome(name, appiumHome) {
|
||||
throw new Error(
|
||||
`The path '${appiumHome}' provided in the ${name} must point ` +
|
||||
`to a valid folder writeable for the current user account '${os.userInfo().username}'. ` +
|
||||
`Original error: ${err.message}`
|
||||
`Original error: ${err.message}`,
|
||||
);
|
||||
}
|
||||
if (!stat.isDirectory()) {
|
||||
throw new Error(
|
||||
`The path '${appiumHome}' provided in the ${name} must point to a valid folder`
|
||||
`The path '${appiumHome}' provided in the ${name} must point to a valid folder`,
|
||||
);
|
||||
}
|
||||
try {
|
||||
@@ -187,7 +187,7 @@ async function prepareAppiumHome(name, appiumHome) {
|
||||
throw new Error(
|
||||
`The folder path '${appiumHome}' provided in the ${name} must be ` +
|
||||
`writeable for the current user account '${os.userInfo().username}. ` +
|
||||
`Original error: ${e.message}`
|
||||
`Original error: ${e.message}`,
|
||||
);
|
||||
}
|
||||
return appiumHome;
|
||||
@@ -250,7 +250,7 @@ async function init(args) {
|
||||
throw new Error(
|
||||
`Errors in config file ${configResult.filepath}:\n ${
|
||||
configResult.reason ?? configResult.errors
|
||||
}`
|
||||
}`,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -274,23 +274,23 @@ async function init(args) {
|
||||
|
||||
if (serverArgs.logFilters) {
|
||||
const {issues, rules} = await logFactory.loadSecureValuesPreprocessingRules(
|
||||
serverArgs.logFilters
|
||||
serverArgs.logFilters,
|
||||
);
|
||||
if (!_.isEmpty(issues)) {
|
||||
throw new Error(
|
||||
`The log filtering rules config '${serverArgs.logFilters}' has issues: ` +
|
||||
JSON.stringify(issues, null, 2)
|
||||
JSON.stringify(issues, null, 2),
|
||||
);
|
||||
}
|
||||
if (_.isEmpty(rules)) {
|
||||
logger.warn(
|
||||
`Found no log filtering rules in '${serverArgs.logFilters}'. Is that expected?`
|
||||
`Found no log filtering rules in '${serverArgs.logFilters}'. Is that expected?`,
|
||||
);
|
||||
} else {
|
||||
logger.info(
|
||||
`Loaded ${util.pluralize('filtering rule', rules.length, true)} from '${
|
||||
serverArgs.logFilters
|
||||
}'`
|
||||
}'`,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -298,7 +298,7 @@ async function init(args) {
|
||||
const appiumDriver = new AppiumDriver(
|
||||
/** @type {import('@appium/types').DriverOpts<import('./appium').AppiumDriverConstraints>} */ (
|
||||
serverArgs
|
||||
)
|
||||
),
|
||||
);
|
||||
// set the config on the umbrella driver so it can match drivers to caps
|
||||
appiumDriver.driverConfig = driverConfig;
|
||||
@@ -342,14 +342,12 @@ function logServerAddress(url) {
|
||||
const interfaces = fetchInterfaces(urlObj.hostname === V4_BROADCAST_IP ? 4 : 6);
|
||||
const toLabel = (/** @type {os.NetworkInterfaceInfo} */ iface) => {
|
||||
const href = urlObj.href.replace(urlObj.hostname, iface.address);
|
||||
return iface.internal
|
||||
? `${href} (only accessible from the same host)`
|
||||
: href;
|
||||
return iface.internal ? `${href} (only accessible from the same host)` : href;
|
||||
};
|
||||
logger.info(
|
||||
`You can provide the following ${interfaces.length === 1 ? 'URL' : 'URLs'} ` +
|
||||
`in your client code to connect to this server:\n` +
|
||||
interfaces.map((iface) => `\t${toLabel(iface)}`).join('\n')
|
||||
`in your client code to connect to this server:\n` +
|
||||
interfaces.map((iface) => `\t${toLabel(iface)}`).join('\n'),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -406,7 +404,7 @@ async function main(args) {
|
||||
} catch (err) {
|
||||
logger.error(
|
||||
`Could not configure Appium server. It's possible that a driver or plugin tried ` +
|
||||
`to update the server and failed. Original error: ${err.message}`
|
||||
`to update the server and failed. Original error: ${err.message}`,
|
||||
);
|
||||
logger.debug(err.stack);
|
||||
return process.exit(1);
|
||||
@@ -416,7 +414,7 @@ async function main(args) {
|
||||
logger.warn(
|
||||
'You have enabled CORS requests from any host. Be careful not ' +
|
||||
'to visit sites which could maliciously try to start Appium ' +
|
||||
'sessions on your machine'
|
||||
'sessions on your machine',
|
||||
);
|
||||
}
|
||||
appiumDriver.server = server;
|
||||
@@ -428,7 +426,7 @@ async function main(args) {
|
||||
parsedArgs.nodeconfig,
|
||||
parsedArgs.address,
|
||||
parsedArgs.port,
|
||||
parsedArgs.basePath
|
||||
parsedArgs.basePath,
|
||||
);
|
||||
}
|
||||
} catch (err) {
|
||||
@@ -452,7 +450,9 @@ async function main(args) {
|
||||
|
||||
const protocol = 'secure' in server && server.secure ? 'https' : 'http';
|
||||
const address = net.isIPv6(parsedArgs.address) ? `[${parsedArgs.address}]` : parsedArgs.address;
|
||||
logServerAddress(`${protocol}://${address}:${parsedArgs.port}${normalizeBasePath(parsedArgs.basePath)}`);
|
||||
logServerAddress(
|
||||
`${protocol}://${address}:${parsedArgs.port}${normalizeBasePath(parsedArgs.basePath)}`,
|
||||
);
|
||||
|
||||
driverConfig.print();
|
||||
pluginConfig.print([...pluginClasses.values()]);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "appium",
|
||||
"version": "2.2.0",
|
||||
"version": "2.2.2",
|
||||
"description": "Automation for Apps.",
|
||||
"keywords": [
|
||||
"automation",
|
||||
@@ -60,25 +60,25 @@
|
||||
"test:unit": "mocha \"./test/unit/**/*.spec.js\""
|
||||
},
|
||||
"dependencies": {
|
||||
"@appium/base-driver": "^9.4.0",
|
||||
"@appium/base-plugin": "^2.2.21",
|
||||
"@appium/docutils": "^0.4.10",
|
||||
"@appium/schema": "^0.4.0",
|
||||
"@appium/support": "^4.1.7",
|
||||
"@appium/types": "^0.14.0",
|
||||
"@appium/base-driver": "^9.4.2",
|
||||
"@appium/base-plugin": "^2.2.23",
|
||||
"@appium/docutils": "^0.4.12",
|
||||
"@appium/schema": "^0.4.2",
|
||||
"@appium/support": "^4.1.9",
|
||||
"@appium/types": "^0.14.2",
|
||||
"@sidvind/better-ajv-errors": "2.1.0",
|
||||
"@types/argparse": "2.0.11",
|
||||
"@types/bluebird": "3.5.40",
|
||||
"@types/fancy-log": "2.0.0",
|
||||
"@types/semver": "7.5.3",
|
||||
"@types/teen_process": "2.0.1",
|
||||
"@types/argparse": "2.0.13",
|
||||
"@types/bluebird": "3.5.42",
|
||||
"@types/fancy-log": "2.0.2",
|
||||
"@types/semver": "7.5.5",
|
||||
"@types/teen_process": "2.0.3",
|
||||
"@types/wrap-ansi": "3.0.0",
|
||||
"ajv": "8.12.0",
|
||||
"ajv-formats": "2.1.1",
|
||||
"argparse": "2.0.1",
|
||||
"async-lock": "1.4.0",
|
||||
"asyncbox": "2.9.4",
|
||||
"axios": "1.5.1",
|
||||
"asyncbox": "3.0.0",
|
||||
"axios": "1.6.1",
|
||||
"bluebird": "3.7.2",
|
||||
"cross-env": "7.0.3",
|
||||
"find-up": "5.0.0",
|
||||
@@ -90,11 +90,11 @@
|
||||
"resolve-from": "5.0.0",
|
||||
"semver": "7.5.4",
|
||||
"source-map-support": "0.5.21",
|
||||
"teen_process": "2.0.50",
|
||||
"teen_process": "2.0.84",
|
||||
"type-fest": "3.13.1",
|
||||
"winston": "3.11.0",
|
||||
"wrap-ansi": "7.0.0",
|
||||
"yaml": "2.3.3"
|
||||
"yaml": "2.3.4"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^14.17.0 || ^16.13.0 || >=18.0.0",
|
||||
|
||||
@@ -73,7 +73,7 @@ describe('FakeDriver via HTTP', function () {
|
||||
suppressOutput: true,
|
||||
showInstalled: true,
|
||||
},
|
||||
driverConfig
|
||||
driverConfig,
|
||||
);
|
||||
if (!_.has(driverList, 'fake')) {
|
||||
await runExtensionCommand(
|
||||
@@ -83,7 +83,7 @@ describe('FakeDriver via HTTP', function () {
|
||||
installType: INSTALL_TYPE_LOCAL,
|
||||
subcommand: DRIVER_TYPE,
|
||||
},
|
||||
driverConfig
|
||||
driverConfig,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -123,7 +123,7 @@ describe('FakeDriver via HTTP', function () {
|
||||
// arg got through.
|
||||
(await axios.post(`http://${TEST_HOST}:${port}/fakedriverCliArgs`)).data.should.have.property(
|
||||
'appiumHome',
|
||||
appiumHome
|
||||
appiumHome,
|
||||
);
|
||||
});
|
||||
});
|
||||
@@ -233,7 +233,7 @@ describe('FakeDriver via HTTP', function () {
|
||||
{
|
||||
'appium:newCommandTimeout': 0.25,
|
||||
},
|
||||
caps
|
||||
caps,
|
||||
);
|
||||
let driver = await wdio({...wdOpts, capabilities: localCaps});
|
||||
should.exist(driver.sessionId);
|
||||
@@ -249,7 +249,7 @@ describe('FakeDriver via HTTP', function () {
|
||||
{
|
||||
'appium:newCommandTimeout': 0.25,
|
||||
},
|
||||
caps
|
||||
caps,
|
||||
);
|
||||
let driver = await wdio({...wdOpts, capabilities: localCaps});
|
||||
should.exist(driver.sessionId);
|
||||
@@ -506,7 +506,7 @@ describe('FakeDriver via HTTP', function () {
|
||||
description: 'Call a deprecated command',
|
||||
parameters: [],
|
||||
ref: '',
|
||||
})
|
||||
}),
|
||||
);
|
||||
driver.addCommand(
|
||||
'doubleClick',
|
||||
@@ -515,7 +515,7 @@ describe('FakeDriver via HTTP', function () {
|
||||
description: 'Global double click',
|
||||
parameters: [],
|
||||
ref: '',
|
||||
})
|
||||
}),
|
||||
);
|
||||
await driver
|
||||
.executeScript('fake: getDeprecatedCommandsCalled', [])
|
||||
|
||||
@@ -107,55 +107,23 @@ describe('FakePlugin w/ FakeDriver via HTTP', function () {
|
||||
});
|
||||
|
||||
describe('without plugin registered', function () {
|
||||
/** @type {AppiumServer} */
|
||||
let server;
|
||||
|
||||
before(async function () {
|
||||
it('should reject server creation if plugin is not activated', async function () {
|
||||
const args = {
|
||||
appiumHome,
|
||||
port,
|
||||
address: TEST_HOST,
|
||||
usePlugins: ['other1', 'other2'],
|
||||
};
|
||||
server = /** @type {AppiumServer} */ (await appiumServer(args));
|
||||
await appiumServer(args).should.eventually.be.rejected;
|
||||
});
|
||||
|
||||
after(async function () {
|
||||
if (server) {
|
||||
await server.close();
|
||||
}
|
||||
});
|
||||
|
||||
it('should not update the server if plugin is not activated', async function () {
|
||||
await axios.post(`http://${TEST_HOST}:${port}/fake`).should.eventually.be.rejectedWith(/404/);
|
||||
});
|
||||
it('should not update method map if plugin is not activated', async function () {
|
||||
const driver = await wdio(wdOpts);
|
||||
const {sessionId} = driver;
|
||||
try {
|
||||
await axios
|
||||
.post(`${testServerBaseSessionUrl}/${sessionId}/fake_data`, {
|
||||
data: {fake: 'data'},
|
||||
})
|
||||
.should.eventually.be.rejectedWith(/404/);
|
||||
} finally {
|
||||
await driver.deleteSession();
|
||||
}
|
||||
});
|
||||
it('should not handle commands if plugin is not activated', async function () {
|
||||
const driver = await wdio(wdOpts);
|
||||
const {sessionId} = driver;
|
||||
try {
|
||||
const el = (
|
||||
await axios.post(`${testServerBaseSessionUrl}/${sessionId}/element`, {
|
||||
using: 'xpath',
|
||||
value: '//MockWebView',
|
||||
})
|
||||
).data.value;
|
||||
el.should.not.have.property('fake');
|
||||
} finally {
|
||||
await driver.deleteSession();
|
||||
}
|
||||
it('should reject server creation if reserved plugin name is provided with other names', async function () {
|
||||
const args = {
|
||||
appiumHome,
|
||||
port,
|
||||
address: TEST_HOST,
|
||||
usePlugins: ['fake', 'all'],
|
||||
};
|
||||
await appiumServer(args).should.eventually.be.rejected;
|
||||
});
|
||||
});
|
||||
|
||||
@@ -167,7 +135,7 @@ describe('FakePlugin w/ FakeDriver via HTTP', function () {
|
||||
let usePlugins;
|
||||
before(async function () {
|
||||
// then start server if we need to
|
||||
usePlugins = registrationType === 'explicit' ? ['fake', 'p2', 'p3'] : ['all'];
|
||||
usePlugins = registrationType === 'explicit' ? ['fake'] : ['all'];
|
||||
const args = {
|
||||
appiumHome,
|
||||
port,
|
||||
@@ -358,7 +326,7 @@ describe('FakePlugin w/ FakeDriver via HTTP', function () {
|
||||
/** @type {AppiumServer} */
|
||||
let server;
|
||||
|
||||
/** @type {import('webdriverio').Browser<'async'>} */
|
||||
/** @type {import('webdriverio').Browser} */
|
||||
let driver;
|
||||
|
||||
before(async function () {
|
||||
|
||||
@@ -3,6 +3,27 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [9.4.2](https://github.com/appium/appium/compare/@appium/base-driver@9.4.1...@appium/base-driver@9.4.2) (2023-11-14)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **support:** update definitelytyped ([5ae8df3](https://github.com/appium/appium/commit/5ae8df3c36c7f03fbf3420087b532086f6742348))
|
||||
* **support:** update dependency axios to v1.6.0 ([699c493](https://github.com/appium/appium/commit/699c49306c38e222d618a9611482b06a3e6806aa))
|
||||
* **support:** update dependency axios to v1.6.1 ([9b14205](https://github.com/appium/appium/commit/9b14205288ef09fd4a1144fc93c82b2bb2ed2ec0))
|
||||
|
||||
|
||||
|
||||
## [9.4.1](https://github.com/appium/appium/compare/@appium/base-driver@9.4.0...@appium/base-driver@9.4.1) (2023-10-19)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **appium:** Make sure type definitions are always in sync across modules ([#19323](https://github.com/appium/appium/issues/19323)) ([de39013](https://github.com/appium/appium/commit/de39013ae501d4fc11988435737efb862cc1d820))
|
||||
* **support:** update definitelytyped ([a306ce7](https://github.com/appium/appium/commit/a306ce741a806d21bc44f3b979803b8af5da99aa))
|
||||
|
||||
|
||||
|
||||
## [9.4.0](https://github.com/appium/appium/compare/@appium/base-driver@9.3.20...@appium/base-driver@9.4.0) (2023-10-18)
|
||||
|
||||
|
||||
|
||||
@@ -116,7 +116,6 @@ POST | `session/{sessionId}/appium/getPerformanceData` | returns the
|
||||
POST | `session/{sessionId}/appium/device/press_keycode` | Press a particular key code on the device.
|
||||
POST | `session/{sessionId}/appium/device/long_press_keycode` | Press and hold a particular key code on the device.
|
||||
POST | `session/{sessionId}/appium/device/keyevent` | Send a key code to the device.
|
||||
POST | `session/{sessionId}/appium/device/rotate` | Rotate the device in three dimensions.
|
||||
GET | `session/{sessionId}/appium/device/current_activity` | Retrieve the current activity running on the device.
|
||||
GET | `session/{sessionId}/appium/device/current_package` | Retrieve the current package running on the device.
|
||||
POST | `session/{sessionId}/appium/device/install_app` | Install the given app onto the device.
|
||||
|
||||
@@ -53,7 +53,7 @@ export class NoSuchDriverError extends ProtocolError {
|
||||
message || 'A session is either terminated or not started',
|
||||
NoSuchDriverError.code(),
|
||||
NoSuchDriverError.w3cStatus(),
|
||||
NoSuchDriverError.error()
|
||||
NoSuchDriverError.error(),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -77,7 +77,7 @@ export class NoSuchElementError extends ProtocolError {
|
||||
'An element could not be located on the page using the given ' + 'search parameters.',
|
||||
NoSuchElementError.code(),
|
||||
NoSuchElementError.w3cStatus(),
|
||||
NoSuchElementError.error()
|
||||
NoSuchElementError.error(),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -103,7 +103,7 @@ export class NoSuchFrameError extends ProtocolError {
|
||||
'the frame could not be found.',
|
||||
NoSuchFrameError.code(),
|
||||
NoSuchFrameError.w3cStatus(),
|
||||
NoSuchFrameError.error()
|
||||
NoSuchFrameError.error(),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -130,7 +130,7 @@ export class UnknownCommandError extends ProtocolError {
|
||||
'resource.',
|
||||
UnknownCommandError.code(),
|
||||
UnknownCommandError.w3cStatus(),
|
||||
UnknownCommandError.error()
|
||||
UnknownCommandError.error(),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -156,7 +156,7 @@ export class StaleElementReferenceError extends ProtocolError {
|
||||
'longer attached to the DOM.',
|
||||
StaleElementReferenceError.code(),
|
||||
StaleElementReferenceError.w3cStatus(),
|
||||
StaleElementReferenceError.error()
|
||||
StaleElementReferenceError.error(),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -181,7 +181,7 @@ export class ElementNotVisibleError extends ProtocolError {
|
||||
'not visible on the page.',
|
||||
ElementNotVisibleError.code(),
|
||||
ElementNotVisibleError.w3cStatus(),
|
||||
ElementNotVisibleError.error()
|
||||
ElementNotVisibleError.error(),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -207,7 +207,7 @@ export class InvalidElementStateError extends ProtocolError {
|
||||
'in an invalid state (e.g. attempting to click a disabled element).',
|
||||
InvalidElementStateError.code(),
|
||||
InvalidElementStateError.w3cStatus(),
|
||||
InvalidElementStateError.error()
|
||||
InvalidElementStateError.error(),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -252,7 +252,7 @@ export class UnknownMethodError extends ProtocolError {
|
||||
'The requested command matched a known URL but did not match an method for that URL',
|
||||
UnknownMethodError.code(),
|
||||
UnknownMethodError.w3cStatus(),
|
||||
UnknownMethodError.error()
|
||||
UnknownMethodError.error(),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -275,7 +275,7 @@ export class UnsupportedOperationError extends ProtocolError {
|
||||
message || 'A server-side error occurred. Command cannot be supported.',
|
||||
UnsupportedOperationError.code(),
|
||||
UnsupportedOperationError.w3cStatus(),
|
||||
UnsupportedOperationError.error()
|
||||
UnsupportedOperationError.error(),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -298,7 +298,7 @@ export class ElementIsNotSelectableError extends ProtocolError {
|
||||
message || 'An attempt was made to select an element that cannot be selected.',
|
||||
ElementIsNotSelectableError.code(),
|
||||
ElementIsNotSelectableError.w3cStatus(),
|
||||
ElementIsNotSelectableError.error()
|
||||
ElementIsNotSelectableError.error(),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -323,7 +323,7 @@ export class ElementClickInterceptedError extends ProtocolError {
|
||||
'the events is obscuring the element that was requested clicked',
|
||||
ElementClickInterceptedError.code(),
|
||||
ElementClickInterceptedError.w3cStatus(),
|
||||
ElementClickInterceptedError.error()
|
||||
ElementClickInterceptedError.error(),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -347,7 +347,7 @@ export class ElementNotInteractableError extends ProtocolError {
|
||||
'A command could not be completed because the element is not pointer- or keyboard interactable',
|
||||
ElementNotInteractableError.code(),
|
||||
ElementNotInteractableError.w3cStatus(),
|
||||
ElementNotInteractableError.error()
|
||||
ElementNotInteractableError.error(),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -365,7 +365,7 @@ export class InsecureCertificateError extends ProtocolError {
|
||||
'Navigation caused the user agent to hit a certificate warning, which is usually the result of an expired or invalid TLS certificate',
|
||||
ElementIsNotSelectableError.code(),
|
||||
null,
|
||||
InsecureCertificateError.error()
|
||||
InsecureCertificateError.error(),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -388,7 +388,7 @@ export class JavaScriptError extends ProtocolError {
|
||||
message || 'An error occurred while executing user supplied JavaScript.',
|
||||
JavaScriptError.code(),
|
||||
JavaScriptError.w3cStatus(),
|
||||
JavaScriptError.error()
|
||||
JavaScriptError.error(),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -411,7 +411,7 @@ export class XPathLookupError extends ProtocolError {
|
||||
message || 'An error occurred while searching for an element by XPath.',
|
||||
XPathLookupError.code(),
|
||||
XPathLookupError.w3cStatus(),
|
||||
XPathLookupError.error()
|
||||
XPathLookupError.error(),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -434,7 +434,7 @@ export class TimeoutError extends ProtocolError {
|
||||
message || 'An operation did not complete before its timeout expired.',
|
||||
TimeoutError.code(),
|
||||
TimeoutError.w3cStatus(),
|
||||
TimeoutError.error()
|
||||
TimeoutError.error(),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -459,7 +459,7 @@ export class NoSuchWindowError extends ProtocolError {
|
||||
'because the window could not be found.',
|
||||
NoSuchWindowError.code(),
|
||||
NoSuchWindowError.w3cStatus(),
|
||||
NoSuchWindowError.error()
|
||||
NoSuchWindowError.error(),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -482,7 +482,7 @@ export class InvalidArgumentError extends ProtocolError {
|
||||
err || 'The arguments passed to the command are either invalid or malformed',
|
||||
InvalidArgumentError.code(),
|
||||
InvalidArgumentError.w3cStatus(),
|
||||
InvalidArgumentError.error()
|
||||
InvalidArgumentError.error(),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -507,7 +507,7 @@ export class InvalidCookieDomainError extends ProtocolError {
|
||||
'domain than the current page.',
|
||||
InvalidCookieDomainError.code(),
|
||||
InvalidCookieDomainError.w3cStatus(),
|
||||
InvalidCookieDomainError.error()
|
||||
InvalidCookieDomainError.error(),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -531,7 +531,7 @@ export class NoSuchCookieError extends ProtocolError {
|
||||
'No cookie matching the given path name was found amongst the associated cookies of the current browsing context’s active document',
|
||||
NoSuchCookieError.code(),
|
||||
NoSuchCookieError.w3cStatus(),
|
||||
NoSuchCookieError.error()
|
||||
NoSuchCookieError.error(),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -554,7 +554,7 @@ export class UnableToSetCookieError extends ProtocolError {
|
||||
err || "A request to set a cookie's value could not be satisfied.",
|
||||
UnableToSetCookieError.code(),
|
||||
UnableToSetCookieError.w3cStatus(),
|
||||
UnableToSetCookieError.error()
|
||||
UnableToSetCookieError.error(),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -577,7 +577,7 @@ export class UnexpectedAlertOpenError extends ProtocolError {
|
||||
message || 'A modal dialog was open, blocking this operation',
|
||||
UnexpectedAlertOpenError.code(),
|
||||
UnexpectedAlertOpenError.w3cStatus(),
|
||||
UnexpectedAlertOpenError.error()
|
||||
UnexpectedAlertOpenError.error(),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -601,7 +601,7 @@ export class NoAlertOpenError extends ProtocolError {
|
||||
message || 'An attempt was made to operate on a modal dialog when one ' + 'was not open.',
|
||||
NoAlertOpenError.code(),
|
||||
NoAlertOpenError.w3cStatus(),
|
||||
NoAlertOpenError.error()
|
||||
NoAlertOpenError.error(),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -626,7 +626,7 @@ export class ScriptTimeoutError extends ProtocolError {
|
||||
err || 'A script did not complete before its timeout expired.',
|
||||
ScriptTimeoutError.code(),
|
||||
ScriptTimeoutError.w3cStatus(),
|
||||
ScriptTimeoutError.error()
|
||||
ScriptTimeoutError.error(),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -649,7 +649,7 @@ export class InvalidElementCoordinatesError extends ProtocolError {
|
||||
err || 'The coordinates provided to an interactions operation are invalid.',
|
||||
InvalidElementCoordinatesError.code(),
|
||||
InvalidElementCoordinatesError.w3cStatus(),
|
||||
InvalidElementCoordinatesError.error()
|
||||
InvalidElementCoordinatesError.error(),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -674,7 +674,7 @@ export class IMENotAvailableError extends ProtocolError {
|
||||
message || 'IME was not available.',
|
||||
IMENotAvailableError.code(),
|
||||
IMENotAvailableError.w3cStatus(),
|
||||
IMENotAvailableError.error()
|
||||
IMENotAvailableError.error(),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -697,7 +697,7 @@ export class IMEEngineActivationFailedError extends ProtocolError {
|
||||
err || 'An IME engine could not be started.',
|
||||
IMEEngineActivationFailedError.code(),
|
||||
IMEEngineActivationFailedError.w3cStatus(),
|
||||
IMEEngineActivationFailedError.error()
|
||||
IMEEngineActivationFailedError.error(),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -720,7 +720,7 @@ export class InvalidSelectorError extends ProtocolError {
|
||||
err || 'Argument was an invalid selector (e.g. XPath/CSS).',
|
||||
InvalidSelectorError.code(),
|
||||
InvalidSelectorError.w3cStatus(),
|
||||
InvalidSelectorError.error()
|
||||
InvalidSelectorError.error(),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -745,7 +745,7 @@ export class SessionNotCreatedError extends ProtocolError {
|
||||
message,
|
||||
SessionNotCreatedError.code(),
|
||||
SessionNotCreatedError.w3cStatus(),
|
||||
SessionNotCreatedError.error()
|
||||
SessionNotCreatedError.error(),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -768,7 +768,7 @@ export class MoveTargetOutOfBoundsError extends ProtocolError {
|
||||
err || 'Target provided for a move action is out of bounds.',
|
||||
MoveTargetOutOfBoundsError.code(),
|
||||
MoveTargetOutOfBoundsError.w3cStatus(),
|
||||
MoveTargetOutOfBoundsError.error()
|
||||
MoveTargetOutOfBoundsError.error(),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -797,7 +797,7 @@ export class InvalidContextError extends ProtocolError {
|
||||
constructor(message) {
|
||||
super(
|
||||
message || 'That command could not be executed in the current context.',
|
||||
InvalidContextError.code()
|
||||
InvalidContextError.code(),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -838,24 +838,26 @@ export class UnableToCaptureScreen extends ProtocolError {
|
||||
err || 'A screen capture was made impossible',
|
||||
UnableToCaptureScreen.code(),
|
||||
UnableToCaptureScreen.w3cStatus(),
|
||||
UnableToCaptureScreen.error()
|
||||
UnableToCaptureScreen.error(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function generateBadParametersMessage(requiredParams, actualParams) {
|
||||
const toArray = (/** @type {any} */ x) => _.isArray(x) ? x : [];
|
||||
const toArray = (/** @type {any} */ x) => (_.isArray(x) ? x : []);
|
||||
|
||||
const requiredParamNames = toArray(requiredParams?.required);
|
||||
const actualParamNames = toArray(actualParams);
|
||||
const missingRequiredParamNames = _.difference(requiredParamNames, actualParamNames);
|
||||
/** @type {string[]} */
|
||||
const resultLines = [];
|
||||
resultLines.push(_.isEmpty(missingRequiredParamNames)
|
||||
// This should not happen
|
||||
? 'Some of the provided parameters are not known'
|
||||
: (`The following required parameter${missingRequiredParamNames.length === 1 ? ' is ' : 's are '}`
|
||||
+ `missing: ${JSON.stringify(missingRequiredParamNames)}`)
|
||||
resultLines.push(
|
||||
_.isEmpty(missingRequiredParamNames)
|
||||
? // This should not happen
|
||||
'Some of the provided parameters are not known'
|
||||
: `The following required parameter${
|
||||
missingRequiredParamNames.length === 1 ? ' is ' : 's are '
|
||||
}` + `missing: ${JSON.stringify(missingRequiredParamNames)}`,
|
||||
);
|
||||
if (!_.isEmpty(requiredParamNames)) {
|
||||
resultLines.push(`Known required parameters are: ${JSON.stringify(requiredParamNames)}`);
|
||||
@@ -865,7 +867,9 @@ function generateBadParametersMessage(requiredParams, actualParams) {
|
||||
resultLines.push(`Known optional parameters are: ${JSON.stringify(optionalParamNames)}`);
|
||||
}
|
||||
resultLines.push(
|
||||
`You have provided${_.isEmpty(actualParamNames) ? ' none' : (': ' + JSON.stringify(actualParams))}`
|
||||
`You have provided${
|
||||
_.isEmpty(actualParamNames) ? ' none' : ': ' + JSON.stringify(actualParams)
|
||||
}`,
|
||||
);
|
||||
return resultLines.join('\n');
|
||||
}
|
||||
@@ -876,9 +880,10 @@ export class BadParametersError extends ES6Error {
|
||||
return 'invalid argument';
|
||||
}
|
||||
constructor(requiredParams, actualParams, errMessage) {
|
||||
super(errMessage
|
||||
? `Parameters were incorrect. You sent ${JSON.stringify(actualParams)}, ${errMessage}`
|
||||
: generateBadParametersMessage(requiredParams, actualParams)
|
||||
super(
|
||||
errMessage
|
||||
? `Parameters were incorrect. You sent ${JSON.stringify(actualParams)}, ${errMessage}`
|
||||
: generateBadParametersMessage(requiredParams, actualParams),
|
||||
);
|
||||
this.w3cStatus = HTTPStatusCodes.BAD_REQUEST;
|
||||
}
|
||||
@@ -928,7 +933,7 @@ export class ProxyRequestError extends ES6Error {
|
||||
return errorFromW3CJsonCode(
|
||||
this.w3c.error,
|
||||
this.w3c.message || this.message,
|
||||
this.w3c.stacktrace
|
||||
this.w3c.stacktrace,
|
||||
);
|
||||
}
|
||||
return new UnknownError(this.message);
|
||||
|
||||
@@ -568,16 +568,6 @@ const METHOD_MAP = /** @type {const} */ ({
|
||||
deprecated: true,
|
||||
},
|
||||
},
|
||||
'/session/:sessionId/appium/device/rotate': {
|
||||
POST: {
|
||||
command: 'mobileRotation',
|
||||
payloadParams: {
|
||||
required: ['x', 'y', 'radius', 'rotation', 'touchCount', 'duration'],
|
||||
optional: ['element'],
|
||||
},
|
||||
deprecated: true,
|
||||
},
|
||||
},
|
||||
'/session/:sessionId/appium/device/current_activity': {
|
||||
GET: {command: 'getCurrentActivity', deprecated: true},
|
||||
},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@appium/base-driver",
|
||||
"version": "9.4.0",
|
||||
"version": "9.4.2",
|
||||
"description": "Base driver class for Appium drivers",
|
||||
"keywords": [
|
||||
"automation",
|
||||
@@ -44,18 +44,18 @@
|
||||
"test:types": "tsd"
|
||||
},
|
||||
"dependencies": {
|
||||
"@appium/support": "^4.1.7",
|
||||
"@appium/types": "^0.14.0",
|
||||
"@appium/support": "^4.1.9",
|
||||
"@appium/types": "^0.14.2",
|
||||
"@colors/colors": "1.6.0",
|
||||
"@types/async-lock": "1.4.0",
|
||||
"@types/bluebird": "3.5.40",
|
||||
"@types/express": "4.17.19",
|
||||
"@types/lodash": "4.14.199",
|
||||
"@types/method-override": "0.0.33",
|
||||
"@types/serve-favicon": "2.5.5",
|
||||
"@types/async-lock": "1.4.2",
|
||||
"@types/bluebird": "3.5.42",
|
||||
"@types/express": "4.17.21",
|
||||
"@types/lodash": "4.14.201",
|
||||
"@types/method-override": "0.0.35",
|
||||
"@types/serve-favicon": "2.5.7",
|
||||
"async-lock": "1.4.0",
|
||||
"asyncbox": "2.9.4",
|
||||
"axios": "1.5.1",
|
||||
"asyncbox": "3.0.0",
|
||||
"axios": "1.6.1",
|
||||
"bluebird": "3.7.2",
|
||||
"body-parser": "1.20.2",
|
||||
"es6-error": "4.1.1",
|
||||
|
||||
@@ -35,7 +35,7 @@ describe('Protocol', function () {
|
||||
}
|
||||
let hash = shasum.digest('hex').substring(0, 8);
|
||||
// Modify the hash whenever the protocol has intentionally been modified.
|
||||
hash.should.equal('484810b0');
|
||||
hash.should.equal('6e93ad90');
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -3,6 +3,22 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [2.2.23](https://github.com/appium/appium/compare/@appium/base-plugin@2.2.22...@appium/base-plugin@2.2.23) (2023-11-14)
|
||||
|
||||
**Note:** Version bump only for package @appium/base-plugin
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [2.2.22](https://github.com/appium/appium/compare/@appium/base-plugin@2.2.21...@appium/base-plugin@2.2.22) (2023-10-19)
|
||||
|
||||
**Note:** Version bump only for package @appium/base-plugin
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [2.2.21](https://github.com/appium/appium/compare/@appium/base-plugin@2.2.20...@appium/base-plugin@2.2.21) (2023-10-18)
|
||||
|
||||
**Note:** Version bump only for package @appium/base-plugin
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@appium/base-plugin",
|
||||
"version": "2.2.21",
|
||||
"version": "2.2.23",
|
||||
"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.4.0",
|
||||
"@appium/support": "^4.1.7"
|
||||
"@appium/base-driver": "^9.4.2",
|
||||
"@appium/support": "^4.1.9"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^14.17.0 || ^16.13.0 || >=18.0.0",
|
||||
|
||||
@@ -3,6 +3,38 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [2.0.28](https://github.com/appium/appium/compare/@appium/doctor@2.0.27...@appium/doctor@2.0.28) (2023-11-14)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **doctor:** update dependency appium-adb to v11.0.3 ([ee1df47](https://github.com/appium/appium/commit/ee1df47b172009717b81cce7b3465219791b1f97))
|
||||
* **doctor:** update dependency appium-adb to v11.0.5 ([#19362](https://github.com/appium/appium/issues/19362)) ([b82f13b](https://github.com/appium/appium/commit/b82f13b893c44bcaf9908a9ebe96d3bb51c1f6b3))
|
||||
* **doctor:** update dependency appium-adb to v11.0.6 ([c2f543f](https://github.com/appium/appium/commit/c2f543fc1009067141bc6cf50a2d0e47f1a455b2))
|
||||
* **doctor:** update dependency appium-adb to v11.0.7 ([261cfc8](https://github.com/appium/appium/commit/261cfc8694f9eeab774712e67bbf46e72615efa7))
|
||||
* **support:** update definitelytyped ([5ae8df3](https://github.com/appium/appium/commit/5ae8df3c36c7f03fbf3420087b532086f6742348))
|
||||
* **support:** update dependency teen_process to v2.0.57 ([1fbd503](https://github.com/appium/appium/commit/1fbd503a66b965a9b32bbb6702062861a8480333))
|
||||
* **support:** update dependency teen_process to v2.0.63 ([fa57192](https://github.com/appium/appium/commit/fa571925b7ac980cc99c8d23f659420eacd8546c))
|
||||
* **support:** update dependency teen_process to v2.0.64 ([332bb59](https://github.com/appium/appium/commit/332bb59ee3fdd14c03f6b3c4fd6587a30319d568))
|
||||
* **support:** update dependency teen_process to v2.0.66 ([3205b5d](https://github.com/appium/appium/commit/3205b5d06f073f1e5c7735c6e36ad08fdf091182))
|
||||
* **support:** update dependency teen_process to v2.0.67 ([3b5ae2a](https://github.com/appium/appium/commit/3b5ae2ab17c74c9890b53c081aec146152f11c7a))
|
||||
* **support:** update dependency teen_process to v2.0.73 ([8e453be](https://github.com/appium/appium/commit/8e453bed3f440c1dcf82f016f7d4431365b9cdff))
|
||||
* **support:** update dependency teen_process to v2.0.75 ([fbb6fd9](https://github.com/appium/appium/commit/fbb6fd9a2780eb00c15584abeaf644a1fcdecb4d))
|
||||
* **support:** update teen_process-related packages ([84d96db](https://github.com/appium/appium/commit/84d96dbae45dfe56218d32330f8ff2d26b750fb7))
|
||||
* **support:** update teen_process-related packages ([3d0b97c](https://github.com/appium/appium/commit/3d0b97cae76c616da0aea5b92cebcd38d59263b7))
|
||||
|
||||
|
||||
|
||||
## [2.0.27](https://github.com/appium/appium/compare/@appium/doctor@2.0.26...@appium/doctor@2.0.27) (2023-10-19)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **doctor:** update dependency appium-adb to v11 ([#19321](https://github.com/appium/appium/issues/19321)) ([408885a](https://github.com/appium/appium/commit/408885a5b28f8691dbbb3716f3c1a409d662275b))
|
||||
* **support:** update definitelytyped ([a306ce7](https://github.com/appium/appium/commit/a306ce741a806d21bc44f3b979803b8af5da99aa))
|
||||
|
||||
|
||||
|
||||
## [2.0.26](https://github.com/appium/appium/compare/@appium/doctor@2.0.25...@appium/doctor@2.0.26) (2023-10-18)
|
||||
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ class AndroidToolCheck extends DoctorCheck {
|
||||
const sdkRoot = getSdkRootFromEnv();
|
||||
if (!sdkRoot) {
|
||||
return nok(
|
||||
`${listOfTools} could not be found because ANDROID_HOME or ANDROID_SDK_ROOT is NOT set!`
|
||||
`${listOfTools} could not be found because ANDROID_HOME is NOT set!`
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@appium/doctor",
|
||||
"version": "2.0.26",
|
||||
"version": "2.0.28",
|
||||
"description": "Test environment for fitness to run Appium",
|
||||
"keywords": [
|
||||
"automation",
|
||||
@@ -44,16 +44,16 @@
|
||||
"test:unit": "mocha \"./test/unit/**/*.spec.js\""
|
||||
},
|
||||
"dependencies": {
|
||||
"@appium/support": "^4.1.7",
|
||||
"@appium/support": "^4.1.9",
|
||||
"@colors/colors": "1.6.0",
|
||||
"@types/bluebird": "3.5.40",
|
||||
"@types/teen_process": "2.0.1",
|
||||
"appium-adb": "10.0.0",
|
||||
"@types/bluebird": "3.5.42",
|
||||
"@types/teen_process": "2.0.3",
|
||||
"appium-adb": "11.0.7",
|
||||
"bluebird": "3.7.2",
|
||||
"inquirer": "8.2.6",
|
||||
"lodash": "4.17.21",
|
||||
"source-map-support": "0.5.21",
|
||||
"teen_process": "2.0.50",
|
||||
"teen_process": "2.0.84",
|
||||
"yargs": "17.7.2"
|
||||
},
|
||||
"engines": {
|
||||
|
||||
@@ -92,7 +92,7 @@ describe('android', function () {
|
||||
(await check.diagnose()).should.deep.equal({
|
||||
ok: false,
|
||||
optional: false,
|
||||
message: `adb, emulator, ${apkAnalyzerFilename} could not be found because ANDROID_HOME or ANDROID_SDK_ROOT is NOT set!`,
|
||||
message: `adb, emulator, ${apkAnalyzerFilename} could not be found because ANDROID_HOME is NOT set!`,
|
||||
});
|
||||
});
|
||||
it('diagnose - failure - path not valid', async function () {
|
||||
|
||||
@@ -3,6 +3,34 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [0.4.12](https://github.com/appium/appium/compare/@appium/docutils@0.4.11...@appium/docutils@0.4.12) (2023-11-14)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **docutils:** update dependency yaml to v2.3.4 ([a215a89](https://github.com/appium/appium/commit/a215a89f684c50da24d669d60a73fb6268b05c7f))
|
||||
* **support:** update definitelytyped ([#19326](https://github.com/appium/appium/issues/19326)) ([9840315](https://github.com/appium/appium/commit/98403151f86665d723bf887e907825bbc4cc2d3d))
|
||||
* **support:** update dependency teen_process to v2.0.57 ([1fbd503](https://github.com/appium/appium/commit/1fbd503a66b965a9b32bbb6702062861a8480333))
|
||||
* **support:** update dependency teen_process to v2.0.63 ([fa57192](https://github.com/appium/appium/commit/fa571925b7ac980cc99c8d23f659420eacd8546c))
|
||||
* **support:** update dependency teen_process to v2.0.64 ([332bb59](https://github.com/appium/appium/commit/332bb59ee3fdd14c03f6b3c4fd6587a30319d568))
|
||||
* **support:** update dependency teen_process to v2.0.66 ([3205b5d](https://github.com/appium/appium/commit/3205b5d06f073f1e5c7735c6e36ad08fdf091182))
|
||||
* **support:** update dependency teen_process to v2.0.67 ([3b5ae2a](https://github.com/appium/appium/commit/3b5ae2ab17c74c9890b53c081aec146152f11c7a))
|
||||
* **support:** update dependency teen_process to v2.0.73 ([8e453be](https://github.com/appium/appium/commit/8e453bed3f440c1dcf82f016f7d4431365b9cdff))
|
||||
* **support:** update dependency teen_process to v2.0.75 ([fbb6fd9](https://github.com/appium/appium/commit/fbb6fd9a2780eb00c15584abeaf644a1fcdecb4d))
|
||||
* **support:** update teen_process-related packages ([84d96db](https://github.com/appium/appium/commit/84d96dbae45dfe56218d32330f8ff2d26b750fb7))
|
||||
* **support:** update teen_process-related packages ([3d0b97c](https://github.com/appium/appium/commit/3d0b97cae76c616da0aea5b92cebcd38d59263b7))
|
||||
|
||||
|
||||
|
||||
## [0.4.11](https://github.com/appium/appium/compare/@appium/docutils@0.4.10...@appium/docutils@0.4.11) (2023-10-19)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **appium:** Make sure type definitions are always in sync across modules ([#19323](https://github.com/appium/appium/issues/19323)) ([de39013](https://github.com/appium/appium/commit/de39013ae501d4fc11988435737efb862cc1d820))
|
||||
|
||||
|
||||
|
||||
## [0.4.10](https://github.com/appium/appium/compare/@appium/docutils@0.4.9...@appium/docutils@0.4.10) (2023-10-18)
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@appium/docutils",
|
||||
"version": "0.4.10",
|
||||
"version": "0.4.12",
|
||||
"description": "Documentation generation utilities for Appium and related projects",
|
||||
"keywords": [
|
||||
"automation",
|
||||
@@ -49,11 +49,11 @@
|
||||
"start": "node ./build/lib/cli/index.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@appium/support": "^4.1.7",
|
||||
"@appium/tsconfig": "^0.3.2",
|
||||
"@appium/typedoc-plugin-appium": "^0.6.6",
|
||||
"@appium/support": "^4.1.9",
|
||||
"@appium/tsconfig": "^0.x",
|
||||
"@appium/typedoc-plugin-appium": "^0.x",
|
||||
"@sliphua/lilconfig-ts-loader": "3.2.2",
|
||||
"@types/which": "3.0.0",
|
||||
"@types/which": "3.0.1",
|
||||
"chalk": "4.1.2",
|
||||
"consola": "2.15.3",
|
||||
"diff": "5.1.0",
|
||||
@@ -67,13 +67,13 @@
|
||||
"read-pkg": "5.2.0",
|
||||
"semver": "7.5.4",
|
||||
"source-map-support": "0.5.21",
|
||||
"teen_process": "2.0.50",
|
||||
"teen_process": "2.0.84",
|
||||
"type-fest": "3.13.1",
|
||||
"typedoc": "0.23.28",
|
||||
"typedoc-plugin-markdown": "3.14.0",
|
||||
"typedoc-plugin-resolve-crossmodule-references": "0.3.3",
|
||||
"typescript": "5.0.4",
|
||||
"yaml": "2.3.3",
|
||||
"yaml": "2.3.4",
|
||||
"yargs": "17.7.2",
|
||||
"yargs-parser": "21.1.1"
|
||||
},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
mkdocs==1.5.3
|
||||
mkdocs-material==9.4.6
|
||||
mkdocs-material==9.4.8
|
||||
mkdocs-material-extensions==1.3
|
||||
mike==1.1.2
|
||||
|
||||
@@ -3,6 +3,28 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [0.4.17](https://github.com/appium/appium/compare/@appium/driver-test-support@0.4.16...@appium/driver-test-support@0.4.17) (2023-11-14)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **support:** update definitelytyped ([5ae8df3](https://github.com/appium/appium/commit/5ae8df3c36c7f03fbf3420087b532086f6742348))
|
||||
* **support:** update dependency axios to v1.6.0 ([699c493](https://github.com/appium/appium/commit/699c49306c38e222d618a9611482b06a3e6806aa))
|
||||
* **support:** update dependency axios to v1.6.1 ([9b14205](https://github.com/appium/appium/commit/9b14205288ef09fd4a1144fc93c82b2bb2ed2ec0))
|
||||
|
||||
|
||||
|
||||
## [0.4.16](https://github.com/appium/appium/compare/@appium/driver-test-support@0.4.15...@appium/driver-test-support@0.4.16) (2023-10-19)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **appium:** Make sure type definitions are always in sync across modules ([#19323](https://github.com/appium/appium/issues/19323)) ([de39013](https://github.com/appium/appium/commit/de39013ae501d4fc11988435737efb862cc1d820))
|
||||
* **support:** update definitelytyped ([a306ce7](https://github.com/appium/appium/commit/a306ce741a806d21bc44f3b979803b8af5da99aa))
|
||||
* **test-support:** update dependency sinon to v16.1.3 ([aaa7668](https://github.com/appium/appium/commit/aaa7668ae6d58f1ac6a5af957b9b214ee71c6a48))
|
||||
|
||||
|
||||
|
||||
## [0.4.15](https://github.com/appium/appium/compare/@appium/driver-test-support@0.4.14...@appium/driver-test-support@0.4.15) (2023-10-18)
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@appium/driver-test-support",
|
||||
"version": "0.4.15",
|
||||
"version": "0.4.17",
|
||||
"description": "Test utilities for Appium drivers",
|
||||
"keywords": [
|
||||
"automation",
|
||||
@@ -41,15 +41,15 @@
|
||||
},
|
||||
"types": "./build/lib/index.d.ts",
|
||||
"dependencies": {
|
||||
"@appium/types": "^0.14.0",
|
||||
"@types/lodash": "4.14.199",
|
||||
"@types/stoppable": "1.1.1",
|
||||
"axios": "1.5.1",
|
||||
"@appium/types": "^0.14.2",
|
||||
"@types/lodash": "4.14.201",
|
||||
"@types/stoppable": "1.1.3",
|
||||
"axios": "1.6.1",
|
||||
"bluebird": "3.7.2",
|
||||
"chai": "4.3.10",
|
||||
"get-port": "5.1.1",
|
||||
"lodash": "4.17.21",
|
||||
"sinon": "16.1.0",
|
||||
"sinon": "16.1.3",
|
||||
"source-map-support": "0.5.21",
|
||||
"stoppable": "1.1.0",
|
||||
"type-fest": "3.13.1"
|
||||
|
||||
@@ -3,6 +3,26 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [3.0.20](https://github.com/appium/appium/compare/@appium/execute-driver-plugin@3.0.19...@appium/execute-driver-plugin@3.0.20) (2023-11-14)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **execute-driver-plugin:** update dependency webdriverio to v8.20.3 ([1f79433](https://github.com/appium/appium/commit/1f79433059749f91f6e212745863e577f7456d73))
|
||||
* **execute-driver-plugin:** update dependency webdriverio to v8.21.0 ([d44a136](https://github.com/appium/appium/commit/d44a136e55f8f2c6070ad1f3e3e010ebd5522a84))
|
||||
* **support:** update definitelytyped ([5ae8df3](https://github.com/appium/appium/commit/5ae8df3c36c7f03fbf3420087b532086f6742348))
|
||||
|
||||
|
||||
|
||||
## [3.0.19](https://github.com/appium/appium/compare/@appium/execute-driver-plugin@3.0.18...@appium/execute-driver-plugin@3.0.19) (2023-10-19)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **support:** update definitelytyped ([a306ce7](https://github.com/appium/appium/commit/a306ce741a806d21bc44f3b979803b8af5da99aa))
|
||||
|
||||
|
||||
|
||||
## [3.0.18](https://github.com/appium/appium/compare/@appium/execute-driver-plugin@3.0.17...@appium/execute-driver-plugin@3.0.18) (2023-10-18)
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@appium/execute-driver-plugin",
|
||||
"version": "3.0.18",
|
||||
"version": "3.0.20",
|
||||
"description": "Plugin for batching and executing driver commands with Appiums",
|
||||
"keywords": [
|
||||
"automation",
|
||||
@@ -38,12 +38,12 @@
|
||||
"test:unit": "mocha \"./test/unit/**/*.spec.js\""
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/bluebird": "3.5.40",
|
||||
"@types/bluebird": "3.5.42",
|
||||
"bluebird": "3.7.2",
|
||||
"lodash": "4.17.21",
|
||||
"source-map-support": "0.5.21",
|
||||
"vm2": "3.9.19",
|
||||
"webdriverio": "8.17.0"
|
||||
"webdriverio": "8.21.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"appium": "^2.0.0-beta.35"
|
||||
|
||||
@@ -67,7 +67,7 @@ describe('ExecuteDriverPlugin', function () {
|
||||
it('should not work unless the allowInsecure feature flag is set', async function () {
|
||||
driver = await wdio({...WDIO_OPTS, port: this.port});
|
||||
await driver
|
||||
.driverScript(basicScript)
|
||||
.executeDriverScript(basicScript)
|
||||
.should.be.rejectedWith(/allow-insecure.+execute_driver_script/i);
|
||||
});
|
||||
});
|
||||
@@ -91,7 +91,7 @@ describe('ExecuteDriverPlugin', function () {
|
||||
return [timeouts, status];
|
||||
`;
|
||||
const expectedTimeouts = {command: 60000, implicit: 0};
|
||||
const {result, logs} = await driver.driverScript(script);
|
||||
const {result, logs} = await driver.executeDriverScript(script);
|
||||
result[0].should.eql(expectedTimeouts);
|
||||
result[1].build.should.exist;
|
||||
result[1].build.version.should.exist;
|
||||
@@ -100,14 +100,14 @@ describe('ExecuteDriverPlugin', function () {
|
||||
|
||||
it('should fail with any script type other than webdriverio currently', async function () {
|
||||
const script = `return 'foo'`;
|
||||
await driver.driverScript(script, 'wd').should.be.rejectedWith(/webdriverio/);
|
||||
await driver.executeDriverScript(script, 'wd').should.be.rejectedWith(/webdriverio/);
|
||||
});
|
||||
|
||||
it('should execute a webdriverio script that returns elements correctly', async function () {
|
||||
const script = `
|
||||
return await driver.$("#Button1");
|
||||
`;
|
||||
const {result} = await driver.driverScript(script);
|
||||
const {result} = await driver.executeDriverScript(script);
|
||||
result.should.eql({
|
||||
[W3C_ELEMENT_KEY]: '1',
|
||||
[MJSONWP_ELEMENT_KEY]: '1',
|
||||
@@ -119,7 +119,7 @@ describe('ExecuteDriverPlugin', function () {
|
||||
const el = await driver.$("#Button1");
|
||||
return {element: el, elements: [el, el]};
|
||||
`;
|
||||
const {result} = await driver.driverScript(script);
|
||||
const {result} = await driver.executeDriverScript(script);
|
||||
const elObj = {
|
||||
[W3C_ELEMENT_KEY]: '1',
|
||||
[MJSONWP_ELEMENT_KEY]: '1',
|
||||
@@ -135,7 +135,7 @@ describe('ExecuteDriverPlugin', function () {
|
||||
console.error("baz");
|
||||
return null;
|
||||
`;
|
||||
const {logs} = await driver.driverScript(script);
|
||||
const {logs} = await driver.executeDriverScript(script);
|
||||
logs.should.eql({log: ['foo', 'foo2'], warn: ['bar'], error: ['baz']});
|
||||
});
|
||||
|
||||
@@ -143,7 +143,7 @@ describe('ExecuteDriverPlugin', function () {
|
||||
const script = `
|
||||
return typeof driver.lock;
|
||||
`;
|
||||
const {result} = await driver.driverScript(script);
|
||||
const {result} = await driver.executeDriverScript(script);
|
||||
result.should.eql('function');
|
||||
});
|
||||
|
||||
@@ -151,7 +151,7 @@ describe('ExecuteDriverPlugin', function () {
|
||||
const script = `
|
||||
return await driver.$("~notfound");
|
||||
`;
|
||||
const {result} = await driver.driverScript(script);
|
||||
const {result} = await driver.executeDriverScript(script);
|
||||
result.error.error.should.equal('no such element');
|
||||
result.error.message.should.match(/element could not be located/);
|
||||
result.error.stacktrace.should.includes('NoSuchElementError:');
|
||||
@@ -164,7 +164,7 @@ describe('ExecuteDriverPlugin', function () {
|
||||
return {;
|
||||
`;
|
||||
await driver
|
||||
.driverScript(script)
|
||||
.executeDriverScript(script)
|
||||
.should.be.rejectedWith(/Could not execute driver script.+Unexpected token/);
|
||||
});
|
||||
|
||||
@@ -174,7 +174,7 @@ describe('ExecuteDriverPlugin', function () {
|
||||
return true;
|
||||
`;
|
||||
await driver
|
||||
.driverScript(script, 'webdriverio', 50)
|
||||
.executeDriverScript(script, 'webdriverio', 50)
|
||||
.should.be.rejectedWith(/.+50.+timeout.+/);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -3,6 +3,24 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [5.2.11](https://github.com/appium/appium/compare/@appium/fake-driver@5.2.10...@appium/fake-driver@5.2.11) (2023-11-14)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **support:** update definitelytyped ([5ae8df3](https://github.com/appium/appium/commit/5ae8df3c36c7f03fbf3420087b532086f6742348))
|
||||
|
||||
|
||||
|
||||
## [5.2.10](https://github.com/appium/appium/compare/@appium/fake-driver@5.2.9...@appium/fake-driver@5.2.10) (2023-10-19)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **support:** update definitelytyped ([a306ce7](https://github.com/appium/appium/commit/a306ce741a806d21bc44f3b979803b8af5da99aa))
|
||||
|
||||
|
||||
|
||||
## [5.2.9](https://github.com/appium/appium/compare/@appium/fake-driver@5.2.8...@appium/fake-driver@5.2.9) (2023-10-18)
|
||||
|
||||
|
||||
|
||||
@@ -71,7 +71,6 @@ import './general';
|
||||
//rest.post('/wd/hub/session/:sessionId?/appium/device/press_keycode', controller.pressKeyCode);
|
||||
//rest.post('/wd/hub/session/:sessionId?/appium/device/long_press_keycode', controller.longPressKeyCode);
|
||||
//rest.post('/wd/hub/session/:sessionId?/appium/device/keyevent', controller.keyevent);
|
||||
//rest.post('/wd/hub/session/:sessionId?/appium/device/rotate', controller.mobileRotation);
|
||||
//rest.get('/wd/hub/session/:sessionId?/appium/device/current_activity', controller.getCurrentActivity);
|
||||
//rest.post('/wd/hub/session/:sessionId?/appium/device/install_app', controller.installApp);
|
||||
//rest.post('/wd/hub/session/:sessionId?/appium/device/remove_app', controller.removeApp);
|
||||
|
||||
@@ -55,7 +55,7 @@ export class FakeDriver extends BaseDriver {
|
||||
|
||||
constructor(
|
||||
opts = /** @type {import('@appium/types').InitialOpts} */ ({}),
|
||||
shouldValidateCaps = true
|
||||
shouldValidateCaps = true,
|
||||
) {
|
||||
super(opts, shouldValidateCaps);
|
||||
this.curContext = 'NATIVE_APP';
|
||||
@@ -113,7 +113,7 @@ export class FakeDriver extends BaseDriver {
|
||||
if (d.isUnique) {
|
||||
throw new errors.SessionNotCreatedError(
|
||||
'Cannot start session; another ' +
|
||||
'unique session is in progress that requires all resources'
|
||||
'unique session is in progress that requires all resources',
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@appium/fake-driver",
|
||||
"version": "5.2.9",
|
||||
"version": "5.2.11",
|
||||
"description": "Mock driver used internally by Appium for testing. Ignore",
|
||||
"keywords": [
|
||||
"automation",
|
||||
@@ -46,9 +46,9 @@
|
||||
"test:unit": "mocha --timeout 10s --slow 5s \"./test/unit/**/*.spec.js\""
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/bluebird": "3.5.40",
|
||||
"@types/bluebird": "3.5.42",
|
||||
"@xmldom/xmldom": "0.8.10",
|
||||
"asyncbox": "2.9.4",
|
||||
"asyncbox": "3.0.0",
|
||||
"bluebird": "3.7.2",
|
||||
"lodash": "4.17.21",
|
||||
"source-map-support": "0.5.21",
|
||||
|
||||
@@ -3,6 +3,24 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [3.1.27](https://github.com/appium/appium/compare/@appium/fake-plugin@3.1.26...@appium/fake-plugin@3.1.27) (2023-11-14)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **support:** update definitelytyped ([5ae8df3](https://github.com/appium/appium/commit/5ae8df3c36c7f03fbf3420087b532086f6742348))
|
||||
|
||||
|
||||
|
||||
## [3.1.26](https://github.com/appium/appium/compare/@appium/fake-plugin@3.1.25...@appium/fake-plugin@3.1.26) (2023-10-19)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **support:** update definitelytyped ([a306ce7](https://github.com/appium/appium/commit/a306ce741a806d21bc44f3b979803b8af5da99aa))
|
||||
|
||||
|
||||
|
||||
## [3.1.25](https://github.com/appium/appium/compare/@appium/fake-plugin@3.1.24...@appium/fake-plugin@3.1.25) (2023-10-18)
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@appium/fake-plugin",
|
||||
"version": "3.1.25",
|
||||
"version": "3.1.27",
|
||||
"description": "A fake Appium 2.0 plugin",
|
||||
"keywords": [
|
||||
"automation",
|
||||
@@ -39,9 +39,9 @@
|
||||
"test:unit": "mocha \"./test/unit/**/*.spec.js\""
|
||||
},
|
||||
"dependencies": {
|
||||
"@appium/base-plugin": "^2.2.21",
|
||||
"@appium/support": "^4.1.7",
|
||||
"@types/bluebird": "3.5.40",
|
||||
"@appium/base-plugin": "^2.2.23",
|
||||
"@appium/support": "^4.1.9",
|
||||
"@types/bluebird": "3.5.42",
|
||||
"bluebird": "3.7.2",
|
||||
"lodash": "4.17.21",
|
||||
"source-map-support": "0.5.21"
|
||||
|
||||
@@ -3,6 +3,23 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [2.1.7](https://github.com/appium/appium/compare/@appium/images-plugin@2.1.6...@appium/images-plugin@2.1.7) (2023-11-14)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **images-plugin:** Prevent repeatable template modification ([#19334](https://github.com/appium/appium/issues/19334)) ([63a0b05](https://github.com/appium/appium/commit/63a0b05e1b99d8879ac928ca91111d3c62745133))
|
||||
|
||||
|
||||
|
||||
## [2.1.6](https://github.com/appium/appium/compare/@appium/images-plugin@2.1.5...@appium/images-plugin@2.1.6) (2023-10-19)
|
||||
|
||||
**Note:** Version bump only for package @appium/images-plugin
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [2.1.5](https://github.com/appium/appium/compare/@appium/images-plugin@2.1.4...@appium/images-plugin@2.1.5) (2023-10-18)
|
||||
|
||||
|
||||
|
||||
@@ -3,6 +3,14 @@ import {errors} from 'appium/driver';
|
||||
import {getImagesMatches, getImagesSimilarity, getImageOccurrence} from '@appium/opencv';
|
||||
import {MATCH_FEATURES_MODE, GET_SIMILARITY_MODE, MATCH_TEMPLATE_MODE} from './constants';
|
||||
|
||||
/**
|
||||
* @typedef {{visualization: string|null|undefined}} Visualized
|
||||
* @typedef {import('@appium/opencv').MatchingResult & Visualized} MatchingResult
|
||||
* @typedef {import('@appium/opencv').OccurrenceResult & Visualized} OccurrenceResult
|
||||
* @typedef {import('@appium/opencv').SimilarityResult & Visualized} SimilarityResult
|
||||
* @typedef {MatchingResult|OccurrenceResult|SimilarityResult|SimilarityResult[]} ComparisonResult
|
||||
*/
|
||||
|
||||
/**
|
||||
* Performs images comparison using OpenCV framework features.
|
||||
* It is expected that both OpenCV framework and opencv4nodejs
|
||||
@@ -14,43 +22,48 @@ import {MATCH_FEATURES_MODE, GET_SIMILARITY_MODE, MATCH_TEMPLATE_MODE} from './c
|
||||
* All image formats, that OpenCV library itself accepts, are supported.
|
||||
* @param {string|Buffer} secondImage - Base64-encoded image file.
|
||||
* All image formats, that OpenCV library itself accepts, are supported.
|
||||
* @param {object} [options] - The content of this dictionary depends
|
||||
* @param {import('@appium/opencv').MatchingOptions
|
||||
* |import('@appium/opencv').SimilarityOptions
|
||||
* |import('@appium/opencv').OccurrenceOptions} [options={}] - The content of this dictionary depends
|
||||
* on the actual `mode` value. See the documentation on `@appium/support`
|
||||
* module for more details.
|
||||
* @returns {Promise<object|object[]>} The content of the resulting dictionary depends
|
||||
* @returns {Promise<ComparisonResult>} The content of the resulting dictionary depends
|
||||
* on the actual `mode` and `options` values. See the documentation on
|
||||
* `@appium/support` module for more details.
|
||||
* @throws {Error} If required OpenCV modules are not installed or
|
||||
* if `mode` value is incorrect or if there was an unexpected issue while
|
||||
* matching the images.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @type {import('@appium/types').PluginCommand<[string, string, string, object|undefined], Promise<OccurrenceResult>>}
|
||||
*/
|
||||
async function compareImages(mode, firstImage, secondImage, options = {}) {
|
||||
const img1 = Buffer.isBuffer(firstImage) ? firstImage : Buffer.from(firstImage, 'base64');
|
||||
const img2 = Buffer.isBuffer(secondImage) ? secondImage : Buffer.from(secondImage, 'base64');
|
||||
let result = null;
|
||||
let result;
|
||||
switch (_.toLower(mode)) {
|
||||
case MATCH_FEATURES_MODE.toLowerCase():
|
||||
try {
|
||||
result = await getImagesMatches(img1, img2, options);
|
||||
result = await getImagesMatches(
|
||||
img1, img2, /** @type {import('@appium/opencv').MatchingOptions} */(options)
|
||||
);
|
||||
} catch (err) {
|
||||
// might throw if no matches
|
||||
result = {count: 0};
|
||||
result = /** @type {import('@appium/opencv').MatchingResult} */({count: 0});
|
||||
}
|
||||
break;
|
||||
case GET_SIMILARITY_MODE.toLowerCase():
|
||||
result = await getImagesSimilarity(img1, img2, options);
|
||||
result = await getImagesSimilarity(
|
||||
img1, img2, /** @type {import('@appium/opencv').SimilarityOptions} */(options));
|
||||
break;
|
||||
case MATCH_TEMPLATE_MODE.toLowerCase():
|
||||
case MATCH_TEMPLATE_MODE.toLowerCase(): {
|
||||
const opts = /** @type {import('@appium/opencv').OccurrenceOptions} */(options);
|
||||
// firstImage/img1 is the full image and secondImage/img2 is the partial one
|
||||
result = await getImageOccurrence(img1, img2, options);
|
||||
if (options.multiple) {
|
||||
result = await getImageOccurrence(
|
||||
img1, img2, opts
|
||||
);
|
||||
if (opts.multiple) {
|
||||
return result.multiple.map(convertVisualizationToBase64);
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
throw new errors.InvalidArgumentError(
|
||||
`'${mode}' images comparison mode is unknown. ` +
|
||||
@@ -68,19 +81,16 @@ async function compareImages(mode, firstImage, secondImage, options = {}) {
|
||||
* base64 encodes the visualization part of the result
|
||||
* (if necessary)
|
||||
*
|
||||
* @param {OccurrenceResult} element - occurrence result
|
||||
*
|
||||
* @param {Partial<{visualization: Buffer|null}>} element - occurrence result
|
||||
* @returns {any} I know this looks ugly from the typing perspective
|
||||
**/
|
||||
function convertVisualizationToBase64(element) {
|
||||
if (!_.isEmpty(element.visualization)) {
|
||||
element.visualization = element.visualization.toString('base64');
|
||||
}
|
||||
|
||||
return element;
|
||||
return Buffer.isBuffer(element.visualization)
|
||||
? {
|
||||
...(element),
|
||||
visualization: element.visualization.toString('base64')
|
||||
}
|
||||
: element;
|
||||
}
|
||||
|
||||
export {compareImages};
|
||||
|
||||
/**
|
||||
* @typedef {import('@appium/opencv').OccurrenceResult} OccurrenceResult
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import _ from 'lodash';
|
||||
import { LRUCache } from 'lru-cache';
|
||||
import {LRUCache} from 'lru-cache';
|
||||
import {errors} from 'appium/driver';
|
||||
import {ImageElement} from './image-element';
|
||||
import {compareImages} from './compare';
|
||||
@@ -34,7 +34,7 @@ const CONDITION_UNMET_PATTERN = /Condition unmet/;
|
||||
|
||||
|
||||
export default class ImageElementFinder {
|
||||
/** @type {LRU<string,ImageElement>} */
|
||||
/** @type {LRUCache<string,ImageElement>} */
|
||||
_imgElCache;
|
||||
|
||||
/**
|
||||
@@ -78,7 +78,7 @@ export default class ImageElementFinder {
|
||||
* @property {boolean} [ignoreDefaultImageTemplateScale=false] - Whether we
|
||||
* ignore defaultImageTemplateScale. It can be used when you would like to
|
||||
* scale template with defaultImageTemplateScale setting.
|
||||
* @property {import('@appium/types').Rect?} containerRect - The bounding
|
||||
* @property {import('@appium/types').Rect?} [containerRect=null] - The bounding
|
||||
* rectangle to limit the search in
|
||||
*/
|
||||
|
||||
@@ -109,7 +109,7 @@ export default class ImageElementFinder {
|
||||
} = settings;
|
||||
|
||||
log.info(`Finding image element with match threshold ${threshold}`);
|
||||
if (!driver.getWindowRect && !driver.getWindowSize) {
|
||||
if (!driver.getWindowRect && !_.has(driver, 'getWindowSize')) {
|
||||
throw new Error("This driver does not support the required 'getWindowRect' command");
|
||||
}
|
||||
let screenSize;
|
||||
@@ -120,7 +120,7 @@ export default class ImageElementFinder {
|
||||
height: screenRect.height,
|
||||
};
|
||||
} else {
|
||||
// TODO: Drop the deprecated endpoint
|
||||
// @ts-ignore TODO: Drop the deprecated endpoint
|
||||
screenSize = await driver.getWindowSize();
|
||||
}
|
||||
|
||||
@@ -136,16 +136,23 @@ export default class ImageElementFinder {
|
||||
}
|
||||
|
||||
const results = [];
|
||||
const condition = async () => {
|
||||
let didFixTemplateImageScale = false;
|
||||
const performLookup = async () => {
|
||||
try {
|
||||
|
||||
const {screenshot, scale} = await this.getScreenshotForImageFind(driver, screenSize);
|
||||
|
||||
template = await this.fixImageTemplateScale(template, {
|
||||
defaultImageTemplateScale,
|
||||
ignoreDefaultImageTemplateScale,
|
||||
fixImageTemplateScale,
|
||||
...scale,
|
||||
});
|
||||
if (!didFixTemplateImageScale) {
|
||||
template = await this.fixImageTemplateScale(template, {
|
||||
defaultImageTemplateScale,
|
||||
ignoreDefaultImageTemplateScale,
|
||||
fixImageTemplateScale,
|
||||
...(scale || {}),
|
||||
});
|
||||
// We do not want `template` to be mutated multiple times when the
|
||||
// wrapping lambda is retried
|
||||
didFixTemplateImageScale = true;
|
||||
}
|
||||
|
||||
const comparisonOpts = {
|
||||
threshold,
|
||||
@@ -168,7 +175,9 @@ export default class ImageElementFinder {
|
||||
return true;
|
||||
};
|
||||
|
||||
const elOrEls = await compareImages(MATCH_TEMPLATE_MODE, screenshot, template, comparisonOpts);
|
||||
const elOrEls = await compareImages(
|
||||
MATCH_TEMPLATE_MODE, screenshot, template, comparisonOpts
|
||||
);
|
||||
return _.some((_.isArray(elOrEls) ? elOrEls : [elOrEls]).map(pushIfOk));
|
||||
} catch (err) {
|
||||
// if compareImages fails, we'll get a specific error, but we should
|
||||
@@ -183,7 +192,7 @@ export default class ImageElementFinder {
|
||||
};
|
||||
|
||||
try {
|
||||
await driver.implicitWaitForCondition(condition);
|
||||
await driver.implicitWaitForCondition(performLookup);
|
||||
} catch (err) {
|
||||
// this `implicitWaitForCondition` method will throw a 'Condition unmet'
|
||||
// error if an element is not found eventually. In that case, we will
|
||||
@@ -238,6 +247,9 @@ export default class ImageElementFinder {
|
||||
async ensureTemplateSize(template, maxSize) {
|
||||
const imgObj = sharp(template);
|
||||
const {width: tplWidth, height: tplHeight} = await imgObj.metadata();
|
||||
if (_.isNil(tplWidth) || _.isNil(tplHeight)) {
|
||||
throw new Error(`Template width/height cannot be determined. Is it a valid image?`);
|
||||
}
|
||||
|
||||
log.info(
|
||||
`Template image is ${tplWidth}x${tplHeight}. Bounding rectangle size is ${maxSize.width}x${maxSize.height}`
|
||||
@@ -254,8 +266,8 @@ export default class ImageElementFinder {
|
||||
// otherwise, scale it to fit inside the bounding rectangle dimensions:
|
||||
// https://sharp.pixelplumbing.com/api-resize
|
||||
return await imgObj.resize({
|
||||
width: parseInt(maxSize.width, 10),
|
||||
height: parseInt(maxSize.height, 10),
|
||||
width: Math.trunc(maxSize.width),
|
||||
height: Math.trunc(maxSize.height),
|
||||
fit: 'inside',
|
||||
})
|
||||
.toBuffer();
|
||||
@@ -301,7 +313,7 @@ export default class ImageElementFinder {
|
||||
let imgObj = sharp(screenshot);
|
||||
let {width: shotWidth, height: shotHeight} = await imgObj.metadata();
|
||||
|
||||
if (shotWidth < 1 || shotHeight < 1) {
|
||||
if (!shotWidth || shotWidth < 1 || !shotHeight || shotHeight < 1) {
|
||||
log.warn(
|
||||
`The retrieved screenshot size ${shotWidth}x${shotHeight} does ` +
|
||||
`not seem to be valid. No changes will be applied to the screenshot`
|
||||
@@ -354,7 +366,7 @@ export default class ImageElementFinder {
|
||||
const yScale = (1.0 * shotHeight) / screenSize.height;
|
||||
const scaleFactor = Math.min(xScale, yScale);
|
||||
const [newWidth, newHeight] = [shotWidth * scaleFactor, shotHeight * scaleFactor]
|
||||
.map((x) => parseInt(x, 10));
|
||||
.map(Math.trunc);
|
||||
|
||||
log.warn(
|
||||
`Resizing screenshot to ${newWidth}x${newHeight} to match ` +
|
||||
@@ -382,8 +394,8 @@ export default class ImageElementFinder {
|
||||
`screen at ${screenSize.width}x${screenSize.height}`
|
||||
);
|
||||
imgObj = imgObj.resize({
|
||||
width: parseInt(screenSize.width, 10),
|
||||
height: parseInt(screenSize.height, 10),
|
||||
width: Math.trunc(screenSize.width),
|
||||
height: Math.trunc(screenSize.height),
|
||||
fit: 'fill',
|
||||
});
|
||||
|
||||
@@ -399,13 +411,13 @@ export default class ImageElementFinder {
|
||||
|
||||
/**
|
||||
* @typedef ImageTemplateSettings
|
||||
* @property {boolean} fixImageTemplateScale - fixImageTemplateScale in device-settings
|
||||
* @property {number} defaultImageTemplateScale - defaultImageTemplateScale in device-settings
|
||||
* @property {boolean} ignoreDefaultImageTemplateScale - Ignore defaultImageTemplateScale if it has true.
|
||||
* @property {boolean} [fixImageTemplateScale=false] - fixImageTemplateScale in device-settings
|
||||
* @property {number} [defaultImageTemplateScale=DEFAULT_TEMPLATE_IMAGE_SCALE] - defaultImageTemplateScale in device-settings
|
||||
* @property {boolean} [ignoreDefaultImageTemplateScale=false] - Ignore defaultImageTemplateScale if it has true.
|
||||
* If the template has been scaled to defaultImageTemplateScale or should ignore the scale,
|
||||
* this parameter should be true. e.g. click in image-element module
|
||||
* @property {number} xScale - Scale ratio for width
|
||||
* @property {number} yScale - Scale ratio for height
|
||||
* @property {number} [xScale=DEFAULT_FIX_IMAGE_TEMPLATE_SCALE] - Scale ratio for width
|
||||
* @property {number} [yScale=DEFAULT_FIX_IMAGE_TEMPLATE_SCALE] - Scale ratio for height
|
||||
|
||||
*/
|
||||
/**
|
||||
@@ -469,6 +481,9 @@ export default class ImageElementFinder {
|
||||
|
||||
let imgObj = sharp(template);
|
||||
const {width: baseTempWidth, height: baseTempHeigh} = await imgObj.metadata();
|
||||
if (_.isNil(baseTempWidth) || _.isNil(baseTempHeigh)) {
|
||||
throw new Error(`Template width/height cannot be determined. Is it a valid image?`);
|
||||
}
|
||||
|
||||
const scaledWidth = baseTempWidth * xScale;
|
||||
const scaledHeight = baseTempHeigh * yScale;
|
||||
@@ -477,8 +492,8 @@ export default class ImageElementFinder {
|
||||
);
|
||||
log.info(`The ratio is ${xScale} and ${yScale}`);
|
||||
imgObj = imgObj.resize({
|
||||
width: parseInt(scaledWidth, 10),
|
||||
height: parseInt(scaledHeight, 10),
|
||||
width: Math.trunc(scaledWidth),
|
||||
height: Math.trunc(scaledHeight),
|
||||
fit: 'fill',
|
||||
});
|
||||
return await imgObj.toBuffer();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import _ from 'lodash';
|
||||
import {errors} from 'appium/driver';
|
||||
import {util} from 'appium/support';
|
||||
import {util} from '@appium/support';
|
||||
import log from './logger';
|
||||
import {
|
||||
IMAGE_STRATEGY, DEFAULT_SETTINGS, IMAGE_TAP_STRATEGIES,
|
||||
@@ -39,7 +39,7 @@ const TAP_DURATION_MS = 125;
|
||||
*/
|
||||
export default class ImageElement {
|
||||
/**
|
||||
* @param {ImageElementOpts}
|
||||
* @param {ImageElementOpts} options
|
||||
*/
|
||||
constructor({
|
||||
template,
|
||||
@@ -123,12 +123,11 @@ export default class ImageElement {
|
||||
* Use a driver to tap the screen at the center of this ImageElement's
|
||||
* position
|
||||
*
|
||||
* @param {BaseDriver} driver - driver for calling actions with
|
||||
* @param {import('appium/driver').BaseDriver} driver - driver for calling actions with
|
||||
*/
|
||||
async click(driver) {
|
||||
// before we click we need to make sure the element is actually still there
|
||||
// where we expect it to be
|
||||
let newImgEl;
|
||||
const settings = Object.assign({}, DEFAULT_SETTINGS, driver.settings.getSettings());
|
||||
const {
|
||||
autoUpdateImageElementPosition: updatePos,
|
||||
@@ -145,16 +144,19 @@ export default class ImageElement {
|
||||
);
|
||||
}
|
||||
|
||||
let newImgEl;
|
||||
if (checkForImageElementStaleness || updatePos) {
|
||||
log.info('Checking image element for staleness before clicking');
|
||||
try {
|
||||
newImgEl = await this.finder.findByImage(this.template, driver, {
|
||||
shouldCheckStaleness: true,
|
||||
// Set ignoreDefaultImageTemplateScale because this.template is device screenshot based image
|
||||
// managed inside Appium after finidng image by template which managed by a user
|
||||
ignoreDefaultImageTemplateScale: true,
|
||||
containerRect: this.containerRect,
|
||||
});
|
||||
newImgEl = /** @type {ImageElement} */ (await (/** @type {import('./finder').default} */ (this.finder))
|
||||
.findByImage(
|
||||
this.template, driver, {
|
||||
shouldCheckStaleness: true,
|
||||
// Set ignoreDefaultImageTemplateScale because this.template is device screenshot based image
|
||||
// managed inside Appium after finidng image by template which managed by a user
|
||||
ignoreDefaultImageTemplateScale: true,
|
||||
containerRect: this.containerRect,
|
||||
}));
|
||||
} catch (err) {
|
||||
throw new errors.StaleElementReferenceError();
|
||||
}
|
||||
@@ -199,7 +201,7 @@ export default class ImageElement {
|
||||
};
|
||||
|
||||
// check if the driver has the appropriate performActions method
|
||||
if (driver.performActions) {
|
||||
if ('performActions' in driver && _.isFunction(driver.performActions)) {
|
||||
return await driver.performActions([action]);
|
||||
}
|
||||
|
||||
@@ -215,7 +217,7 @@ export default class ImageElement {
|
||||
options: {x, y},
|
||||
};
|
||||
|
||||
if (driver.performTouch) {
|
||||
if ('performTouch' in driver && _.isFunction(driver.performTouch)) {
|
||||
return await driver.performTouch([action]);
|
||||
}
|
||||
|
||||
@@ -239,7 +241,7 @@ export default class ImageElement {
|
||||
if (strategy !== IMAGE_STRATEGY) {
|
||||
throw new errors.InvalidSelectorError(`Lookup strategies other than '${IMAGE_STRATEGY}' are not supported`);
|
||||
}
|
||||
return await this.finder.findByImage(
|
||||
return await (/** @type {import('./finder').default} */ (this.finder)).findByImage(
|
||||
Buffer.from(selector, 'base64'),
|
||||
driver,
|
||||
{multiple, containerRect: this.rect}
|
||||
@@ -251,10 +253,10 @@ export default class ImageElement {
|
||||
*
|
||||
* @param {import('appium/driver').BaseDriver} driver - the driver to use for commands
|
||||
* @param {string} cmd - the name of the driver command
|
||||
* @param {string} imgElId - the id of the ImageElement to work with
|
||||
* @param {any} imgEl - image element object
|
||||
* @param {string[]} args - Rest of arguments for executeScripts
|
||||
*
|
||||
* @returns {object} - the result of running a command
|
||||
* @returns {Promise<any>} - the result of running a command
|
||||
*/
|
||||
static async execute(driver, imgEl, cmd, ...args) {
|
||||
switch (cmd) {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import _ from 'lodash';
|
||||
import {errors} from 'appium/driver';
|
||||
import BasePlugin from 'appium/plugin';
|
||||
import {BasePlugin} from 'appium/plugin';
|
||||
import {compareImages} from './compare';
|
||||
import ImageElementFinder from './finder';
|
||||
import {ImageElement} from './image-element';
|
||||
@@ -33,6 +33,7 @@ export default class ImageElementPlugin extends BasePlugin {
|
||||
});
|
||||
|
||||
async compareImages(next, driver, ...args) {
|
||||
// @ts-ignore Arguments should be ok there
|
||||
return await compareImages(...args);
|
||||
}
|
||||
|
||||
@@ -44,6 +45,14 @@ export default class ImageElementPlugin extends BasePlugin {
|
||||
return await this._find(true, next, driver, ...args);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {boolean} multiple
|
||||
* @param {*} next
|
||||
* @param {*} driver
|
||||
* @param {...any} args
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
async _find(multiple, next, driver, ...args) {
|
||||
const [strategy, selector] = args;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@appium/images-plugin",
|
||||
"version": "2.1.5",
|
||||
"version": "2.1.7",
|
||||
"description": "Plugin for working with images and image elements in Appium",
|
||||
"keywords": [
|
||||
"automation",
|
||||
@@ -39,14 +39,15 @@
|
||||
"test:unit": "mocha \"./test/unit/**/*.spec.js\""
|
||||
},
|
||||
"dependencies": {
|
||||
"@appium/opencv": "^2.1.4",
|
||||
"@appium/opencv": "^2.1.6",
|
||||
"@appium/support": "^4.1.9",
|
||||
"lodash": "4.17.21",
|
||||
"lru-cache": "10.0.1",
|
||||
"sharp": "0.32.6",
|
||||
"source-map-support": "0.5.21"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"appium": "^2.0.0-beta.35"
|
||||
"appium": "^2.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^14.17.0 || ^16.13.0 || >=18.0.0",
|
||||
|
||||
@@ -73,7 +73,8 @@ describe('finding elements by image', function () {
|
||||
y: 0,
|
||||
...size,
|
||||
});
|
||||
const screenStub = sandbox.stub(finder, 'getScreenshotForImageFind').returns(screenshot);
|
||||
const screenStub = sandbox.stub(finder, 'getScreenshotForImageFind')
|
||||
.returns({screenshot});
|
||||
return {rectStub, screenStub};
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"outDir": "build",
|
||||
"checkJs": true,
|
||||
"esModuleInterop": true,
|
||||
"strict": false,
|
||||
"paths": {
|
||||
"@appium/opencv": ["../opencv"]
|
||||
}
|
||||
|
||||
@@ -3,6 +3,24 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [2.1.6](https://github.com/appium/appium/compare/@appium/opencv@2.1.5...@appium/opencv@2.1.6) (2023-11-14)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **support:** update definitelytyped ([5ae8df3](https://github.com/appium/appium/commit/5ae8df3c36c7f03fbf3420087b532086f6742348))
|
||||
|
||||
|
||||
|
||||
## [2.1.5](https://github.com/appium/appium/compare/@appium/opencv@2.1.4...@appium/opencv@2.1.5) (2023-10-19)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **support:** update definitelytyped ([a306ce7](https://github.com/appium/appium/commit/a306ce741a806d21bc44f3b979803b8af5da99aa))
|
||||
|
||||
|
||||
|
||||
## [2.1.4](https://github.com/appium/appium/compare/@appium/opencv@2.1.3...@appium/opencv@2.1.4) (2023-10-18)
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@appium/opencv",
|
||||
"version": "2.1.4",
|
||||
"version": "2.1.6",
|
||||
"description": "OpenCV-related helper library",
|
||||
"keywords": [
|
||||
"automation",
|
||||
@@ -41,7 +41,7 @@
|
||||
"test:unit": "mocha \"./test/unit/**/*.spec.js\""
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/bluebird": "3.5.40",
|
||||
"@types/bluebird": "3.5.42",
|
||||
"bluebird": "3.7.2",
|
||||
"lodash": "4.17.21",
|
||||
"opencv-bindings": "4.5.5",
|
||||
|
||||
@@ -3,6 +3,32 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [0.3.24](https://github.com/appium/appium/compare/@appium/plugin-test-support@0.3.23...@appium/plugin-test-support@0.3.24) (2023-11-14)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **support:** update dependency teen_process to v2.0.57 ([1fbd503](https://github.com/appium/appium/commit/1fbd503a66b965a9b32bbb6702062861a8480333))
|
||||
* **support:** update dependency teen_process to v2.0.63 ([fa57192](https://github.com/appium/appium/commit/fa571925b7ac980cc99c8d23f659420eacd8546c))
|
||||
* **support:** update dependency teen_process to v2.0.64 ([332bb59](https://github.com/appium/appium/commit/332bb59ee3fdd14c03f6b3c4fd6587a30319d568))
|
||||
* **support:** update dependency teen_process to v2.0.66 ([3205b5d](https://github.com/appium/appium/commit/3205b5d06f073f1e5c7735c6e36ad08fdf091182))
|
||||
* **support:** update dependency teen_process to v2.0.67 ([3b5ae2a](https://github.com/appium/appium/commit/3b5ae2ab17c74c9890b53c081aec146152f11c7a))
|
||||
* **support:** update dependency teen_process to v2.0.73 ([8e453be](https://github.com/appium/appium/commit/8e453bed3f440c1dcf82f016f7d4431365b9cdff))
|
||||
* **support:** update dependency teen_process to v2.0.75 ([fbb6fd9](https://github.com/appium/appium/commit/fbb6fd9a2780eb00c15584abeaf644a1fcdecb4d))
|
||||
* **support:** update teen_process-related packages ([84d96db](https://github.com/appium/appium/commit/84d96dbae45dfe56218d32330f8ff2d26b750fb7))
|
||||
* **support:** update teen_process-related packages ([3d0b97c](https://github.com/appium/appium/commit/3d0b97cae76c616da0aea5b92cebcd38d59263b7))
|
||||
|
||||
|
||||
|
||||
## [0.3.23](https://github.com/appium/appium/compare/@appium/plugin-test-support@0.3.22...@appium/plugin-test-support@0.3.23) (2023-10-19)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **appium:** Make sure type definitions are always in sync across modules ([#19323](https://github.com/appium/appium/issues/19323)) ([de39013](https://github.com/appium/appium/commit/de39013ae501d4fc11988435737efb862cc1d820))
|
||||
|
||||
|
||||
|
||||
## [0.3.22](https://github.com/appium/appium/compare/@appium/plugin-test-support@0.3.21...@appium/plugin-test-support@0.3.22) (2023-10-18)
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@appium/plugin-test-support",
|
||||
"version": "0.3.22",
|
||||
"version": "0.3.24",
|
||||
"description": "Testing utilities for Appium plugins",
|
||||
"keywords": [
|
||||
"automation",
|
||||
@@ -41,11 +41,11 @@
|
||||
"test:unit": "exit 0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@appium/types": "^0.14.0",
|
||||
"@appium/types": "^0.14.2",
|
||||
"get-port": "5.1.1",
|
||||
"log-symbols": "4.1.0",
|
||||
"source-map-support": "0.5.21",
|
||||
"teen_process": "2.0.50"
|
||||
"teen_process": "2.0.84"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"appium": "^2.0.0-beta.43",
|
||||
|
||||
@@ -3,6 +3,24 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [0.4.2](https://github.com/appium/appium/compare/@appium/schema@0.4.1...@appium/schema@0.4.2) (2023-11-14)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **support:** update definitelytyped ([5ae8df3](https://github.com/appium/appium/commit/5ae8df3c36c7f03fbf3420087b532086f6742348))
|
||||
|
||||
|
||||
|
||||
## [0.4.1](https://github.com/appium/appium/compare/@appium/schema@0.4.0...@appium/schema@0.4.1) (2023-10-19)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **support:** update definitelytyped ([a306ce7](https://github.com/appium/appium/commit/a306ce741a806d21bc44f3b979803b8af5da99aa))
|
||||
|
||||
|
||||
|
||||
## [0.4.0](https://github.com/appium/appium/compare/@appium/schema@0.3.1...@appium/schema@0.4.0) (2023-10-18)
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@appium/schema",
|
||||
"version": "0.4.0",
|
||||
"version": "0.4.2",
|
||||
"description": "Appium Configuration Schema",
|
||||
"keywords": [
|
||||
"automation",
|
||||
@@ -38,7 +38,7 @@
|
||||
"test": "exit 0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/json-schema": "7.0.13",
|
||||
"@types/json-schema": "7.0.15",
|
||||
"json-schema": "0.4.0",
|
||||
"source-map-support": "0.5.21"
|
||||
},
|
||||
|
||||
@@ -3,6 +3,38 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [4.1.9](https://github.com/appium/appium/compare/@appium/support@4.1.8...@appium/support@4.1.9) (2023-11-14)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **images-plugin:** Prevent repeatable template modification ([#19334](https://github.com/appium/appium/issues/19334)) ([63a0b05](https://github.com/appium/appium/commit/63a0b05e1b99d8879ac928ca91111d3c62745133))
|
||||
* **support:** update definitelytyped ([5ae8df3](https://github.com/appium/appium/commit/5ae8df3c36c7f03fbf3420087b532086f6742348))
|
||||
* **support:** update definitelytyped ([#19326](https://github.com/appium/appium/issues/19326)) ([9840315](https://github.com/appium/appium/commit/98403151f86665d723bf887e907825bbc4cc2d3d))
|
||||
* **support:** update dependency axios to v1.6.0 ([699c493](https://github.com/appium/appium/commit/699c49306c38e222d618a9611482b06a3e6806aa))
|
||||
* **support:** update dependency axios to v1.6.1 ([9b14205](https://github.com/appium/appium/commit/9b14205288ef09fd4a1144fc93c82b2bb2ed2ec0))
|
||||
* **support:** update dependency teen_process to v2.0.57 ([1fbd503](https://github.com/appium/appium/commit/1fbd503a66b965a9b32bbb6702062861a8480333))
|
||||
* **support:** update dependency teen_process to v2.0.63 ([fa57192](https://github.com/appium/appium/commit/fa571925b7ac980cc99c8d23f659420eacd8546c))
|
||||
* **support:** update dependency teen_process to v2.0.64 ([332bb59](https://github.com/appium/appium/commit/332bb59ee3fdd14c03f6b3c4fd6587a30319d568))
|
||||
* **support:** update dependency teen_process to v2.0.66 ([3205b5d](https://github.com/appium/appium/commit/3205b5d06f073f1e5c7735c6e36ad08fdf091182))
|
||||
* **support:** update dependency teen_process to v2.0.67 ([3b5ae2a](https://github.com/appium/appium/commit/3b5ae2ab17c74c9890b53c081aec146152f11c7a))
|
||||
* **support:** update dependency teen_process to v2.0.73 ([8e453be](https://github.com/appium/appium/commit/8e453bed3f440c1dcf82f016f7d4431365b9cdff))
|
||||
* **support:** update dependency teen_process to v2.0.75 ([fbb6fd9](https://github.com/appium/appium/commit/fbb6fd9a2780eb00c15584abeaf644a1fcdecb4d))
|
||||
* **support:** update teen_process-related packages ([84d96db](https://github.com/appium/appium/commit/84d96dbae45dfe56218d32330f8ff2d26b750fb7))
|
||||
* **support:** update teen_process-related packages ([3d0b97c](https://github.com/appium/appium/commit/3d0b97cae76c616da0aea5b92cebcd38d59263b7))
|
||||
|
||||
|
||||
|
||||
## [4.1.8](https://github.com/appium/appium/compare/@appium/support@4.1.7...@appium/support@4.1.8) (2023-10-19)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **appium:** Make sure type definitions are always in sync across modules ([#19323](https://github.com/appium/appium/issues/19323)) ([de39013](https://github.com/appium/appium/commit/de39013ae501d4fc11988435737efb862cc1d820))
|
||||
* **support:** update definitelytyped ([a306ce7](https://github.com/appium/appium/commit/a306ce741a806d21bc44f3b979803b8af5da99aa))
|
||||
|
||||
|
||||
|
||||
## [4.1.7](https://github.com/appium/appium/compare/@appium/support@4.1.6...@appium/support@4.1.7) (2023-10-18)
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@appium/support",
|
||||
"version": "4.1.7",
|
||||
"version": "4.1.9",
|
||||
"description": "Support libs used across appium packages",
|
||||
"keywords": [
|
||||
"automation",
|
||||
@@ -41,27 +41,27 @@
|
||||
"test:unit": "mocha \"./test/unit/**/*.spec.js\""
|
||||
},
|
||||
"dependencies": {
|
||||
"@appium/tsconfig": "^0.3.2",
|
||||
"@appium/types": "^0.14.0",
|
||||
"@appium/tsconfig": "^0.x",
|
||||
"@appium/types": "^0.14.2",
|
||||
"@colors/colors": "1.6.0",
|
||||
"@types/archiver": "5.3.3",
|
||||
"@types/base64-stream": "1.0.3",
|
||||
"@types/find-root": "1.1.2",
|
||||
"@types/jsftp": "2.1.3",
|
||||
"@types/klaw": "3.0.4",
|
||||
"@types/lockfile": "1.0.2",
|
||||
"@types/mv": "2.1.2",
|
||||
"@types/ncp": "2.0.6",
|
||||
"@types/npmlog": "4.1.4",
|
||||
"@types/pluralize": "0.0.31",
|
||||
"@types/semver": "7.5.3",
|
||||
"@types/shell-quote": "1.7.2",
|
||||
"@types/supports-color": "8.1.1",
|
||||
"@types/teen_process": "2.0.1",
|
||||
"@types/uuid": "9.0.5",
|
||||
"@types/which": "3.0.0",
|
||||
"@types/archiver": "6.0.1",
|
||||
"@types/base64-stream": "1.0.5",
|
||||
"@types/find-root": "1.1.4",
|
||||
"@types/jsftp": "2.1.5",
|
||||
"@types/klaw": "3.0.6",
|
||||
"@types/lockfile": "1.0.4",
|
||||
"@types/mv": "2.1.4",
|
||||
"@types/ncp": "2.0.8",
|
||||
"@types/npmlog": "4.1.6",
|
||||
"@types/pluralize": "0.0.33",
|
||||
"@types/semver": "7.5.5",
|
||||
"@types/shell-quote": "1.7.4",
|
||||
"@types/supports-color": "8.1.3",
|
||||
"@types/teen_process": "2.0.3",
|
||||
"@types/uuid": "9.0.7",
|
||||
"@types/which": "3.0.1",
|
||||
"archiver": "6.0.1",
|
||||
"axios": "1.5.1",
|
||||
"axios": "1.6.1",
|
||||
"base64-stream": "1.0.0",
|
||||
"bluebird": "3.7.2",
|
||||
"bplist-creator": "0.1.1",
|
||||
@@ -89,7 +89,7 @@
|
||||
"shell-quote": "1.8.1",
|
||||
"source-map-support": "0.5.21",
|
||||
"supports-color": "8.1.1",
|
||||
"teen_process": "2.0.50",
|
||||
"teen_process": "2.0.84",
|
||||
"type-fest": "3.13.1",
|
||||
"uuid": "9.0.1",
|
||||
"which": "4.0.0",
|
||||
|
||||
@@ -3,6 +3,23 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [3.0.27](https://github.com/appium/appium/compare/@appium/test-support@3.0.26...@appium/test-support@3.0.27) (2023-11-14)
|
||||
|
||||
**Note:** Version bump only for package @appium/test-support
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [3.0.26](https://github.com/appium/appium/compare/@appium/test-support@3.0.25...@appium/test-support@3.0.26) (2023-10-19)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **test-support:** update dependency sinon to v16.1.3 ([aaa7668](https://github.com/appium/appium/commit/aaa7668ae6d58f1ac6a5af957b9b214ee71c6a48))
|
||||
|
||||
|
||||
|
||||
## [3.0.25](https://github.com/appium/appium/compare/@appium/test-support@3.0.24...@appium/test-support@3.0.25) (2023-10-18)
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@appium/test-support",
|
||||
"version": "3.0.25",
|
||||
"version": "3.0.27",
|
||||
"description": "A collection of test utilities used across Appium packages",
|
||||
"keywords": [
|
||||
"automation",
|
||||
@@ -45,12 +45,12 @@
|
||||
"test:unit": "mocha \"./test/unit/**/*.spec.js\""
|
||||
},
|
||||
"dependencies": {
|
||||
"@appium/support": "^4.1.7",
|
||||
"@appium/support": "^4.1.9",
|
||||
"@colors/colors": "1.6.0",
|
||||
"bluebird": "3.7.2",
|
||||
"lodash": "4.17.21",
|
||||
"loud-rejection": "2.2.0",
|
||||
"sinon": "16.1.0",
|
||||
"sinon": "16.1.3",
|
||||
"source-map-support": "0.5.21"
|
||||
},
|
||||
"engines": {
|
||||
|
||||
@@ -3,6 +3,25 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [0.14.2](https://github.com/appium/appium/compare/@appium/types@0.14.1...@appium/types@0.14.2) (2023-11-14)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **support:** update definitelytyped ([5ae8df3](https://github.com/appium/appium/commit/5ae8df3c36c7f03fbf3420087b532086f6742348))
|
||||
|
||||
|
||||
|
||||
## [0.14.1](https://github.com/appium/appium/compare/@appium/types@0.14.0...@appium/types@0.14.1) (2023-10-19)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **appium:** Make sure type definitions are always in sync across modules ([#19323](https://github.com/appium/appium/issues/19323)) ([de39013](https://github.com/appium/appium/commit/de39013ae501d4fc11988435737efb862cc1d820))
|
||||
* **support:** update definitelytyped ([a306ce7](https://github.com/appium/appium/commit/a306ce741a806d21bc44f3b979803b8af5da99aa))
|
||||
|
||||
|
||||
|
||||
## [0.14.0](https://github.com/appium/appium/compare/@appium/types@0.13.4...@appium/types@0.14.0) (2023-10-18)
|
||||
|
||||
|
||||
|
||||
@@ -1359,29 +1359,6 @@ export interface ExternalDriver<
|
||||
*/
|
||||
keyevent?(keycode: string | number, metastate?: string | number): Promise<void>;
|
||||
|
||||
/**
|
||||
* Construct a rotation gesture? Unclear what this command does and it does not appear to be used
|
||||
*
|
||||
* @param x - the x coordinate of the rotation center
|
||||
* @param y - the y coordinate of the rotation center
|
||||
* @param radius - the radius of the rotation circle
|
||||
* @param rotation - the rotation angle? idk
|
||||
* @param touchCount - how many fingers to rotate
|
||||
* @param elementId - if we're rotating around an element
|
||||
*
|
||||
* @deprecated Use setRotation instead
|
||||
* @privateRemarks Not implemented in `appium-xcuitest-driver`
|
||||
*/
|
||||
mobileRotation?(
|
||||
x: number,
|
||||
y: number,
|
||||
radius: number,
|
||||
rotation: number,
|
||||
touchCount: number,
|
||||
duration: string,
|
||||
elementId?: string
|
||||
): Promise<void>;
|
||||
|
||||
/**
|
||||
* Get the current activity name
|
||||
*
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@appium/types",
|
||||
"version": "0.14.0",
|
||||
"version": "0.14.2",
|
||||
"description": "Various type declarations used across Appium",
|
||||
"keywords": [
|
||||
"automation",
|
||||
@@ -38,11 +38,11 @@
|
||||
"test:types": "tsd"
|
||||
},
|
||||
"dependencies": {
|
||||
"@appium/schema": "^0.4.0",
|
||||
"@appium/tsconfig": "^0.3.2",
|
||||
"@types/express": "4.17.19",
|
||||
"@types/npmlog": "4.1.4",
|
||||
"@types/ws": "8.5.7",
|
||||
"@appium/schema": "^0.4.2",
|
||||
"@appium/tsconfig": "^0.x",
|
||||
"@types/express": "4.17.21",
|
||||
"@types/npmlog": "4.1.6",
|
||||
"@types/ws": "8.5.9",
|
||||
"type-fest": "3.13.1"
|
||||
},
|
||||
"engines": {
|
||||
|
||||
@@ -3,6 +3,24 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.0.15](https://github.com/appium/appium-plugins/compare/@appium/universal-xml-plugin@1.0.14...@appium/universal-xml-plugin@1.0.15) (2023-11-14)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **support:** update definitelytyped ([5ae8df3](https://github.com/appium/appium-plugins/commit/5ae8df3c36c7f03fbf3420087b532086f6742348))
|
||||
|
||||
|
||||
|
||||
## [1.0.14](https://github.com/appium/appium-plugins/compare/@appium/universal-xml-plugin@1.0.13...@appium/universal-xml-plugin@1.0.14) (2023-10-19)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **support:** update definitelytyped ([a306ce7](https://github.com/appium/appium-plugins/commit/a306ce741a806d21bc44f3b979803b8af5da99aa))
|
||||
|
||||
|
||||
|
||||
## [1.0.13](https://github.com/appium/appium-plugins/compare/@appium/universal-xml-plugin@1.0.12...@appium/universal-xml-plugin@1.0.13) (2023-10-18)
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@appium/universal-xml-plugin",
|
||||
"version": "1.0.13",
|
||||
"version": "1.0.15",
|
||||
"description": "Appium plugin for making XML source and XPath queries the same across iOS and Android",
|
||||
"keywords": [
|
||||
"automation",
|
||||
@@ -36,7 +36,7 @@
|
||||
"test:unit": "mocha \"./test/unit/**/*.spec.js\""
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/xmldom": "0.1.32",
|
||||
"@types/xmldom": "0.1.34",
|
||||
"@xmldom/xmldom": "0.8.10",
|
||||
"fast-xml-parser": "4.3.2",
|
||||
"lodash": "4.17.21",
|
||||
|
||||
Reference in New Issue
Block a user