Compare commits

...
Author SHA1 Message Date
Jonathan Lipps 122a1863de chore: publish
- appium@2.11.5
 - @appium/base-driver@9.11.5
 - @appium/base-plugin@2.2.45
 - @appium/docutils@1.0.21
 - @appium/driver-test-support@0.6.9
 - @appium/execute-driver-plugin@3.0.35
 - @appium/fake-driver@5.5.4
 - @appium/fake-plugin@3.1.49
 - @appium/test-support@3.0.49
 - @appium/universal-xml-plugin@1.0.23
2024-09-26 09:27:56 -07:00
renovate[bot] 0bbd2f8a76 chore(docutils): update dependency mkdocs-material to v9.5.38 2024-09-26 12:27:38 +00:00
renovate[bot] f03816cca5 chore(deps): update dependency @types/node to v20.16.9 2024-09-26 11:24:46 +00:00
renovate[bot] e1e478cf32 chore(docutils): update dependency mkdocs-material to v9.5.37 2024-09-25 14:09:43 +00:00
renovate[bot] c799629b7d chore(deps): update definitelytyped (#20611)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-25 17:07:46 +03:00
renovate[bot] 1d9821352a chore(deps): update definitelytyped 2024-09-25 11:35:20 +00:00
zhangxh075 b8b0e42f69 docs: translate some documents into Chinese (#20608)
* Finish the translation of the requirements.md file

* Finish the translation of the test-rb.md file

* Finish the translation of the test-dotnet.md file

* Translate the missing parts in test-rb.md
2024-09-25 10:18:00 +03:00
renovate[bot] 6a8f26a9cb fix(test-support): update dependency sinon to v19 (#20576) 2024-09-24 10:05:13 +02:00
renovate[bot] e65c1cdaed fix(docutils): update dependency typescript to v5.6.2 (#20556) 2024-09-24 09:45:44 +02:00
renovate[bot] da7a4fdce8 fix(driver-test-support): update definitelytyped (#20605)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-24 09:39:30 +02:00
renovate[bot] f344504f15 fix(universal-xml-plugin): update dependency @xmldom/xmldom to v0.9.3 (#20599)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-24 09:25:47 +02:00
Mykola Mokhnach f0de55da0d fix(appium): Return hostname as web socket url for BiDi if a broadcast address is assigned to the server (#20603) 2024-09-24 08:40:04 +02:00
renovate[bot] 6704491be0 chore(docutils): update dependency mkdocs-material to v9.5.36 2024-09-21 13:35:40 +00:00
Edgars Eglītis 2a68d05b4d docs: remove AppiumConf banner (#20596) 2024-09-20 09:44:34 +03:00
Edgars Eglītis 5553016582 fix(execute-driver-plugin): replace vm2 with Node's built-in vm (#20594)
* fix: replace unsafe package vm2 with Node's vm

* chore: use node: prefix
2024-09-20 08:43:26 +03:00
Edgars Eglītis 9879d9f9b8 docs: update contributing guide (#20593) 2024-09-19 19:38:14 +03:00
renovate[bot] 517828be57 chore(docutils): update dependency mkdocs-material to v9.5.35 2024-09-18 13:48:43 +00:00
renovate[bot] e791a9b30c chore(deps): update dependency eslint to v8.57.1 2024-09-18 09:01:55 +00:00
Kazuaki Matsuo c2ccc80438 docs: add submit expense capture img in payout.md 2024-09-17 23:07:39 -07:00
Jonathan Lipps a56f0f820a chore: publish
- appium@2.11.4
 - @appium/base-driver@9.11.4
 - @appium/base-plugin@2.2.44
 - @appium/doctor@2.1.11
 - @appium/docutils@1.0.20
 - @appium/driver-test-support@0.6.8
 - @appium/execute-driver-plugin@3.0.34
 - @appium/fake-driver@5.5.3
 - @appium/fake-plugin@3.1.48
 - @appium/images-plugin@3.0.19
 - @appium/opencv@3.0.6
 - @appium/plugin-test-support@0.3.42
 - @appium/support@5.1.4
 - @appium/test-support@3.0.48
 - @appium/types@0.21.3
 - @appium/universal-xml-plugin@1.0.22
2024-09-16 13:16:36 -07:00
Edgars Eglītis b88ff49f80 Revert "chore(deps): update dependency conventional-changelog-conventionalcom…" (#20581)
This reverts commit 5bde635d19.
2024-09-16 22:39:21 +03:00
renovate[bot] 5bde635d19 chore(deps): update dependency conventional-changelog-conventionalcommits to v8 (#20085)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-16 19:17:20 +03:00
Kazuaki Matsuo 175b7acc27 docs: add &random=1 in SPONSORS.md to generate a unique url as temporary (#20580) 2024-09-16 09:06:06 -07:00
renovate[bot] 507f2ba8b5 chore(deps): update dependency npm-run-all2 to v6.2.3 2024-09-15 13:17:20 +00:00
Oliver-Dang Dinh Ngoc 1ae1fe9c44 chore(docs): update config parameter when start appium server from --config-file to --config (#20579) 2024-09-15 12:06:31 +03:00
Kazuaki Matsuo c70faded35 docs: add forum example 2024-09-13 20:33:11 -07:00
renovate[bot] e922e9738c chore(deps): update dependency @types/mocha to v10.0.8 2024-09-13 14:23:09 +00:00
renovate[bot] 0899725aab chore(docutils): update dependency mkdocs-git-revision-date-localized-plugin to v1.2.9 2024-09-13 11:11:31 +00:00
Kazuaki Matsuo 62be085f95 docs: about payout (#20563)
* docs: about payout

* Update payout.md
2024-09-12 10:27:13 -07:00
renovate[bot] cb9fb9c6fe fix(base-driver): update dependency express to v4.21.0 2024-09-12 17:26:02 +00:00
renovate[bot] 82c5caf0b5 chore(deps): update dependency serve-static to v1.16.2 2024-09-12 14:50:55 +00:00
renovate[bot] bcbb8ee86e chore(deps): update dependency finalhandler to v1.3.1 2024-09-12 09:38:58 +00:00
renovate[bot] 980aa69b93 fix(test-support): update dependency sinon to v18.0.1 2024-09-11 13:40:05 +00:00
renovate[bot] 1cae549a7b fix(base-driver): update dependency path-to-regexp to v8.1.0 (#20562)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-11 12:39:01 +03:00
renovate[bot] ef163eb8df fix(base-driver): update dependency express to v4.20.0 2024-09-10 15:36:03 +00:00
renovate[bot] 8c3b3005be chore(deps): update dependency serve-static to v1.16.0 2024-09-10 12:09:30 +00:00
renovate[bot] 056baba3a0 fix(base-driver): update dependency body-parser to v1.20.3 2024-09-10 11:21:14 +00:00
renovate[bot]andMykola Mokhnach 0ee7716cf0 fix(appium): update dependency @sidvind/better-ajv-errors to v3 (#20552)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Mykola Mokhnach <mokhnach@gmail.com>
2024-09-09 21:15:16 +02:00
renovate[bot]andKazuaki Matsuo 3d674d0085 fix(universal-xml-plugin): update dependency @xmldom/xmldom to v0.9.2 (#20537)
* fix(universal-xml-plugin): update dependency @xmldom/xmldom to v0.9.2

* wrap different type for now

* revert some redundant lines, add annotation

* Add a url to the xmldom ticket as a reference

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Kazuaki Matsuo <fly.49.89.over@gmail.com>
2024-09-09 15:03:34 +02:00
renovate[bot] bbe3b6c6e5 chore(docutils): update dependency mkdocs-git-revision-date-localized-plugin to v1.2.8 2024-09-09 11:06:32 +00:00
renovate[bot] 42d7ed8afe fix(doctor): update dependency appium-adb to v12.6.0 2024-09-08 10:22:15 +00:00
renovate[bot] 5b8cb76ea3 fix(types): update dependency type-fest to v4 (#20548)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-08 10:52:08 +02:00
renovate[bot] d5959902bc fix(docutils): update dependency diff to v7 (#20547)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-07 20:50:08 +03:00
zhangxh075 1d066073dc docs: translate some documents into Chinese (#20545)
* Translate the sections 'Automation mapping' and 'Multi-level architecture' in 'intro/drivers.md'

* Translate the sections 'Proxy mode' in 'intro/drivers.md'

* Translate the sections 'Early Inspiration' in 'intro/history.md'

* Translate the sections 'Selenium Conference 2012' in 'intro/history.md'

* Finish the translation of the history.md file
2024-09-06 17:12:34 -07:00
renovate[bot] 048ce520d8 fix(doctor): update dependency appium-adb to v12.5.3 2024-09-06 09:05:29 +00:00
renovate[bot] 19fb9d608f chore(deps): update dependency @types/node to v20.16.5 2024-09-05 09:45:28 +00:00
renovate[bot] 38afce5ea5 chore(deps): update dependency tsd to v0.31.2 (#20535)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-05 10:25:05 +03:00
renovate[bot]andMykola Mokhnach 63cb664af1 fix(base-driver): update dependency path-to-regexp to v8 (#20520)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Mykola Mokhnach <mokhnach@gmail.com>
2024-09-04 18:47:07 +02:00
renovate[bot] 51c3063194 chore(deps): update dependency finalhandler to v1.3.0 (#20532)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-04 17:46:43 +02:00
renovate[bot] 750872af47 fix(docutils): update dependency yaml to v2.5.1 2024-09-04 12:03:49 +00:00
renovate[bot] 32645ba726 chore(deps): update dependency @types/node to v20.16.4 2024-09-04 10:22:22 +00:00
renovate[bot] f5f0aa5068 fix(docutils): update dependency diff to v6 (#20525)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-03 17:30:10 +03:00
renovate[bot] 00dc1eddaa chore(deps): update dependency eslint-plugin-import to v2.30.0 2024-09-03 14:05:37 +00:00
renovate[bot] 3bf1eaf5a9 chore(deps): update dependency finalhandler to v1.2.1 2024-09-03 11:18:36 +00:00
renovate[bot] 75710ab823 fix(universal-xml-plugin): update dependency fast-xml-parser to v4.5.0 2024-09-03 07:09:13 +00:00
renovate[bot] 7fe67a286a fix(support): update dependency axios to v1.7.7 2024-09-02 15:52:09 +00:00
renovate[bot] 38cc8a343f chore(docutils): update dependency mkdocs-material to v9.5.34 2024-09-02 14:08:59 +00:00
renovate[bot] 511ff11220 chore(deps): update dependency @types/node to v20.16.3 2024-09-02 11:31:57 +00:00
renovate[bot] ce36003edb chore(docutils): update dependency mkdocs to v1.6.1 2024-08-31 12:42:05 +00:00
renovate[bot] 0e51b9b8b9 chore(deps): update dependency json-schema-to-typescript to v15.0.2 2024-08-31 09:53:57 +00:00
renovate[bot]andMykola Mokhnach da3f9ff881 fix(universal-xml-plugin): update dependency @xmldom/xmldom to v0.9.0 (#20513)
* fix(universal-xml-plugin): update dependency @xmldom/xmldom to v0.9.0

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Mykola Mokhnach <mokhnach@gmail.com>
2024-08-30 16:15:50 +02:00
renovate[bot] dcb6de22ea fix(execute-driver-plugin): update dependency webdriverio to v8.40.5 2024-08-29 15:45:17 +00:00
renovate[bot] 8f20c973f4 fix(types): update dependency type-fest to v4.26.0 (#20511)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-29 15:01:24 +03:00
renovate[bot] 89e8d2e4d4 chore(deps): update dependency @types/diff to v5.2.2 2024-08-29 10:48:15 +00:00
renovate[bot] b692914a95 chore(deps): update dependency @types/chai-as-promised to v8 (#20502)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-29 09:55:46 +03:00
digitalvoice-nz a83f8eee9b docs(appiupm): update appiumconf banner (#20507)
Changed banner for Appium Conf to call for registrations instead of proposals
2024-08-28 19:11:19 -07:00
Mykola Mokhnach f583e99e60 chore(base-driver): Only print axios messages instead of full stacktraces (#20506) 2024-08-28 18:11:18 +02:00
renovate[bot] 21dd13e5e5 chore(deps): update definitelytyped 2024-08-28 10:28:26 +00:00
renovate[bot] 45681602c0 chore(deps): update dependency eslint-import-resolver-typescript to v3.6.3 2024-08-27 10:47:53 +00:00
Mykola Mokhnach efdb1ce6ce fix(appium): Fix the condition for secure websocket (#20497) 2024-08-27 11:00:07 +02:00
renovate[bot] b6c97cd11e chore(deps): update dependency @types/chai to v4.3.18 2024-08-26 14:46:54 +00:00
renovate[bot] fedabb1fdc fix(support): update dependency axios to v1.7.5 2024-08-24 11:11:04 +00:00
renovate[bot] 49ac8126a2 chore(docutils): update dependency mkdocs-material to v9.5.33 2024-08-23 14:56:34 +00:00
renovate[bot] 894c193150 chore(deps): update dependency json-schema-to-typescript to v15.0.1 2024-08-21 09:27:25 +00:00
renovate[bot] 688af4ddb4 chore(docutils): update dependency mkdocs-material to v9.5.32 2024-08-20 11:12:06 +00:00
renovate[bot] c8e7fa642f chore(docutils): update dependency mkdocs-git-revision-date-localized-plugin to v1.2.7 2024-08-19 12:01:47 +00:00
renovate[bot] 449dbe9a5c chore(deps): update dependency @types/node to v20.16.1 2024-08-19 10:38:48 +00:00
renovate[bot] 2468aeca60 chore(deps): update dependency @types/node to v20.16.0 2024-08-18 12:05:23 +00:00
renovate[bot] 9a66f48001 fix(types): update dependency type-fest to v4 (#20471)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-17 16:17:39 +02:00
renovate[bot] ec04635925 chore(deps): update dependency @types/node to v20.15.0 2024-08-17 13:28:36 +00:00
renovate[bot] 035e30b892 chore(support): update dependency sharp to v0.33.5 (#20469)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-17 12:16:32 +03:00
renovate[bot] 893fc040e1 fix(appium): update dependency winston to v3.14.2 (#20465)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-16 17:17:50 +02:00
renovate[bot] 482a1f7bbf fix(types): update dependency type-fest to v4 (#20467)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-16 14:58:48 +02:00
renovate[bot] d17d022224 fix(support): update dependency axios to v1.7.4 2024-08-16 11:28:55 +00:00
renovate[bot] 46085635a9 fix(execute-driver-plugin): update dependency webdriverio to v8.40.3 2024-08-16 10:02:07 +00:00
renovate[bot] db28605532 fix(doctor): update dependency appium-adb to v12.5.2 2024-08-15 20:20:08 +00:00
renovate[bot] a5ea99aacd chore(docutils): update dependency mike to v2.1.3 2024-08-15 15:34:45 +00:00
renovate[bot] 880111b0ff chore(deps): update dependency mocha to v10.7.3 2024-08-15 13:17:35 +00:00
renovate[bot] d6cdd3b05f chore(deps): update definitelytyped 2024-08-15 11:10:49 +00:00
Edgars Eglītis 326942d8ac fix(renovate): adjust config for Renovate v38 (#20455) 2024-08-14 16:04:33 +03:00
Mykola Mokhnach 622b245ea3 fix(base-driver): Add a server flag to check if it operates a secure protocol (#20449) 2024-08-10 18:29:11 +02:00
renovate[bot] 5034f1afc6 chore(deps): update dependency lerna to v8.1.8 (#20441)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-09 07:45:52 +02:00
Mykola Mokhnach a97f3893e6 chore(base-driver): Print a log message if a command gets added into a non-empty waiting queue (#20447) 2024-08-09 07:45:29 +02:00
84 changed files with 2814 additions and 2368 deletions
+1 -1
View File
@@ -16,7 +16,7 @@ _Put an `x` in the boxes that apply_
_Put an `x` in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code._
- [ ] I have read the [CONTRIBUTING](https://github.com/appium/appium/blob/master/CONTRIBUTING.md) doc
- [ ] I have read the [Contributing Guide](https://appium.io/docs/en/latest/contributing/)
- [ ] I have signed the CLA
- [ ] Lint and unit tests pass locally with my changes
- [ ] I have added tests that prove my fix is effective or that my feature works
+4 -1
View File
@@ -1,6 +1,9 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["github>appium/appium//renovate/default"],
"schedule": ["after 10pm and before 5:00am"],
"schedule": [
"after 10pm",
"before 5:00am"
],
"timezone": "America/Vancouver"
}
-63
View File
@@ -1,63 +0,0 @@
# Contributing to Appium
There are a lot of different ways to contribute to Appium. See below for
everything you can do and the processes to follow for each contribution method.
Note that no matter how you contribute, your participation is governed by our
[Code of Conduct](CONDUCT.md).
### Make changes to the Appium code or docs
Fork the project, make a change, and send a pull request! Please have a look at
our [Style Guide](/docs/en/contributing-to-appium/style-guide.md) before
getting to work. Please make sure the unit and functional tests pass before
sending a pull request; for more information on how to run tests, keep reading!
Make sure you read and follow the setup instructions in the README first. And note
that all participation in the Appium community (including code submissions) is
governed by our [Code of Conduct](CONDUCT.md). Then, have a look at our
[running from source doc](/docs/en/contributing-to-appium/appium-from-source.md) for more
information on how to get set up to run tests and start slinging code.
You will probably also want to have a look at this more in-depth [Developer's
Overview](/docs/en/contributing-to-appium/developers-overview.md) of the Appium
project, how Appium is architected, how to make changes to modules, and so on.
Finally, before we accept your code, you will need to have signed our
[Contributor License
Agreement](https://cla.js.foundation/appium/appium).
### Become an Appium Triager
You can help us manage our issue tracker! All you need is enough familiarity
with Appium to try and reproduce bugs. We triage issues by having conversations
with the issue creator and then either closing the issue or moving it into the
[Bugs](https://github.com/appium/appium/milestones/Bugs) or
[Features](https://github.com/appium/appium/milestones/Features) milestone. We
use these buckets as the backlogs for our upcoming releases.
We use this "algorithm" for triaging issues, which anyone can jump in and follow:
1. If issue is a feature request, discuss amongst Appium devs.
* If we decide to build it, add to the Features milestone.
* If we decide not to build it, just close.
2. If issue is a bug report, attempt to verify
* If it's a duplicate, close with link to bug already reported.
* If it ultimately can't be verified, close until we have enough information to verify (e.g., in most cases we need a full set of Appium logs to help diagnose an issue).
* If the user hasn't provided enough information, keep asking for enough information to verify.
* If it's a verified new bug, add it to the Bugs milestone.
* If we have been waiting for a reply from the user for over 3 weeks, close.
If you're interested in joining our triage rotation, contact
[@jlipps](https://github.com/jlipps) or
[@imurchie](https://github.com/imurchie).
### Help out on our forums
We can always use help on our forums at
[discuss.appium.io](https://discuss.appium.io)! Hop on over and see if there
are any questions that you can answer.
### Submit bug reports or feature requests
Just use the GitHub issue tracker to submit your bug reports and feature
requests. If you are submitting a bug report, please follow the [issue template](https://github.com/appium/appium/issues/new).
+3 -4
View File
@@ -67,10 +67,9 @@ significant contributions to the project but are no longer actively committing.
### Other Contributors
Other, less formal, kinds of contribution are outlined in our
[CONTRIBUTING](/CONTRIBUTING.md) doc. We also very much appreciate those who spend their valuable
time assisting with the [Appium forums](https://discuss.appium.io). Current high-level forum
contributors and mods include:
Other, less formal, kinds of contribution are outlined in our [Contributing Guide](https://appium.io/docs/en/latest/contributing/).
We also very much appreciate those who spend their valuable time assisting with the [Appium forums](https://discuss.appium.io).
Current high-level forum contributors and mods include:
* [aleksei](https://discuss.appium.io/u/aleksei/summary)
* [wreed](https://discuss.appium.io/u/wreed/summary)
+5 -1
View File
@@ -9,11 +9,15 @@
Cross-platform test automation for native, hybrid, mobile web and desktop apps.
</p>
<div align="center">
[![NPM version](https://badge.fury.io/js/appium.svg)](https://npmjs.org/package/appium)
[![Monthly Downloads](https://img.shields.io/npm/dm/appium.svg)](https://npmjs.org/package/appium)
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fappium%2Fappium.svg?type=shield)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fappium%2Fappium?ref=badge_shield)
[![StandWithUkraine](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/badges/StandWithUkraine.svg)](https://github.com/vshymanskyy/StandWithUkraine/)
</div>
***
<p align="center"><b>
@@ -21,7 +25,7 @@
<a href="https://appium.io/docs/en/latest/intro/">Get Started</a> |
<a href="https://appium.io/docs/en/latest/ecosystem/">Ecosystem</a> |
<a href="https://github.com/appium/appium/blob/master/packages/appium/CHANGELOG.md">Changelog</a> |
<a href="https://github.com/appium/appium/blob/master/ROADMAP.md">Roadmap</a> |
<a href="https://appium.io/docs/en/latest/contributing/">Contributing Guide</a> |
<a href="https://discuss.appium.io">Discussion Forum</a>
</b></p>
+3 -3
View File
@@ -31,18 +31,18 @@ contributors!
## Gold Sponsors
<a href="https://opencollective.com/appium" target="_blank"><img src="https://opencollective.com/appium/tiers/gold-sponsor.svg?avatarHeight=100&button=false"/></a>
<a href="https://opencollective.com/appium" target="_blank"><img src="https://opencollective.com/appium/tiers/gold-sponsor.svg?avatarHeight=100&button=false&random=1"/></a>
[Become a Gold Sponsor](https://opencollective.com/appium/contribute/gold-sponsor-72877/checkout?interval=month&amount=500&contributeAs=me)
## Silver Sponsors
<a href="https://opencollective.com/appium" target="_blank"><img src="https://opencollective.com/appium/tiers/silver-sponsor.svg?avatarHeight=80&button=false"/></a>
<a href="https://opencollective.com/appium" target="_blank"><img src="https://opencollective.com/appium/tiers/silver-sponsor.svg?avatarHeight=80&button=false&random=1"/></a>
[Become a Silver Sponsor](https://opencollective.com/appium/contribute/silver-sponsor-72876/checkout?interval=month&amount=250&contributeAs=me)
## Bronze Sponsors
<a href="https://opencollective.com/appium" target="_blank"><img src="https://opencollective.com/appium/tiers/sponsors.svg?avatarHeight=60&button=false"/></a>
<a href="https://opencollective.com/appium" target="_blank"><img src="https://opencollective.com/appium/tiers/sponsors.svg?avatarHeight=60&button=false&random=1"/></a>
[Become a Bronze Sponsor](https://opencollective.com/appium/contribute/sponsors-70690/checkout?interval=month&amount=100&contributeAs=me)
+28
View File
@@ -0,0 +1,28 @@
This documentation is a note for the opencollective payout.
1. Select `Submit expense`
<img width="200" alt="Screenshot 2024-09-17 at 11 04 32 PM" src="https://github.com/user-attachments/assets/5d598a46-8aa3-41e0-aadc-ce3f34b10f6b">
2. Select `Invoice`
3. Type proper account name in `Who is being paid for this expense?`
- The form depends on the target user
4. Select `Next`
5. Input expense info and complete the form. Then, the user will recieve the expense info.
- Expense title: `<year-month> contribution payout`
- e.g. `2024-07 contribution payout`
- Description in "Set invoice details"
- for TCs:
- `<year-month> contribution as a TC https://github.com/appium/appium/blob/master/GOVERNANCE.md#the-technical-committee and maintaining Appium project itself (development, review etc)`
- i.e. `2024-07 contribution as a TC https://github.com/appium/appium/blob/master/GOVERNANCE.md#the-technical-committee and maintaining Appium project itself (development, review etc)`
- for individuals
- `PR contribution: <PRs>` for PRs. `Community contribution in Q&A forum at https://discuss.appium.io/` for appium forums
- E.g.
- `PR contribution: https://github.com/appium/dotnet-client/pull/810, https://github.com/appium/dotnet-client/pull/808`
- `PR contribution: https://github.com/appium/java-client/pull/2206, https://github.com/appium/java-client/pull/2203 and a few PRs`
- `Community contribution in Q&A forum at https://discuss.appium.io/`
- Amount
- Type the amount in `USD`
6. Approve each expense after getting response for each expense
<img width="500" alt="Screenshot 2024-09-11 at 8 40 35 PM" src="https://github.com/user-attachments/assets/462cda69-1ce7-458c-b319-dda87cf10d65">
+1938 -1735
View File
File diff suppressed because it is too large Load Diff
+21 -20
View File
@@ -44,6 +44,7 @@
"docs:preview": "npm run -w packages/appium build:docs:preview",
"docs:publish": "npm run -w packages/appium publish:docs",
"doctor": "node ./packages/doctor",
"install-docs-deps": "npm run -w packages/appium install-docs-deps",
"lint": "eslint .",
"lint:ci": "eslint --quiet .",
"lint:fix": "run-s \"lint -- --fix\"",
@@ -83,18 +84,18 @@
"devDependencies": {
"@colors/colors": "1.6.0",
"@tsconfig/node14": "14.1.2",
"@types/chai": "4.3.17",
"@types/chai-as-promised": "7.1.8",
"@types/diff": "5.2.1",
"@types/mocha": "10.0.7",
"@types/node": "20.14.14",
"@types/chai": "5.0.0",
"@types/chai-as-promised": "8.0.1",
"@types/diff": "5.2.2",
"@types/mocha": "10.0.8",
"@types/node": "20.16.9",
"@types/semver": "7.5.8",
"@types/sinon": "17.0.3",
"@types/sinon-chai": "3.2.12",
"@types/sinon-chai": "4.0.0",
"@types/source-map-support": "0.5.10",
"@types/teen_process": "2.0.4",
"@types/ws": "8.5.12",
"@types/yargs": "17.0.32",
"@types/yargs": "17.0.33",
"@typescript-eslint/eslint-plugin": "7.18.0",
"@typescript-eslint/parser": "7.18.0",
"asyncbox": "3.0.0",
@@ -102,34 +103,34 @@
"chai-as-promised": "8.0.0",
"conventional-changelog-conventionalcommits": "7.0.2",
"cpy-cli": "5.0.0",
"eslint": "8.57.0",
"eslint": "8.57.1",
"eslint-config-prettier": "9.1.0",
"eslint-find-rules": "4.1.0",
"eslint-import-resolver-typescript": "3.6.1",
"eslint-plugin-import": "2.29.1",
"eslint-import-resolver-typescript": "3.6.3",
"eslint-plugin-import": "2.30.0",
"eslint-plugin-mocha": "10.5.0",
"eslint-plugin-promise": "6.6.0",
"finalhandler": "1.2.0",
"finalhandler": "1.3.1",
"get-port": "5.1.1",
"json-schema-to-typescript": "15.0.0",
"lerna": "8.1.7",
"json-schema-to-typescript": "15.0.2",
"lerna": "8.1.8",
"log-symbols": "4.1.0",
"midnight-smoker": "8.0.0",
"mjpeg-consumer": "2.0.0",
"mjpeg-server": "0.3.1",
"mocha": "10.7.0",
"npm-run-all2": "6.2.2",
"mocha": "10.7.3",
"npm-run-all2": "6.2.3",
"prettier": "3.3.3",
"rewiremock": "3.14.5",
"rimraf": "5.0.10",
"serve-static": "1.15.0",
"sinon": "18.0.0",
"serve-static": "1.16.2",
"sinon": "19.0.2",
"sync-monorepo-packages": "1.0.2",
"ts-node": "10.9.2",
"tsd": "0.31.1",
"typescript": "5.5.4",
"tsd": "0.31.2",
"typescript": "5.6.2",
"validate.js": "0.13.1",
"webdriverio": "8.40.0",
"webdriverio": "8.40.5",
"ws": "8.18.0",
"yaml-js": "0.3.1"
},
+31
View File
@@ -3,6 +3,37 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [2.11.5](https://github.com/appium/appium/compare/appium@2.11.4...appium@2.11.5) (2024-09-26)
### Bug Fixes
* **appium:** Return hostname as web socket url for BiDi if a broadcast address is assigned to the server ([#20603](https://github.com/appium/appium/issues/20603)) ([f0de55d](https://github.com/appium/appium/commit/f0de55da0da2fc0305876a948704c1f0a2a5990f))
## [2.11.4](https://github.com/appium/appium/compare/appium@2.11.3...appium@2.11.4) (2024-09-16)
### Bug Fixes
* **appium:** Fix the condition for secure websocket ([#20497](https://github.com/appium/appium/issues/20497)) ([efdb1ce](https://github.com/appium/appium/commit/efdb1ce6ce1de5120f2f35ebe84abfa73ed5198a))
* **appium:** update dependency @sidvind/better-ajv-errors to v3 ([#20552](https://github.com/appium/appium/issues/20552)) ([0ee7716](https://github.com/appium/appium/commit/0ee7716cf0644cfc6795f0949d8253d4c0b36597))
* **appium:** update dependency winston to v3.14.2 ([#20465](https://github.com/appium/appium/issues/20465)) ([893fc04](https://github.com/appium/appium/commit/893fc040e16ec07c83d12c7c89180d962b0f6e68))
* **base-driver:** Add a server flag to check if it operates a secure protocol ([#20449](https://github.com/appium/appium/issues/20449)) ([622b245](https://github.com/appium/appium/commit/622b245ea38793280d9785a59a0416ce025862fe))
* **docutils:** update dependency yaml to v2.5.1 ([750872a](https://github.com/appium/appium/commit/750872af4756d2efcd19fe98762f82ecaa59d59a))
* **execute-driver-plugin:** update dependency webdriverio to v8.40.3 ([4608563](https://github.com/appium/appium/commit/46085635a92c3a2b2b1b3ecf3966a174248a2829))
* **execute-driver-plugin:** update dependency webdriverio to v8.40.5 ([dcb6de2](https://github.com/appium/appium/commit/dcb6de22eaabdcea2517cd9b7db120d681f0e38e))
* **support:** update dependency axios to v1.7.4 ([d17d022](https://github.com/appium/appium/commit/d17d0222245ab94a78e578c0398734e65a89ba68))
* **support:** update dependency axios to v1.7.5 ([fedabb1](https://github.com/appium/appium/commit/fedabb1fdc7af10f9e4b06ea23815c4bc7c6bf5e))
* **support:** update dependency axios to v1.7.7 ([7fe67a2](https://github.com/appium/appium/commit/7fe67a286a15a917ce3b1b47a08e982e65bbd9e4))
* **types:** update dependency type-fest to v4 ([#20467](https://github.com/appium/appium/issues/20467)) ([482a1f7](https://github.com/appium/appium/commit/482a1f7bbfbf6478ee09bb1668b830ddbf13b143))
* **types:** update dependency type-fest to v4 ([#20471](https://github.com/appium/appium/issues/20471)) ([9a66f48](https://github.com/appium/appium/commit/9a66f4800141cc86c90d58ca1103bab0066081bc))
* **types:** update dependency type-fest to v4 ([#20548](https://github.com/appium/appium/issues/20548)) ([5b8cb76](https://github.com/appium/appium/commit/5b8cb76ea3cda75095e79c91539be73feeadf869))
* **types:** update dependency type-fest to v4.26.0 ([#20511](https://github.com/appium/appium/issues/20511)) ([8f20c97](https://github.com/appium/appium/commit/8f20c973f4a6d3380163b6afd7f113808453a62d))
## [2.11.3](https://github.com/appium/appium/compare/appium@2.11.2...appium@2.11.3) (2024-08-07)
+5 -1
View File
@@ -9,11 +9,15 @@
Cross-platform test automation for native, hybrid, mobile web and desktop apps.
</p>
<div align="center">
[![NPM version](https://badge.fury.io/js/appium.svg)](https://npmjs.org/package/appium)
[![Monthly Downloads](https://img.shields.io/npm/dm/appium.svg)](https://npmjs.org/package/appium)
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fappium%2Fappium.svg?type=shield)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fappium%2Fappium?ref=badge_shield)
[![StandWithUkraine](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/badges/StandWithUkraine.svg)](https://github.com/vshymanskyy/StandWithUkraine/)
</div>
***
<p align="center"><b>
@@ -21,7 +25,7 @@
<a href="https://appium.io/docs/en/latest/intro/">Get Started</a> |
<a href="https://appium.io/docs/en/latest/ecosystem/">Ecosystem</a> |
<a href="https://github.com/appium/appium/blob/master/packages/appium/CHANGELOG.md">Changelog</a> |
<a href="https://github.com/appium/appium/blob/master/ROADMAP.md">Roadmap</a> |
<a href="https://appium.io/docs/en/latest/contributing/">Contributing Guide</a> |
<a href="https://discuss.appium.io">Discussion Forum</a>
</b></p>
+2
View File
@@ -25,6 +25,8 @@ plugins:
'reference/commands/images-plugin.md': 'commands/images-plugin.md'
'reference/commands/relaxed-caps-plugin.md': 'commands/relaxed-caps-plugin.md'
'reference/commands/universal-xml-plugin.md': 'commands/universal-xml-plugin.md'
'contributing/config-system.md': 'developing/config-system.md'
'contributing/develop.md': 'contributing.md'
extra_css:
- assets/stylesheets/extra.css
+123
View File
@@ -0,0 +1,123 @@
---
hide:
- navigation
title: Contributing to Appium
---
The Appium project would not exist without the many contributions of code, documentation,
maintenance, and support from companies and volunteers. As such, we welcome contributions!
There are a lot of different ways to help the project - see below for everything you can do and the
processes to follow for each contribution method. Note that no matter how you contribute, your
participation is governed by our [Code of Conduct](https://github.com/appium/appium/blob/master/CONDUCT.md).
## Join the Discussion Forum
You don't need to know the internals of Appium to be able to contribute! If you have experience with
using Appium and feel like sharing your knowledge with others, consider helping out users on the
Appium forums at [discuss.appium.io](https://discuss.appium.io/). Hop on over and see if there are
any questions that you can answer.
## Report Bugs or Feature Requests
If you've encountered a bug, or have a cool feature in mind that you think Appium should support,
make sure to let us know at our [GitHub issue tracker](https://github.com/appium/appium/issues).
Please use the appropriate issue form template when creating your issue.
## Triage Issues
In addition to creating issues, you can also help us investigate already reported issues. All you
need is enough familiarity with Appium to try and reproduce bugs.
You can get started by checking our [GitHub issue tracker](https://github.com/appium/appium/issues)
for issues with labels such as `Needs Triage` or `Needs Info`, and leaving relevant comments:
- If the issue is a duplicate, drop a link to the original issue
- If the user has not provided enough information (such as Appium logs), ask them for more details
- If you can reproduce the problem on your own environment, provide all the information that you think
would help us track down the cause of the issue
For further information on triaging Appium issues (for any Appium project repository), please contact
any member of the [Technical Committee](https://github.com/appium/appium/blob/master/GOVERNANCE.md#the-technical-committee).
## Contribute Code
We are always open to pull requests for improving the Appium code or documentation!
!!! info
Developer information may not be kept up to date as frequently as user-facing information, or
it may be most relevant in its current form on the online repository, not in this published
version. Make sure to check the repo or discuss with maintainers. We would be glad to help
new contributors get started!
Start by cloning the repository (we recommend [forking](https://github.com/appium/appium/fork)
it first):
```sh
git clone https://github.com/appium/appium.git
cd appium
```
!!! info
If you are VS Code user, you can easily check out the project using [Runme](https://runme.dev/api/runme?repository=https%3A%2F%2Fgithub.com%2Fappium%2Fappium.git&fileToOpen=packages%2Fappium%2Fdocs%2Fen%2Fcontributing%2Findex.md).
Install dependencies:
```sh
npm install
```
From here on there are several things you can do.
Build the project:
```sh
npm run build
```
Build the project and watch for changes:
```sh
npm run dev
```
Start the locally built Appium server:
```sh
npm start
```
Run various tests:
```sh
npm run lint
npm run test:unit
npm run test:types
npm run test:smoke
npm run test:e2e
npm run test:quick # unit and types
npm run test:slow # everything
```
You can also run tests for specific workspaces, e.g.:
```sh
export APPIUM_WORKSPACE=@appium/base-driver
npm run test:unit -w $APPIUM_WORKSPACE
```
### Documentation
The documentation for this project is [available in the project repository itself](https://github.com/appium/appium/tree/master/packages/appium/docs).
It is contained in Markdown files, which are built by our documentation system in the
`@appium/docutils` module. This module is based on [MkDocs](https://www.mkdocs.org/) and therefore
requires [Python](https://www.python.org/) to be installed on your system.
Install Python dependencies:
```sh
npm run install-docs-deps
```
After making your changes, you can run the documentation server in dev mode:
```sh
npm run dev:docs
```
You can then view the documentation at `http://127.0.0.1:8000/docs/en`.
@@ -1,90 +0,0 @@
---
title: Contributing Code
---
To contribute to the Appium code base make sure to check out the Git repository.
!!! info
If you are VS Code user you can easily check out the project using [Runme](https://runme.dev/api/runme?repository=https%3A%2F%2Fgithub.com%2Fappium%2Fappium.git&fileToOpen=packages%2Fappium%2Fdocs%2Fen%2Fcontributing%2Findex.md).
It is advised to [fork](https://github.com/appium/appium/fork) before cloning it to your system.
```sh
export GITHUB_USERNAME=<your-username>
git clone git@github.com:$GITHUB_USERNAME/appium.git
```
After cloning you can go ahead and install the project dependencies:
```sh
npm install
```
From here on there are several things you can do.
### Watch Files
When developing Appium code we have to watch all JavaScript and TypeScript files to re-compile them after every change. You can run this watch process via:
```sh
npm run dev
```
### Start Appium in Dev-Mode
To test your changes you can run Appium in dev mode via:
```sh
npm start
```
### Run Tests
The project maintains a set of different test variations you can run to verify the quality of the code.
#### Linting
Appium uses [`eslint`](https://eslint.org/) for static code analysis and linting. You can run these checks via:
```sh
npm run lint
```
#### Unit
```sh
npm run test:unit
```
You can also run tests for specific workspaces, e.g.:
```sh
export APPIUM_WORKSPACE=@appium/doctor
npm run test:unit -w $APPIUM_WORKSPACE
```
#### Smoke and E2E
```sh
npm run test:slow
```
### Deploy Docs Locally
Our documentation system uses [MKDocs](https://www.mkdocs.org/) and therefore requires [Python](https://www.python.org/) to be installed on your system. You can run the docs by:
```sh
# installing needed Python dependencies
pip install -r packages/docutils/requirements.txt
# build the project
npm run build
# run dev server
npm run dev:docs
```
You should be able to view the page at `http://127.0.0.1:8000/docs/en`:
```sh
open http://127.0.0.1:8000/docs/en
```
@@ -1,38 +0,0 @@
---
hide:
- toc
title: Contributing to Appium
---
Appium is open source, available under an Apache 2.0 license. Appium's copyright is held by the
[OpenJS Foundation](https://openjsf.org), and Appium receives contributions from many companies
across several software industries, regardless of their competitive status. (3rd-party drivers and
plugins are available under the licenses provided by their authors.)
As such, we welcome contributions! The project moves forward in relation to the investment of
contributions of code, documentation, maintenance, and support from companies and volunteers.
This section of Appium's documentation is for those who are interested in contributing to Appium's
development. It contains developer overviews, guides, and notes. Use the navigation menu to find
a specific topic. All the information in these guides assumes in-depth familiarity with Appium
already.
!!! warning
Developer information may not be kept up to date as frequently as user-facing information, or
it may be most relevant in its current form on the online repository, not in this published
version. Always be sure to check the repo or discuss with maintainers. We're always happy to
help new contributors get started!
## Ways to Contribute
The project offers a variety of ways to contribute, e.g.:
- [contributing code](./develop.md)
- improving documentation
- creating educational content (blog posts, tutorials, videos, etc.)
- spreading the good word about the project (e.g. via Twitter)
- filing bugs if you discover them while using Appium
- making feature requests if you are missing something in the project or help triaging bugs
- supporting users in the [Appium forum](https://discuss.appium.io/)
+1 -1
View File
@@ -42,7 +42,7 @@ property in your `package.json` and it will be automatically discovered.
Appium will search _up_ the directory tree from the current working directory for one of these
files. If it reaches the current user's home directory or filesystem root, it will stop looking.
To specify a _custom_ location for your config file, use `appium --config-file /path/to/config/file`.
To specify a _custom_ location for your config file, use `appium --config /path/to/config/file`.
#### Configuration File Format
+1 -6
View File
@@ -12,11 +12,6 @@ title: Welcome
}
</style>
<div style="text-align:center;width:100%;background-color:#7f56c2" >
<h3>
Appium Conf 2024 is coming online, 13 September. Have you got something to share with the community? <a style="color:#fcba12" href="https://confengine.com/conferences/appium-conf-2024/proposals?utm_medium=referal&utm_source=appium.io&utm_campaign=launch" target="blank">Submit a proposal</a>
</h3>
</div>
<div style="text-align: center">
<img src="assets/images/appium-logo-horiz.png" style="max-width: 400px;" />
</div>
@@ -63,6 +58,6 @@ Android TV, Samsung), and more!
- Read the different [__Guides__](./guides/migrating-1-to-2.md) for a variety of instructions, tips and tricks
- Check out various third-party [__Resources__](./resources.md) to explore Appium around the web
- For creating your own Appium extensions, see the [__Developer__](./developing/index.md) documentation
- For contributions to Appium itself, refer to the [__Contributing__](./contributing/index.md) page
- For contributions to Appium itself, refer to the [__Contributing__](./contributing.md) page
</div>
+3 -4
View File
@@ -72,7 +72,6 @@ nav:
- developing/build-plugins.md
- developing/build-docs.md
- developing/build-doctor-checks.md
- Contributing:
- contributing/index.md
- contributing/develop.md
- contributing/config-system.md
- Developer Reference:
- developing/config-system.md
- Contributing: contributing.md
+29 -86
View File
@@ -47,109 +47,52 @@ async setUrl(url) {
## 自动化映射
But *typically* what driver authors want to do is to provide automation behaviours for a given
platform(s) that are semantically very similar to the the WebDriver spec implementations for
browsers. When you want to find an element, you should get a reference to a UI element. When you
want to click or tap that element, the resulting behaviour should be the same as if a person were
to click or tap on the element. And so on.
但通常驱动程序作者想要做的是为给定的平台提供自动化行为,这些行为在语义上与浏览器的WebDriver规范实现非常相似。当你想找到一个元素时,您应该得到一个对UI元素的引用。当您想要点击或轻触那个元素时,其产生的行为应该与一个人点击或轻触该元素时的行为相同。以此类推。
So the real challenge for driver authors is not how to work with the WebDriver protocol (because
`BaseDriver` encapsulates all that for you), but how to make the actual automation happen on the
target platform. Every driver relies on its own set of underlying technologies here. As mentioned
in the [Overview](index.md), the iOS driver uses an Apple technology called
[XCUITest](https://developer.apple.com/documentation/xctest/xcuielement). These underlying
automation technologies usually have proprietary or idiosyncratic APIs of their own. Writing
a driver becomes the task of mapping the WebDriver protocol to this underlying API (or sometimes
a set of different underlying APIs--for example, the UiAutomator2 driver relies not only on the
[UiAutomator2](https://developer.android.com/training/testing/other-components/ui-automator)
technology from Google, but also functions only available through
[ADB](https://developer.android.com/tools/adb), as well as functions only available
via the Android SDK inside a helper app). Tying it all together into a single, usable, WebDriver
interface is the incredibly useful (but incredibly challenging) art of driver development!
因此,驱动程序作者面临的真正挑战不是如何使用WebDriver协议(因为`BaseDriver`已经为您封装了所有),而是如何在目标平台上实现实际的自动化。每个驱动程序都依赖于自己的一套底层技术。正如[概述](index.md)中提到的,iOS驱动程序使用了一种名为[XCUITest](https://developer.apple.com/documentation/xctest/xcuielement)的苹果技术。这些底层自动化技术通常具有自己的专有或特殊API。编写驱动程序变成了将WebDriver协议映射到该底层API的任务(或者有时是一组不同的底层API,例如UiAutomator 2驱动程序不仅依赖于Google的[UiAutomator 2](https://developer.android.com/training/testing/other-components/ui-automator)技术,而且还具有仅通过[ADB](https://developer.android.com/tools/adb)提供的功能,以及仅通过Android SDK在助手应用程序中提供的功能)。将所有内容整合到一个可用的WebDriver界面中,是驱动程序开发中非常有用(但极具挑战性)的艺术!
## 多层架构
In practice, this often results in a pretty complex architecture. Let's take iOS for example again.
The XCUITest framework (the one used by the Appium driver) expects code that calls it to be written
in Objective-C or Swift. Furthermore, XCUITest code can only be run in a special mode triggered by
Xcode (and directly or indirectly, the Xcode command line tools). In other words, there's no
straightforward way to go from a Node.js function implementation (like `setUrl()` above) to
XCUITest API calls.
在实践中,这通常会导致相当复杂的架构。让我们再次以iOS为例,XCUITest框架(Appium驱动程序使用的那个)期望调用它的代码是用Objective-C或Swift编写的。此外,XCUITest代码只能在Xcode(以及直接或间接的Xcode命令行工具)触发的特殊模式下运行。换句话说,没有简单的方法可以从Node.js函数实现(例如上面的`setUrl()`)到XCUITest API调用。
What the XCUITest driver authors have done is instead to split the driver into two parts: one part
written in Node.js (the part which is incorporated into Appium and which initially handles the
WebDriver commands), and the other part written in Objective-C (the part which actually gets run on
an iOS device and makes XCUITest API calls). This makes interfacing with XCUITest possible, but
introduces the new problem of coordination between the two parts.
XCUITest驱动程序的作者所做的是将驱动程序分为两部分:一部分用Node.js编写(这部分被合并到Appium中,用于处理WebDriver命令),另一部分用Objective-C编写(这一部分实际上在iOS设备上运行,并进行XCUITest API调用)。这使得实现与XCUITest交互的接口成为可能,但引入了两个部分之间协调的新问题。
The driver authors could have chosen any of a number of very different strategies to model the
communication between the Node.js side and the Objective-C side, but at the end of the day decided
to use ... the WebDriver protocol! That's right, the Objective-C side of the XCUITest driver is
itself a WebDriver implementation, called
[WebDriverAgent](https://github.com/appium/webdriveragent).[^3]
驱动程序作者可以选择许多非常不同的策略中的任何一种来模拟Node.js端和Objective-C端之间的通信,但最终决定使用WebDriver协议!没错,XCUITest驱动程序的Objective-C端本身就是一个WebDriver实现,称为[WebDriverAgent](https://github.com/appium/webdriveragent).[^3]。
[^3]: You could in theory, therefore, point your WebDriver client straight to WebDriverAgent and
bypass Appium entirely. This is usually not convenient, however, for a few reasons:
[^3]: 因此,从理论上讲,您可以将WebDriver客户端直接指向WebDriverAgent并完全绕过Appium。然而,这通常不方便,原因有几个:
- The Appium XCUITest driver builds and manages WebDriverAgent for you, which can be a pain and
involves the use of Xcode.
- The XCUITest driver does lots more than what can be done by WebDriverAgent, for example working
with simulators or devices, installing apps, and the like.
- Appium的XCUITest驱动程序为您构建和管理WebDriverAgent,这可能是个麻烦事,并且涉及到使用Xcode。
The moral of the story is that driver architectures can become quite complicated and multilayered,
due to the nature of the problem we're trying to solve. It also means it can be difficult sometimes
to tell where in this chain of technologies something has gone wrong, if you run into a problem
with a particular test. With the XCUITest world again, we have something like the following set of
technologies all in play at the same time:
- XCUITest驱动程序的功能比WebDriverAgent要多得多,例如使用模拟器或设备、安装应用程序等。
- Your test code (in its programming language) - owned by you
- The Appium client library - owned by Appium
- The Selenium client library - owned by Selenium
- The network (local or Internet)
- The Appium server - owned by Appium
- The Appium XCUITest driver - owned by Appium
- WebDriverAgent - owned by Appium
- Xcode - owned by Apple
- XCUITest - owned by Apple
- iOS itself - owned by Apple
- macOS (where Xcode and iOS simulators run) - owned by Apple
这个故事的寓意是,由于我们试图解决的问题的性质,驱动程序架构可能会变得非常复杂和多层次。这也意味着,如果你在特定的测试中遇到问题,有时很难判断这一技术链中哪里出了问题。在XCUITest世界中,我们有以下几项技术同时发挥作用:
It's a pretty deep stack!
- 您的测试代码(使用相应的编程语言) - 由您拥有
- Appium客户端库 - 由Appium拥有
- Selenium客户端库 - 由Selenium拥有
- 网络(本地或Internet)
- Appium服务器 - 由Appium拥有
- Appium XCUITest驱动程序 - 由Appium拥有
- WebDriverAgent - 由Appium拥有
- Xcode - 由Apple拥有
- XCUITest - 由Apple拥有
- iOS本身 - 由Apple拥有
- macOS(运行Xcode和iOS模拟器的地方)- 由Apple拥有
这是一个相当深的堆栈!
## 代理模式
There's one other important architectural aspect of drivers to understand. It can be exemplified
again by the XCUITest driver. Recall that we just discussed how the two "halves" of the XCUITest
driver both speak the WebDriver protocol---the Node.js half clicks right into Appium's WebDriver
server, and the Objective-c half (WebDriverAgent) is its own WebDriver implementation.
驱动程序还有另一个重要的架构方面需要理解。XCUITest驱动程序再次证明了这一点。回想一下,我们刚刚讨论了XCUITest驱动程序的两个“部分”是如何使用WebDriver协议的,Node.js部分直接点击Appium的WebDriver服务器,而Objective-c部分(WebDriverAgent)是它自己的WebDriver实现。
This opens up the possibility of Appium taking a shortcut in certain cases. Let's imagine that the
XCUITest driver needs to implement the `Click Element` command. The internal code of this
implementation would look something like taking the appropriate parameters and constructing an HTTP
request to the WebDriverAgent server. In this case, we're basically just reconstructing the
client's original call to the Appium server![^4] So there's really no need to even write a function
implementing the `Click Element` command. Instead, the XCUITest driver can just let Appium know
that this command should be proxied directly to some other WebDriver server.
这为Appium在某些情况下走捷径提供了可能性。假设XCUITest驱动程序需要实现`Click Element`命令。此实现的内部代码看起来类似于获取适当的参数并构造对WebDriverAgent服务器的HTTP请求。在这种情况下,我们基本上只是在重建客户端对Appium服务器的原始调用![^4] 所以实际上没有必要编写一个函数来实现`Click Element`命令,XCUITest驱动程序可以让Appium知道这个命令应该代理到其他一些WebDriver服务器。
[^4]: It's not *exactly* the same call, because the Appium server and the WebDriverAgent server
will generate different session IDs, but these differences will be handled transparently.
[^4]: 这不是完全相同的调用,因为Appium服务器和WebDriver Agent服务器将生成不同的会话ID,但这些差异将被透明地处理。
If you're not familiar with the concept of "proxying," in this case it just means that the XCUITest
driver will not be involved at all in handling the command. Instead it will merely be repackaged
and forwarded to WebDriverAgent at the protocol level, and WebDriverAgent's response will likewise
be passed back directly to the client, without any XCUITest driver code seeing it or modifying it.
如果你不熟悉"代理"这个概念,在这种情况下,它只是意味着XCUITest驱动程序将不参与处理命令。相反,它将仅仅被重新打包并转发到协议层的WebDriverAgent,并且WebDriverAgent的响应也将直接传回给客户端,而无需XCUITest驱动程序代码查看它或修改它。
This architectural pattern provides a nice bonus for driver authors who choose to deal with the
WebDriver protocol everywhere, rather than constructing bespoke protocols. It also means that
Appium can create wrapper drivers for any other existing WebDriver implementation very easily. If
you look at the [Appium Safari driver](https://github.com/appium/appium-safari-driver) code, for
example, you'll see that it implements basically no standard commands, because all of these are
proxied directly to an underlying SafariDriver process.
这种架构模式为驱动程序开发者提供了一个好处,使他们可以选择完全使用WebDriver协议,而不需要构建特定的协议。这也意味着Appium可以非常容易地为任何现有的WebDriver实现创建封装驱动程序。例如,如果你查看[Appium的Safari驱动程序](https://github.com/appium/appium-safari-driver)代码,你会发现它基本上没有实现任何标准命令,因为所有这些命令都直接代理到一个底层的SafariDriver进程。
It's important to understand that this proxying business is sometimes happening under the hood,
because if you're ever diving into some open source driver code trying to figure out where
a command is implemented, you might be surprised to find no implementation at all in the Node.js
driver code itself! In that case, you'll need to figure out where commands are being proxied to so
you can look there for the appropriate implementation.
理解这种代理机制在幕后运行有时非常重要,因为如果你深入研究一些开源驱动程序代码,试图找出命令是在哪里实现的,你可能会惊讶地发现Node.js驱动程序代码中根本没有任何实现!在这种情况下,你需要弄清楚命令被代理到哪里,以便在那里查找相应的实现。
OK, that's enough for this very detailed introduction to drivers!
好了,这就是关于驱动程序的详细介绍的全部内容!
+105 -2
View File
@@ -1,6 +1,109 @@
---
title: Appium 项目历史
title: Appium项目历史
---
自2012年以来,Appium一直以某种形式存在。它受到各种个人和组织的指导,甚至以3种不同的编程语言实现!
欢迎了解比您想了解的更多关于Appium是如何成为今天的样子的..
TODO
## 早期灵感
[Dan Cuellar](https://twitter.com/thedancuellar)于2011年担任Zoosk的测试经理,当时他遇到了一个问题,iOS产品的测试通过时间已经失控。
减少测试是一种选择,但会带来额外的风险,特别是需要几天时间才能通过iOS App Store审查流程获得补丁。
他回想起自己在网站上工作的日子,意识到自动化就是答案。
Dan对现有的工具进行了调查,结果发现它们都存在重大缺陷。苹果公司提供的UIAutomation工具要求测试用JavaScript编写,不允许实时调试或解释。
它还必须在Xcode分析工具Instruments中执行。其他第三方工具使用私有API,并要求将SDK和HTTP服务器嵌入到应用程序中。这似乎非常不可取。
Dan对现有的选择不满意,他要求经理再给他一些时间,看看他是否能找到更好的方法。
他花了两周时间四处探索,看看是否有办法使用经过批准的苹果技术来自动化iOS应用程序。
他尝试的第一个实现是使用AppleScript通过OS X可访问性API向Mac UI元素发送消息。
这在一定程度上奏效了,但永远不会在真实设备上奏效,更不用说其他缺点了。
所以他想,如果我能让UIAutomation框架像解释器一样实时运行呢?他对此进行了研究,并确定他需要做的就是找到一种方法,
从UIAutomation javascript程序中接收、执行和回复命令。使用苹果提供的用于执行shell命令的实用程序,他能够按顺序扫描文本文件以接收命令,
`eval()`输出以执行命令,并用python将它们写回磁盘。然后,他用C#编写了实现Selenium风格语法的代码,以编写顺序排列的javascript命令。
iOSAuto诞生了。
## 2012年Selenium会议
Dan被选中在2012年伦敦的Selenium大会上演讲,讨论一个完全不同的话题。
在他的演讲中,他展示了如何使用Selenium语法进行iOS自动化,演示了编写平台无关的测试,同时使用具有共同接口的不同平台特定页面对象。
令他惊讶的是,这种酷炫的测试架构却被iOS测试像WebDriver测试一样运行的场面掩盖了。
几个人建议他在会议后再做一个闪电演讲,详细解释一下这个工作原理。
在会议的第二天,Dan登上舞台进行闪电演讲。Selenium的共同创始人Jason Huggins主持了闪电演讲。
Dan在加载演示文稿时遇到了技术问题,Jason差点转到下一个闪电演讲。就在最后一刻,屏幕打开了,Dan迅速进入了他的演讲。
他详细解释了他的实现细节和工作原理,恳求贡献者,并在五分钟内结束了演讲。观众礼貌地鼓掌,他离开了舞台。
## 电话响了
在Selenium大会四个月后,Jason给Dan打了电话。Jason一直在为Sauce Labs的一位客户提供iOS测试支持。
Jason记得Dan的闪电演讲,认为这个项目可能对Jason的工作有帮助,但Dan的源代码并没有公开。
于是Jason邀请Dan见一面。那一周的晚些时候,Dan在旧金山的一家酒吧遇到了Jason,并向他展示了iOSAuto的源代码。
Jason是一位长期的开源倡导者,他鼓励Dan在开源许可证下发布他的代码。
8月,Dan在GitHub上发布了C#版本的[源代码](https://github.com/penguinho/appium-old/commit/3ab56d3a5601897b2790b5256351f9b5af3f9e90)。
Jason鼓励Dan改变开发语言,使该项目对潜在贡献者更具吸引力。
Dan上传了基于Python实现的[新版本](https://github.com/penguinho/appium-old/commit/9b891207be0957bf209a77242750da17d3eb8eda)。
9月,Jason添加了一个Web服务器,并开始通过HTTP实现[WebDriver有线协议](https://github.com/hugs/appium-old/commit/ae8fe4578640d9af9137d0546190fa29317d1499),
使iOSAuto可以从任何语言的任何Selenium WebDriver客户端库编写脚本。
## 移动测试峰会
Jason决定在11月的[移动测试峰会](https://twitter.com/mobtestsummit)上展示该项目,但建议先给该项目取一个新名字。
许多想法被抛弃了,他们最终选择了AppleCart。一天后,当Jason在浏览苹果公司关于版权和商标的一些指导时,他注意到,
在苹果公司会捍卫其商标的名称示例部分,第一个例子是“AppleCart”。
他打电话给Dan,告知了这一情况,然后他们一起头脑风暴了一会儿,接着Jason突然想到了一个绝妙的主意。Appium... Selenium for Apps。
## Sauce Labs和Node.js
2013年1月,在移动测试峰会后不久,Sauce Labs决定全力支持Appium,并提供更多的开发能力,
他们成立了一个工作小组,评估了项目的当前状态以及如何更好地推进项目。
包括Jonathan Lipps(现任项目负责人)在内的团队认为Appium需要重生,并决定使用Node.js作为框架。
Node.js是众所周知的快速高效的web服务器后端,而归根结底,Appium只是一个高度专业化的web服务器。
同时JavaScript是一种非常容易使用的编程语言,这能让Appium比桌面上的其他选项,更容易地吸引更多开发者加入社区。
短短几天内,团队基于Appium的现有功能,开发了一个新版本的Appium,他的功能与之前的Python版本一样多。
这为Appium的基本架构奠定了基础,此后我们一直在此基础上成功地进行建设。
冲刺开发几周后,Jonathan Lipps被正式指定为项目负责人,他开始制定战略,如何让更多的人参与Appium的开发。
## Appium环游世界
最终Jonathan决定,让Appium在会议和聚会上,尽可能多的在开发人员面前展示,是吸引用户和贡献的最佳方式。
Appium在[2013年谷歌测试自动化大会](https://www.youtube.com/watch?v=1J0aXDbjiUE)上首次亮相。
2013年晚些时候,Appium在美国各地以及英国、波兰、葡萄牙和澳大利亚的会议和聚会上亮相。
值得注意的是,Jonathan让Appium[像乐队中的乐器一样进行表演](https://www.youtube.com/watch?v=zsbNVkayYRQ),
而Dan Cuellar为Selenium大会制作了一个有趣的[Appium视频混剪](https://www.youtube.com/watch?v=xkzrEn0v0II)。
在所有这些演讲和会议中,项目仍在继续发展。2013年初,我们发布了对Android和Selendroid的支持,使Appium成为第一个真正的跨平台自动化框架。
该项目也继续吸引用户和贡献者,到2013年底,我们已经有1000多个提交。
## 通往Appium 1.0之路
Appium开始显著生长和成熟。2014年5月,我们发布了Appium 1.0,这是Appium发展的一个里程碑。Appium获得了
[各种](http://sauceio.com/index.php/2014/01/appium-selected-as-a-black-duck-open-source-rookie-of-the-year/)
[奖项](http://sauceio.com/index.php/2014/10/appium-wins-a-bossy-award-from-infoworld/),
成为最受欢迎的开源跨平台移动自动化框架。稳定性得到改善,错误得到优先处理和修复,并添加了新的功能。
Sauce Labs增加了捐赠给Appium开发人员的数量,但整个社区都参与了项目的指导和贡献,
项目治理继续在公开的公共邮件列表和GitHub的问题跟踪器上进行。
## Appium的生态圈在扩大
很明显Appium的代码库,并没有为一个由分散的、不定时贡献者组成的大型团队进行优化。我们作为提交者抓住了这个机会,从头开始重写Appium,
使用更现代的JavaScript语言版本,并重新设计了Appium的架构,以便用户或第三方开发者能够轻松构建他们自己的Appium驱动程序。
我们希望新的贡献者能够更容易地熟悉Appium的代码库,并看到,除了核心团队之外,还有其他团体为Appium增加对新平台的支持。
这一愿景已经开始实现,像微软和Youi.tv这样的团队,分别为Windows桌面应用自动化和Youi.tv应用自动化增加了驱动程序。
谁知道接下来会添加哪些平台呢?
## Appium走向大众
在2016年末,Sauce Labs将Appium作为一个项目捐赠给了[JS Foundation](https://js.foundation),
以此来向世界证明Sauce致力于保持Appium的开源状态。JS Foundation是一个非营利性的开源管理组织,负责持有开源项目的版权,并确保它们在社区中能够长期地发展。
随着我们转移到这个非营利性基金会,我们希望对新的参与者能够更加敞开大门,无论是作为个人还是作为对Appium发展感兴趣的众多公司之一。
最终,JS Foundation合并到了[OpenJS Foundation](https://openjsf.org)中,而Appium是该基金会的一个有影响力的项目。
## Appium 2.0
Appium 2于2023年发布,它将重点放在将Appium作为一个生态系统而不是单一的项目上。任何人都可以开发和共享驱动程序和插件,
这为实现iOS和Android之外的平台自动化开发,开辟了无限的可能性。
@@ -2,28 +2,23 @@
hide:
- toc
title: System Requirements
title: 系统要求
---
The basic requirements for the Appium server are:
Appium服务器的基本要求是:
* A macOS, Linux, or Windows operating system
* [Node.js](https://nodejs.org) version in the [SemVer](https://semver.org) range `^14.17.0 || ^16.13.0 || >=18.0.0`
* LTS is recommended
* [`npm`](https://npmjs.com) version `>=8` (`npm` is usually bundled with Node.js, but can be upgraded
independently)
* macOS、Linux或Windows操作系统
* [Node.js](https://nodejs.org) 版本在 `^14.17.0 || ^16.13.0 || >=18.0.0` 范围内
* 推荐使用LTS版本
* [`npm`](https://npmjs.com) 版本 `>=8` (`npm` 通常与Node.js捆绑在一起,但可以独立升级)
By itself, Appium is relatively lightweight and doesn't have significant disk space or RAM
requirements. It can even be run in resource-constrained environments like Raspberry Pi, so long as
Node.js is available.
Appium本身相对轻量级,并且没有大量的磁盘空间或RAM要求。
只要Node.js可用,它甚至可以在Raspberry Pi等资源有限的环境中运行。
### Driver Requirements
### 驱动程序要求
Drivers for automating specific platforms will likely have other requirements. Refer to the
documentation of the [Appium driver(s)](../ecosystem/drivers.md) for that platform for additional
dependencies. It is almost universally the case that Appium drivers for a given platform will
require the developer toolchain and SDKs for that platform to be installed.
自动化特定平台的驱动程序可能还有其他要求。有关其他依赖关系,请参阅该平台的[Appium驱动程序](../ecosystem/drivers.md)文档。
一般情况下,给定平台的Appium驱动程序需要安装该平台的开发人员工具链和SDK。
In order to assist with driver requirements, each (official) driver comes with the Appium Doctor tool,
which allows to verify if all requirements have been set up. Learn more about how to use this tool in
the [Command-Line Usage documentation](../cli/extensions.md#doctor).
为了协助满足驱动程序的要求,每个官方驱动程序都会配备 Appium Doctor 工具,该工具用于验证当前配置是否已满足驱动程序的所有要求。
您可以在[命令行使用文档](../cli/extensions.md#doctor)中了解更多关于如何使用这个工具的信息。
@@ -2,13 +2,14 @@
hide:
- toc
title: Write a Test (.NET)
title: 编写一个测试(.NET)
---
The [Appium .NET 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/).
[Appium.NET 客户端](https://github.com/appium/dotnet-client/)是 C# 中的官方 Appium 客户端。
此驱动程序是 Selenium C# 客户端的扩展。它具有常规驱动程序的所有功能,并在此基础上添加了Appium特定的方法。
该驱动程序可在 NuGet Gallery 上以[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.
现在,我们进入该目录并创建一个新的[NUnit](https://nunit.org/)项目。我们还将添加对 Appium.NET 驱动程序的引用和其他依赖项。
```bash
cd dotnet-client
@@ -16,12 +17,12 @@ dotnet new nunit --name appiumtest
cd appiumtest
# This will install the latest 5.x version
# 这将安装最新的5.x版本
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.
完成此操作后,您的项目应该有一个占位符文件`UnitTest1.cs`。我们将替换代码,以包含OpenQA名称空间、驱动程序的初始化和实际测试。
```C# title="UnitTest1.cs"
using OpenQA.Selenium;
@@ -47,7 +48,7 @@ public class Tests
driverOptions.AddAdditionalAppiumOption("appPackage", "com.android.settings");
driverOptions.AddAdditionalAppiumOption("appActivity", ".Settings");
// NoReset assumes the app com.google.android is preinstalled on the emulator
// NoReset假设模拟器上预装了com.google.android应用程序
driverOptions.AddAdditionalAppiumOption("noReset", true);
_driver = new AndroidDriver(serverUri, driverOptions, TimeSpan.FromSeconds(180));
@@ -69,37 +70,31 @@ public class Tests
}
```
!!! 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.
本指南不包括对.NET客户端库或这里发生的一切进行完整的概述,因此我们暂时不详细解释代码本身。
除了熟悉[dotnet客户端驱动程序文档](https://github.com/appium/dotnet-client/)外,
您可能还想阅读[Appium功能](../guides/caps.md)文档,以更全面地解释您看到的各种API命令及其用途。
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.
1. 定义一组要发送到Appium服务器的“能力”(参数),以便Appium知道您想要自动化什么。其中一些参数可以使用环境变量覆盖。
1. 在内置的Android设置应用程序上启动Appium会话。
1. 找到“电池”列表项并单击它。
1. 结束Appium会话。
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:
就是这样!让我们试试。在运行测试之前,请确保您在另一个终端会话中运行了 Appium 服务器,否则您将收到无法连接到该服务器的错误。然后,您可以执行脚本:
```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](./next-steps.md) to explore.
恭喜,您已经开始了您的Appium之旅!请继续阅读,了解[下一步](./next-steps.md)要探索的内容。
+33 -38
View File
@@ -2,82 +2,77 @@
hide:
- toc
title: Write a Test (Ruby)
title: 编写一个测试(Ruby)
---
[AppiumLib](https://github.com/appium/ruby_lib) 和 [AppiumLibCore](https://github.com/appium/ruby_lib_core)(**推荐**)是 Ruby 中的官方 Appium 客户端库,
它们可以通过 gem 在 [appium_lib](https://rubygems.org/gems/appium_lib) 和 [appium_lib_core](https://rubygems.org/gems/appium_lib_core) 包名称下获得。
appium_lib_core 继承自 Selenium Ruby,appium_lib 继承自 appium_lib_core,因此安装这些库时包括 Selenium 绑定。
如果您需要不太复杂的客户端解决方案,我们建议您使用`appium_lib_core`。`appium_lib`有一些`appium_lib_core`没有的有用方法,
但代价是更高的复杂性和历史方法,这些方法可能无法在最新环境中工作。
The [AppiumLib](https://github.com/appium/ruby_lib) and the [AppiumLibCore](https://github.com/appium/ruby_lib_core) (**recommended**) are official Appium client libraries in Ruby, which are available via gem under the [appium_lib](https://rubygems.org/gems/appium_lib) and the [appium_lib_core](https://rubygems.org/gems/appium_lib_core) package names. The appium_lib_core inherits from the Selenium Ruby Binding, and the appium_lib inherits from the appium_lib_core, so installing these libraries include the selenium binding. We recommend `appium_lib_core` if you need a less complex client-side solution. The `appium_lib` has some useful methods the core does not have, but for the cost of greater complexity and historical methods which may not work in the latest environment.
As the first step, let's initialize a Gemfile to manage the dependency:
第一步,让我们初始化Gemfile来管理依赖项:
```bash
bundle init
```
Then, you could add Appium Ruby Client dependency as below:
然后,您可以添加Appium Ruby客户端依赖项,如下所示:
```bash
bundle add appium_lib_core
# or
# 或
# bundle add appium_lib
```
Test code example below uses `test-unit` module, thus please run:
下面的测试代码示例使用`test-unit`模块,因此请运行:
```bash
bundle add test-unit
```
Once these steps has done, your `Gemfile` file should include:
完成这些步骤后,您的`Gemfile`文件应该包括:
```ruby title="Gemfile"
--8<-- "./sample-code/quickstarts/rb/Gemfile"
```
The `appium_lib_core` is the main part as an Appium client.
`appium_lib` has various helper methods, but the driver instance was ordinary designed to be used as a global variable. It could causes an issue to handle the instance.
`appium_lib_core` does not have such a global variable.
`appium_lib_core`是 appium 客户端的主要部分。`appium_lib`有各种辅助方法,但驱动程序实例通常被设计为全局变量。
这可能会导致处理实例时出现问题。`appiumlib_core`中没有这样的全局变量。
This example is by the `appium_lib_core` with `test-unit` gem module.
Tes code in `appium_lib` should be similar.
这个例子使用了`appium_lib_core`和`test-unit`gem 模块。使用`appium_lib`的代码应该类似。
```ruby title="test.rb"
--8<-- "./sample-code/quickstarts/rb/test.rb"
```
!!! note
!!! 注意
It's not within the scope of this guide to give a complete run-down on the Ruby client
library or everything that's happening here, so we'll leave the code itself unexplained in detail for now.
本指南不包括对Ruby客户端库或这里发生的一切进行完整的概述,因此我们暂时不详细解释代码本身。
- 您可能想特别了解[Appium功能](../guides/caps.md)。
- 在 appium_lib_core 的 GitHub 仓库中,[功能测试代码](https://github.com/appium/ruby_lib_core/tree/master/test/functional)里可以找到更多的示例。
- 在[appium_lib_core](https://www.rubydoc.info/github/appium/ruby_lib_core) 和 [appium_lib](https://www.rubydoc.info/github/appium/ruby_lib) 的文档中也可以帮你找到可用的方法。
!!! 注意
- You may want to read up particularly on Appium [Capabilities](../guides/caps.md).
- [functional test code](https://github.com/appium/ruby_lib_core/tree/master/test/functional) in the appium_lib_core GitHub repository should help to find more working example.
- Documentation [appium_lib_core](https://www.rubydoc.info/github/appium/ruby_lib_core) and [appium_lib](https://www.rubydoc.info/github/appium/ruby_lib) also helps to find available methods.
示例代码可从[GitHub Appium存储库](https://github.com/appium/appium/tree/master/packages/appium/sample-code/quickstarts/rb)获得。
!!! note
基本上,这段代码正在执行以下操作:
The sample code is available from [GitHub Appium repository](https://github.com/appium/appium/tree/master/packages/appium/sample-code/quickstarts/rb).
1. 定义一组要发送到Appium服务器的“能力”(参数),以便Appium知道您想要自动化什么。
1. 在内置的Android设置应用程序上启动Appium会话。
1. 找到“电池”列表项并单击它。
1. 暂停片刻,纯粹是为了视觉效果。
1. 结束Appium会话。
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.
1. Starting an Appium session on the built-in Android settings app.
1. Finding the "Battery" list item and clicking it.
1. Pausing for a moment purely for visual effect.
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:
就是这样!让我们试试。在运行测试之前,请确保您在另一个终端会话中运行了 Appium 服务器,否则您将收到无法连接到该服务器的错误。然后,您可以执行脚本:
```bash
# Please run "bundle install" first if your environment has not run the installation command yet.
# 如果您的环境尚未运行安装命令,请首先运行“bundle install”。
bundle exec ruby test.rb
```
If all goes well, you'll see the Settings app open up and navigate to the "Battery" view before the
app closes again.
如果一切顺利,您会看到“设置”应用程序打开,并导航到“电池”视图,然后应用程序关闭。
Congratulations, you've started your Appium journey! Read on for some [next steps](./next-steps.md) to explore.
恭喜,您已经开始了您的Appium之旅!请继续阅读,了解[下一步](./next-steps.md)要探索的内容。
+35 -4
View File
@@ -15,11 +15,19 @@ import {
promoteAppiumOptionsForObject,
} from '@appium/base-driver';
import AsyncLock from 'async-lock';
import {parseCapsForInnerDriver, pullSettings, makeNonW3cCapsError} from './utils';
import {
parseCapsForInnerDriver,
pullSettings,
makeNonW3cCapsError,
isBroadcastIp,
fetchInterfaces,
V4_BROADCAST_IP,
} from './utils';
import {util, node, logger} from '@appium/support';
import {getDefaultsForExtension} from './schema';
import {DRIVER_TYPE, BIDI_BASE_PATH, BIDI_EVENT_NAME} from './constants';
import WebSocket from 'ws';
import os from 'node:os';
const MIN_WS_CODE_VAL = 1000;
const MAX_WS_CODE_VAL = 1015;
@@ -773,9 +781,13 @@ class AppiumDriver extends DriverCore {
// information here!
if (dCaps.webSocketUrl && driverInstance.doesSupportBidi) {
const {address, port, basePath} = this.args;
const isUsingSsl = this.args.sslCertificatePath && this.args.sslKeyPath;
const scheme = isUsingSsl ? 'wss' : 'ws';
const bidiUrl = `${scheme}://${address}:${port}${basePath}${BIDI_BASE_PATH}/${innerSessionId}`;
const scheme = `ws${this.server.isSecure() ? 's' : ''}`;
const host = determineBiDiHost(address);
const bidiUrl = `${scheme}://${host}:${port}${basePath}${BIDI_BASE_PATH}/${innerSessionId}`;
this.log.info(
`Upstream driver responded with webSocketUrl ${dCaps.webSocketUrl}, will rewrite to ` +
`${bidiUrl} for response to client`
);
// @ts-ignore webSocketUrl gets sent by the client as a boolean, but then it is supposed
// to come back from the server as a string. TODO figure out how to express this in our
// capability constraint system
@@ -1271,6 +1283,25 @@ function isAppiumDriverCommand(cmd) {
return !isSessionCommand(cmd) || cmd === DELETE_SESSION_COMMAND;
}
/**
* Clients cannot use broadcast addresses, like 0.0.0.0 or ::
* to create connections. Thus we prefer a hostname if such
* address is provided or the actual address of a non-local interface,
* in case the host only has one such interface.
*
* @param {string} address
* @returns {string}
*/
function determineBiDiHost(address) {
if (!isBroadcastIp(address)) {
return address;
}
const nonLocalInterfaces = fetchInterfaces(address === V4_BROADCAST_IP ? 4 : 6)
.filter((iface) => !iface.internal);
return nonLocalInterfaces.length === 1 ? nonLocalInterfaces[0].address : os.hostname();
}
/**
* Thrown when Appium tried to proxy a command using a driver's `proxyCommand` method but the
* method did not exist
+1 -1
View File
@@ -344,7 +344,7 @@ function formatTimestamp(args) {
* @param {string} text
* @returns {string}
*/
function stripColorCodes(text) {
export function stripColorCodes(text) {
return text.replace(COLOR_CODE_PATTERN, '');
}
+3 -3
View File
@@ -39,8 +39,8 @@ import {
isServerCommandArgs,
fetchInterfaces,
V4_BROADCAST_IP,
V6_BROADCAST_IP,
isSetupCommandArgs,
isBroadcastIp,
} from './utils';
import net from 'node:net';
@@ -321,7 +321,7 @@ async function init(args) {
function logServerAddress(url) {
const urlObj = new URL(url);
logger.info(`Appium REST http interface listener started on ${url}`);
if (![V4_BROADCAST_IP, V6_BROADCAST_IP, `[${V6_BROADCAST_IP}]`].includes(urlObj.hostname)) {
if (!isBroadcastIp(urlObj.hostname)) {
return;
}
@@ -447,7 +447,7 @@ async function main(args) {
});
}
const protocol = 'secure' in server && server.secure ? 'https' : 'http';
const protocol = server.isSecure() ? 'https' : 'http';
const address = net.isIPv6(parsedArgs.address) ? `[${parsedArgs.address}]` : parsedArgs.address;
logServerAddress(
`${protocol}://${address}:${parsedArgs.port}${normalizeBasePath(parsedArgs.basePath)}`,
+16 -16
View File
@@ -40,7 +40,7 @@ export function makeNonW3cCapsError() {
*
* @todo May want to force color to be `false` if {@link isStdoutTTY} is `false`.
*/
const inspect = _.flow(
export const inspect = _.flow(
_.partialRight(
/** @type {(object: any, options: import('util').InspectOptions) => string} */ (dump),
{colors: true, depth: null, compact: !isStdoutTTY}
@@ -62,7 +62,7 @@ const inspect = _.flow(
* @param {NSCapabilities<C>} [defaultCapabilities]
* @returns {ParsedDriverCaps<C,J>|InvalidCaps<C,J>}
*/
function parseCapsForInnerDriver(
export function parseCapsForInnerDriver(
jsonwpCapabilities,
w3cCapabilities,
constraints = /** @type {C} */ ({}),
@@ -182,7 +182,7 @@ function parseCapsForInnerDriver(
* @param {Capabilities<C>} caps - Desired capabilities object
* @returns {NSCapabilities<C>}
*/
function insertAppiumPrefixes(caps) {
export function insertAppiumPrefixes(caps) {
return /** @type {NSCapabilities<C>} */ (
_.mapKeys(caps, (_, key) =>
STANDARD_CAPS_LOWERCASE.has(key.toLowerCase()) || key.includes(':')
@@ -197,7 +197,7 @@ function insertAppiumPrefixes(caps) {
* @param {NSCapabilities<C>} caps
* @returns {Capabilities<C>}
*/
function removeAppiumPrefixes(caps) {
export function removeAppiumPrefixes(caps) {
return /** @type {Capabilities<C>} */ (_.mapKeys(caps, (_, key) => removeAppiumPrefix(key)));
}
@@ -215,7 +215,7 @@ function removeAppiumPrefix(key) {
* @param {string} pkgName
* @returns {string|undefined}
*/
function getPackageVersion(pkgName) {
export function getPackageVersion(pkgName) {
const pkgInfo = require(`${pkgName}/package.json`) || {};
return pkgInfo.version;
}
@@ -227,7 +227,7 @@ function getPackageVersion(pkgName) {
* for more details.
* @returns {void}
*/
function adjustNodePath() {
export function adjustNodePath() {
const selfRoot = node.getModuleRootSync('appium', __filename);
if (!selfRoot || path.dirname(selfRoot).length >= selfRoot.length) {
return;
@@ -297,7 +297,7 @@ function adjustNodePath() {
* setting items or a dictionary containing parsed Appium setting names along with
* their values.
*/
function pullSettings(caps) {
export function pullSettings(caps) {
if (!_.isPlainObject(caps) || _.isEmpty(caps)) {
return {};
}
@@ -447,15 +447,15 @@ export function adler32(str, seed = null) {
return ((b % 65521) << 16) | (a % 65521);
}
export {
inspect,
parseCapsForInnerDriver,
insertAppiumPrefixes,
getPackageVersion,
pullSettings,
removeAppiumPrefixes,
adjustNodePath,
};
/**
* Checks if the provided address is a broadcast one.
*
* @param {string} address
* @returns {boolean}
*/
export function isBroadcastIp(address) {
return [V4_BROADCAST_IP, V6_BROADCAST_IP, `[${V6_BROADCAST_IP}]`].includes(address);
}
/**
* @typedef {import('@appium/types').StringRecord} StringRecord
+12 -11
View File
@@ -1,6 +1,6 @@
{
"name": "appium",
"version": "2.11.3",
"version": "2.11.5",
"description": "Automation for Apps.",
"keywords": [
"automation",
@@ -51,6 +51,7 @@
"dev:docs:en": "appium-docs build --serve --mkdocs-yml ./docs/mkdocs-en.yml",
"dev:docs:ja": "appium-docs build --serve --mkdocs-yml ./docs/mkdocs-ja.yml",
"dev:docs:zh": "appium-docs build --serve --mkdocs-yml ./docs/mkdocs-zh.yml",
"install-docs-deps": "appium-docs init --no-mkdocs",
"postinstall": "node ./scripts/autoinstall-extensions.js",
"publish:docs": "cross-env APPIUM_DOCS_PUBLISH=1 npm run build:docs",
"test": "npm run test:unit",
@@ -59,14 +60,14 @@
"test:unit": "mocha \"./test/unit/**/*.spec.js\""
},
"dependencies": {
"@appium/base-driver": "^9.11.3",
"@appium/base-plugin": "^2.2.43",
"@appium/docutils": "^1.0.19",
"@appium/base-driver": "^9.11.5",
"@appium/base-plugin": "^2.2.45",
"@appium/docutils": "^1.0.21",
"@appium/logger": "^1.6.1",
"@appium/schema": "^0.6.1",
"@appium/support": "^5.1.3",
"@appium/types": "^0.21.2",
"@sidvind/better-ajv-errors": "2.1.3",
"@appium/support": "^5.1.4",
"@appium/types": "^0.21.3",
"@sidvind/better-ajv-errors": "3.0.1",
"@types/argparse": "2.0.16",
"@types/bluebird": "3.5.42",
"@types/semver": "7.5.8",
@@ -77,7 +78,7 @@
"argparse": "2.0.1",
"async-lock": "1.4.1",
"asyncbox": "3.0.0",
"axios": "1.7.3",
"axios": "1.7.7",
"bluebird": "3.7.2",
"cross-env": "7.0.3",
"lilconfig": "3.1.2",
@@ -89,11 +90,11 @@
"semver": "7.6.3",
"source-map-support": "0.5.21",
"teen_process": "2.2.0",
"type-fest": "4.23.0",
"winston": "3.13.1",
"type-fest": "4.26.1",
"winston": "3.14.2",
"wrap-ansi": "7.0.0",
"ws": "8.18.0",
"yaml": "2.5.0"
"yaml": "2.5.1"
},
"engines": {
"node": "^14.17.0 || ^16.13.0 || >=18.0.0",
@@ -1,5 +1,5 @@
{
"devDependencies": {
"webdriverio": "8.40.0"
"webdriverio": "8.40.5"
}
}
+7 -12
View File
@@ -9,6 +9,7 @@ import {
EXECUTABLE,
runAppiumRaw,
} from './e2e-helpers';
import { stripColorCodes } from '../../lib/logsink';
describe('argument parsing', function () {
/**
@@ -68,23 +69,17 @@ describe('argument parsing', function () {
describe('when the user provides an string where a number was expected', function () {
describe('when color output is supported', function () {
it('should output a fancy error message', async function () {
const [{stderr: actual}, expected] = await B.all([
runAppiumRaw(appiumHome, ['--port=sheep'], {
env: {FORCE_COLOR: '1'},
}),
readAppiumArgErrorFixture('cli/cli-error-output-color.txt'),
]);
expect(formatAppiumArgErrorOutput(actual)).to.equal(expected);
const {stderr: actual} = await runAppiumRaw(appiumHome, ['--port=sheep'], {
env: {FORCE_COLOR: '1'},
});
expect(stripColorCodes(actual)).to.not.equal(actual);
});
});
describe('when color output is unsupported', function () {
it('should output a colorless yet fancy error message', async function () {
const [{stderr: actual}, expected] = await B.all([
runAppiumRaw(appiumHome, ['--port=sheep'], {}),
readAppiumArgErrorFixture('cli/cli-error-output.txt'),
]);
expect(formatAppiumArgErrorOutput(actual)).to.equal(expected);
const {stderr: actual} = await runAppiumRaw(appiumHome, ['--port=sheep'], {});
expect(stripColorCodes(actual)).to.equal(actual);
});
});
});
@@ -1,2 +0,0 @@
> 1 | "sheep"
  | ^^^^^^^ 👈🏽 type must be integer
@@ -1,2 +0,0 @@
> 1 | "sheep"
| ^^^^^^^ 👈🏽 type must be integer
+31
View File
@@ -3,6 +3,37 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [9.11.5](https://github.com/appium/appium/compare/@appium/base-driver@9.11.4...@appium/base-driver@9.11.5) (2024-09-26)
### Bug Fixes
* **appium:** Return hostname as web socket url for BiDi if a broadcast address is assigned to the server ([#20603](https://github.com/appium/appium/issues/20603)) ([f0de55d](https://github.com/appium/appium/commit/f0de55da0da2fc0305876a948704c1f0a2a5990f))
* **driver-test-support:** update definitelytyped ([#20605](https://github.com/appium/appium/issues/20605)) ([da7a4fd](https://github.com/appium/appium/commit/da7a4fdce8790bc59370bfe4b912c7c0c403c713))
## [9.11.4](https://github.com/appium/appium/compare/@appium/base-driver@9.11.3...@appium/base-driver@9.11.4) (2024-09-16)
### Bug Fixes
* **base-driver:** Add a server flag to check if it operates a secure protocol ([#20449](https://github.com/appium/appium/issues/20449)) ([622b245](https://github.com/appium/appium/commit/622b245ea38793280d9785a59a0416ce025862fe))
* **base-driver:** update dependency body-parser to v1.20.3 ([056baba](https://github.com/appium/appium/commit/056baba3a0c51973d5e834283355821eced6ee17))
* **base-driver:** update dependency express to v4.20.0 ([ef163eb](https://github.com/appium/appium/commit/ef163eb8df512e89f4e62c99b32fc979008fcfaa))
* **base-driver:** update dependency express to v4.21.0 ([cb9fb9c](https://github.com/appium/appium/commit/cb9fb9c6fef608e29284210be27356a488f4002c))
* **base-driver:** update dependency path-to-regexp to v8 ([#20520](https://github.com/appium/appium/issues/20520)) ([63cb664](https://github.com/appium/appium/commit/63cb664af13d7411ff325095cd0e9b6fd24363c3))
* **base-driver:** update dependency path-to-regexp to v8.1.0 ([#20562](https://github.com/appium/appium/issues/20562)) ([1cae549](https://github.com/appium/appium/commit/1cae549a7be5138e980af6661b96cd7d6268fdb0))
* **support:** update dependency axios to v1.7.4 ([d17d022](https://github.com/appium/appium/commit/d17d0222245ab94a78e578c0398734e65a89ba68))
* **support:** update dependency axios to v1.7.5 ([fedabb1](https://github.com/appium/appium/commit/fedabb1fdc7af10f9e4b06ea23815c4bc7c6bf5e))
* **support:** update dependency axios to v1.7.7 ([7fe67a2](https://github.com/appium/appium/commit/7fe67a286a15a917ce3b1b47a08e982e65bbd9e4))
* **types:** update dependency type-fest to v4 ([#20467](https://github.com/appium/appium/issues/20467)) ([482a1f7](https://github.com/appium/appium/commit/482a1f7bbfbf6478ee09bb1668b830ddbf13b143))
* **types:** update dependency type-fest to v4 ([#20471](https://github.com/appium/appium/issues/20471)) ([9a66f48](https://github.com/appium/appium/commit/9a66f4800141cc86c90d58ca1103bab0066081bc))
* **types:** update dependency type-fest to v4 ([#20548](https://github.com/appium/appium/issues/20548)) ([5b8cb76](https://github.com/appium/appium/commit/5b8cb76ea3cda75095e79c91539be73feeadf869))
* **types:** update dependency type-fest to v4.26.0 ([#20511](https://github.com/appium/appium/issues/20511)) ([8f20c97](https://github.com/appium/appium/commit/8f20c973f4a6d3380163b6afd7f113808453a62d))
## [9.11.3](https://github.com/appium/appium/compare/@appium/base-driver@9.11.2...@appium/base-driver@9.11.3) (2024-08-07)
+12 -1
View File
@@ -144,8 +144,19 @@ export class BaseDriver<
}
};
const synchronizationKey = BaseDriver.name;
// eslint-disable-next-line dot-notation
const commandsQueueLen: number = this.commandsQueueGuard['queues']?.[synchronizationKey]?.length ?? 0;
if (this.isCommandsQueueEnabled && commandsQueueLen > 0) {
this.log.debug(
`Scheduling the '${cmd}' command to the ${this.constructor.name} commands queue. ` +
`${util.pluralize('queue item', commandsQueueLen, true)} ${commandsQueueLen === 1 ? 'is' : 'are'} ` +
`already waiting for execution.`
);
}
const res = this.isCommandsQueueEnabled
? await this.commandsQueueGuard.acquire(BaseDriver.name, runCommandPromise)
? await this.commandsQueueGuard.acquire(synchronizationKey, runCommandPromise)
: await runCommandPromise();
// log timing information about this command
@@ -2,7 +2,7 @@ import _ from 'lodash';
import log from './logger';
import {errors} from '../protocol';
export {handleIdempotency} from './idempotency';
import {pathToRegexp} from 'path-to-regexp';
import {match} from 'path-to-regexp';
import {util} from '@appium/support';
import {calcSignature} from '../helpers/session';
@@ -119,7 +119,7 @@ export function handleUpgrade(webSocketsMapping) {
currentPathname = req.url ?? '';
}
for (const [pathname, wsServer] of _.toPairs(webSocketsMapping)) {
if (pathToRegexp(pathname).test(currentPathname)) {
if (match(pathname)(currentPathname)) {
return wsServer.handleUpgrade(req, req.socket, Buffer.from(''), (ws) => {
wsServer.emit('connection', ws, req);
});
@@ -201,6 +201,10 @@ function configureHttp({httpServer, reject, keepAliveTimeout}) {
appiumServer.removeWebSocketHandler = removeWebSocketHandler;
appiumServer.removeAllWebSocketHandlers = removeAllWebSocketHandlers;
appiumServer.getWebSocketHandlers = getWebSocketHandlers;
appiumServer.isSecure = function isSecure() {
// eslint-disable-next-line dot-notation
return Boolean(this['_spdyState']?.secure);
};
// http.Server.close() only stops new connections, but we need to wait until
// all connections are closed and the `close` event is emitted
@@ -18,7 +18,6 @@ import https from 'https';
const DEFAULT_LOG = logger.getLogger('WD Proxy');
const DEFAULT_REQUEST_TIMEOUT = 240000;
const COMPACT_ERROR_PATTERNS = [/\bECONNREFUSED\b/, /socket hang up/];
const {MJSONWP, W3C} = PROTOCOLS;
@@ -271,11 +270,7 @@ class JWProxy {
}
} else {
proxyErrorMsg = `Could not proxy command to the remote server. Original error: ${e.message}`;
if (COMPACT_ERROR_PATTERNS.some((p) => p.test(e.message))) {
this.log.info(e.message);
} else {
this.log.info(e.stack);
}
this.log.info(e.message);
}
throw new errors.ProxyRequestError(proxyErrorMsg, e.response?.data, e.response?.status);
}
+3 -3
View File
@@ -3,7 +3,7 @@
import _ from 'lodash';
import {util} from '@appium/support';
import {PROTOCOLS, DEFAULT_BASE_PATH} from '../constants';
import {pathToRegexp} from 'path-to-regexp';
import {match} from 'path-to-regexp';
const SET_ALERT_TEXT_PAYLOAD_PARAMS = {
validate: (jsonObj) =>
@@ -952,8 +952,8 @@ export function routeToCommandName(endpoint, method, basePath = DEFAULT_BASE_PAT
possiblePathnames.push(normalizedPathname);
const normalizedMethod = _.toUpper(method);
for (const [routePath, routeSpec] of _.toPairs(METHOD_MAP)) {
const routeRegexp = pathToRegexp(routePath);
if (possiblePathnames.some((pp) => routeRegexp.test(pp))) {
const routeMatcher = match(routePath);
if (possiblePathnames.some((pp) => routeMatcher(pp))) {
const commandName = routeSpec?.[normalizedMethod]?.command;
if (commandName) {
return commandName;
+9 -9
View File
@@ -1,6 +1,6 @@
{
"name": "@appium/base-driver",
"version": "9.11.3",
"version": "9.11.5",
"description": "Base driver class for Appium drivers",
"keywords": [
"automation",
@@ -44,30 +44,30 @@
"test:types": "tsd"
},
"dependencies": {
"@appium/support": "^5.1.3",
"@appium/types": "^0.21.2",
"@appium/support": "^5.1.4",
"@appium/types": "^0.21.3",
"@colors/colors": "1.6.0",
"@types/async-lock": "1.4.2",
"@types/bluebird": "3.5.42",
"@types/express": "4.17.21",
"@types/lodash": "4.17.7",
"@types/lodash": "4.17.9",
"@types/method-override": "0.0.35",
"@types/serve-favicon": "2.5.7",
"async-lock": "1.4.1",
"asyncbox": "3.0.0",
"axios": "1.7.3",
"axios": "1.7.7",
"bluebird": "3.7.2",
"body-parser": "1.20.2",
"express": "4.19.2",
"body-parser": "1.20.3",
"express": "4.21.0",
"http-status-codes": "2.3.0",
"lodash": "4.17.21",
"lru-cache": "10.4.3",
"method-override": "3.0.0",
"morgan": "1.10.0",
"path-to-regexp": "7.1.0",
"path-to-regexp": "8.1.0",
"serve-favicon": "2.5.0",
"source-map-support": "0.5.21",
"type-fest": "4.23.0",
"type-fest": "4.26.1",
"validate.js": "0.13.1"
},
"optionalDependencies": {
@@ -46,10 +46,9 @@ describe('Websockets (e2e)', function () {
_.keys(await baseServer.getWebSocketHandlers()).length.should.eql(1);
await new B((resolve, reject) => {
const client = new WebSocket(`ws://${TEST_HOST}:${port}${endpoint}`);
client.once('connection', (ws, req) => {
client.once('upgrade', (res) => {
try {
ws.should.not.be.empty;
req.connection.remoteAddress.should.not.be.empty;
res.statusCode.should.eql(101);
} catch (e) {
reject(e);
}
@@ -1,4 +1,4 @@
import {pathToRegexp} from 'path-to-regexp';
import {match} from 'path-to-regexp';
describe('middleware', function () {
before(async function () {
@@ -6,19 +6,19 @@ describe('middleware', function () {
chai.should();
});
describe('pathToRegexp', function () {
describe('match', function () {
it('should match static path pattern', function () {
const pathname = '/ws/session/1234/appium/device/syslog';
const url = 'ws://127.0.0.1:8000/ws/session/1234/appium/device/syslog';
const currentPathname = new URL(url).pathname;
pathToRegexp(pathname).test(currentPathname).should.be.true;
match(pathname)(currentPathname).should.not.be.false;
});
it('should match dynamic path pattern', function () {
const pathname = '/ws/session/:sessionId/appium/device/syslog';
const url = 'ws://127.0.0.1:8000/ws/session/1234/appium/device/syslog';
const currentPathname = new URL(url).pathname;
pathToRegexp(pathname).test(currentPathname).should.be.true;
match(pathname)(currentPathname).should.not.be.false;
});
});
});
+16
View File
@@ -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.45](https://github.com/appium/appium/compare/@appium/base-plugin@2.2.44...@appium/base-plugin@2.2.45) (2024-09-26)
**Note:** Version bump only for package @appium/base-plugin
## [2.2.44](https://github.com/appium/appium/compare/@appium/base-plugin@2.2.43...@appium/base-plugin@2.2.44) (2024-09-16)
**Note:** Version bump only for package @appium/base-plugin
## [2.2.43](https://github.com/appium/appium/compare/@appium/base-plugin@2.2.42...@appium/base-plugin@2.2.43) (2024-08-07)
**Note:** Version bump only for package @appium/base-plugin
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@appium/base-plugin",
"version": "2.2.43",
"version": "2.2.45",
"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.11.3",
"@appium/support": "^5.1.3"
"@appium/base-driver": "^9.11.5",
"@appium/support": "^5.1.4"
},
"engines": {
"node": "^14.17.0 || ^16.13.0 || >=18.0.0",
+11
View File
@@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [2.1.11](https://github.com/appium/appium/compare/@appium/doctor@2.1.10...@appium/doctor@2.1.11) (2024-09-16)
### Bug Fixes
* **doctor:** update dependency appium-adb to v12.5.2 ([db28605](https://github.com/appium/appium/commit/db286055324c980459f12163ec8253c0b90c1754))
* **doctor:** update dependency appium-adb to v12.5.3 ([048ce52](https://github.com/appium/appium/commit/048ce520d83f31ceab393f5fe46588274fd2ef56))
* **doctor:** update dependency appium-adb to v12.6.0 ([42d7ed8](https://github.com/appium/appium/commit/42d7ed8afe199584cb3850b4a5826d0cb1dc8dc2))
## [2.1.10](https://github.com/appium/appium/compare/@appium/doctor@2.1.9...@appium/doctor@2.1.10) (2024-08-07)
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@appium/doctor",
"version": "2.1.10",
"version": "2.1.11",
"description": "Test environment for fitness to run Appium",
"keywords": [
"automation",
@@ -44,11 +44,11 @@
"test:unit": "mocha \"./test/unit/**/*.spec.js\""
},
"dependencies": {
"@appium/support": "^5.1.3",
"@appium/support": "^5.1.4",
"@colors/colors": "1.6.0",
"@types/bluebird": "3.5.42",
"@types/teen_process": "2.0.4",
"appium-adb": "12.5.1",
"appium-adb": "12.6.0",
"bluebird": "3.7.2",
"inquirer": "9.2.12",
"lodash": "4.17.21",
+24
View File
@@ -3,6 +3,30 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.0.21](https://github.com/appium/appium/compare/@appium/docutils@1.0.20...@appium/docutils@1.0.21) (2024-09-26)
### Bug Fixes
* **docutils:** update dependency typescript to v5.6.2 ([#20556](https://github.com/appium/appium/issues/20556)) ([e65c1cd](https://github.com/appium/appium/commit/e65c1cdaeddfc427d76bf522aa8a3f69c18a8f8c))
## [1.0.20](https://github.com/appium/appium/compare/@appium/docutils@1.0.19...@appium/docutils@1.0.20) (2024-09-16)
### Bug Fixes
* **docutils:** update dependency diff to v6 ([#20525](https://github.com/appium/appium/issues/20525)) ([f5f0aa5](https://github.com/appium/appium/commit/f5f0aa5068ac6a02c422273e9e857152fea1675a))
* **docutils:** update dependency diff to v7 ([#20547](https://github.com/appium/appium/issues/20547)) ([d595990](https://github.com/appium/appium/commit/d5959902bc636f399da876f42b92969f8e2873aa))
* **docutils:** update dependency yaml to v2.5.1 ([750872a](https://github.com/appium/appium/commit/750872af4756d2efcd19fe98762f82ecaa59d59a))
* **types:** update dependency type-fest to v4 ([#20467](https://github.com/appium/appium/issues/20467)) ([482a1f7](https://github.com/appium/appium/commit/482a1f7bbfbf6478ee09bb1668b830ddbf13b143))
* **types:** update dependency type-fest to v4 ([#20471](https://github.com/appium/appium/issues/20471)) ([9a66f48](https://github.com/appium/appium/commit/9a66f4800141cc86c90d58ca1103bab0066081bc))
* **types:** update dependency type-fest to v4 ([#20548](https://github.com/appium/appium/issues/20548)) ([5b8cb76](https://github.com/appium/appium/commit/5b8cb76ea3cda75095e79c91539be73feeadf869))
* **types:** update dependency type-fest to v4.26.0 ([#20511](https://github.com/appium/appium/issues/20511)) ([8f20c97](https://github.com/appium/appium/commit/8f20c973f4a6d3380163b6afd7f113808453a62d))
## [1.0.19](https://github.com/appium/appium/compare/@appium/docutils@1.0.18...@appium/docutils@1.0.19) (2024-08-07)
+4 -2
View File
@@ -167,10 +167,12 @@ export function safeWriteFile(filepath: string, content: JsonValue, overwrite =
});
}
type WhichFunction = (cmd: string, opts?: {nothrow: boolean}) => Promise<string|null>;
/**
* `which` with memoization
*/
const cachedWhich = _.memoize(fs.which as typeof import('which'));
const cachedWhich = _.memoize(fs.which as WhichFunction);
/**
* Finds `npm` executable
@@ -220,7 +222,7 @@ export const findMike = _.partial(async () => {
* `python3` is preferred over `python`, since the latter could be Python 2.
*/
export const findPython = _.memoize(
async (): Promise<string | undefined> => (await whichPython3()) ?? (await whichPython()),
async (): Promise<string | null> => (await whichPython3()) ?? (await whichPython()),
);
/**
+6 -6
View File
@@ -1,6 +1,6 @@
{
"name": "@appium/docutils",
"version": "1.0.19",
"version": "1.0.21",
"description": "Documentation generation utilities for Appium and related projects",
"keywords": [
"automation",
@@ -48,13 +48,13 @@
"start": "node ./build/lib/cli/index.js"
},
"dependencies": {
"@appium/support": "^5.1.3",
"@appium/support": "^5.1.4",
"@appium/tsconfig": "^0.3.3",
"@sliphua/lilconfig-ts-loader": "3.2.2",
"@types/which": "3.0.4",
"chalk": "4.1.2",
"consola": "3.2.3",
"diff": "5.2.0",
"diff": "7.0.0",
"json5": "2.2.3",
"lilconfig": "3.1.2",
"lodash": "4.17.21",
@@ -63,9 +63,9 @@
"semver": "7.6.3",
"source-map-support": "0.5.21",
"teen_process": "2.2.0",
"type-fest": "4.23.0",
"typescript": "5.5.4",
"yaml": "2.5.0",
"type-fest": "4.26.1",
"typescript": "5.6.2",
"yaml": "2.5.1",
"yargs": "17.7.2",
"yargs-parser": "21.1.1"
},
+4 -4
View File
@@ -1,5 +1,5 @@
mkdocs==1.6.0
mkdocs-git-revision-date-localized-plugin==1.2.6
mkdocs-material==9.5.31
mkdocs==1.6.1
mkdocs-git-revision-date-localized-plugin==1.2.9
mkdocs-material==9.5.38
mkdocs-redirects==1.2.1
mike==2.1.2
mike==2.1.3
+26
View File
@@ -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.6.9](https://github.com/appium/appium/compare/@appium/driver-test-support@0.6.8...@appium/driver-test-support@0.6.9) (2024-09-26)
### Bug Fixes
* **driver-test-support:** update definitelytyped ([#20605](https://github.com/appium/appium/issues/20605)) ([da7a4fd](https://github.com/appium/appium/commit/da7a4fdce8790bc59370bfe4b912c7c0c403c713))
* **test-support:** update dependency sinon to v19 ([#20576](https://github.com/appium/appium/issues/20576)) ([6a8f26a](https://github.com/appium/appium/commit/6a8f26a9cbf01a7c9181c90bb999d332a343d94d))
## [0.6.8](https://github.com/appium/appium/compare/@appium/driver-test-support@0.6.7...@appium/driver-test-support@0.6.8) (2024-09-16)
### Bug Fixes
* **support:** update dependency axios to v1.7.4 ([d17d022](https://github.com/appium/appium/commit/d17d0222245ab94a78e578c0398734e65a89ba68))
* **support:** update dependency axios to v1.7.5 ([fedabb1](https://github.com/appium/appium/commit/fedabb1fdc7af10f9e4b06ea23815c4bc7c6bf5e))
* **support:** update dependency axios to v1.7.7 ([7fe67a2](https://github.com/appium/appium/commit/7fe67a286a15a917ce3b1b47a08e982e65bbd9e4))
* **test-support:** update dependency sinon to v18.0.1 ([980aa69](https://github.com/appium/appium/commit/980aa69b931bab815e353945f392429a6772182d))
* **types:** update dependency type-fest to v4 ([#20467](https://github.com/appium/appium/issues/20467)) ([482a1f7](https://github.com/appium/appium/commit/482a1f7bbfbf6478ee09bb1668b830ddbf13b143))
* **types:** update dependency type-fest to v4 ([#20471](https://github.com/appium/appium/issues/20471)) ([9a66f48](https://github.com/appium/appium/commit/9a66f4800141cc86c90d58ca1103bab0066081bc))
* **types:** update dependency type-fest to v4 ([#20548](https://github.com/appium/appium/issues/20548)) ([5b8cb76](https://github.com/appium/appium/commit/5b8cb76ea3cda75095e79c91539be73feeadf869))
* **types:** update dependency type-fest to v4.26.0 ([#20511](https://github.com/appium/appium/issues/20511)) ([8f20c97](https://github.com/appium/appium/commit/8f20c973f4a6d3380163b6afd7f113808453a62d))
## [0.6.7](https://github.com/appium/appium/compare/@appium/driver-test-support@0.6.6...@appium/driver-test-support@0.6.7) (2024-08-07)
+6 -6
View File
@@ -1,6 +1,6 @@
{
"name": "@appium/driver-test-support",
"version": "0.6.7",
"version": "0.6.9",
"description": "Test utilities for Appium drivers",
"keywords": [
"automation",
@@ -41,19 +41,19 @@
},
"types": "./build/lib/index.d.ts",
"dependencies": {
"@appium/types": "^0.21.2",
"@types/lodash": "4.17.7",
"@appium/types": "^0.21.3",
"@types/lodash": "4.17.9",
"@types/stoppable": "1.1.3",
"axios": "1.7.3",
"axios": "1.7.7",
"bluebird": "3.7.2",
"chai": "5.1.1",
"chai-as-promised": "8.0.0",
"get-port": "5.1.1",
"lodash": "4.17.21",
"sinon": "18.0.0",
"sinon": "19.0.2",
"source-map-support": "0.5.21",
"stoppable": "1.1.0",
"type-fest": "4.23.0"
"type-fest": "4.26.1"
},
"peerDependencies": {
"appium": "^2.0.0-beta.43",
@@ -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.
## [3.0.35](https://github.com/appium/appium/compare/@appium/execute-driver-plugin@3.0.34...@appium/execute-driver-plugin@3.0.35) (2024-09-26)
### Bug Fixes
* **execute-driver-plugin:** replace vm2 with Node's built-in vm ([#20594](https://github.com/appium/appium/issues/20594)) ([5553016](https://github.com/appium/appium/commit/5553016582225de1a1166172d83e2fd2864c138d))
## [3.0.34](https://github.com/appium/appium/compare/@appium/execute-driver-plugin@3.0.33...@appium/execute-driver-plugin@3.0.34) (2024-09-16)
### Bug Fixes
* **execute-driver-plugin:** update dependency webdriverio to v8.40.3 ([4608563](https://github.com/appium/appium/commit/46085635a92c3a2b2b1b3ecf3966a174248a2829))
* **execute-driver-plugin:** update dependency webdriverio to v8.40.5 ([dcb6de2](https://github.com/appium/appium/commit/dcb6de22eaabdcea2517cd9b7db120d681f0e38e))
## [3.0.33](https://github.com/appium/appium/compare/@appium/execute-driver-plugin@3.0.32...@appium/execute-driver-plugin@3.0.33) (2024-08-07)
@@ -1,6 +1,6 @@
import _ from 'lodash';
import B from 'bluebird';
import {NodeVM} from 'vm2';
import vm from 'node:vm';
import {logger, util} from 'appium/support';
const log = logger.getLogger('ExecuteDriver Child');
@@ -42,36 +42,23 @@ async function runScript(eventParams) {
const driver = await attach(driverOpts);
const fullScript = buildScript(script);
const fullScript = `(async () => {${script}})();`;
log.info('Running driver script in Node vm');
const vmCtx = new NodeVM({timeout: timeoutMs});
const vmFn = vmCtx.run(fullScript);
// run the driver script, giving user access to the driver object, a fake
// console logger, and a promise library
let result = await vmFn(driver, consoleFns, B);
let result = await vm.runInNewContext(
fullScript,
{driver, console: consoleFns, Promise: B},
{timeout: timeoutMs, breakOnSigint: true},
);
result = coerceScriptResult(result);
log.info('Successfully ensured driver script result is appropriate type for return');
return {result, logs};
}
/**
* Embed a user-generated script inside a method which takes only the
* predetermined objects we specify
*
* @param {string} script - the javascript to execute
*
* @return {string} - the full script to execute
*/
function buildScript(script) {
return `module.exports = async function execute (driver, console, Promise) {
${script}
}`;
}
/**
* We can get any manner of crazy thing back from a vm executing untrusted
* code. We might also get WebdriverIO objects that aren't suitable for JSON
+2 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@appium/execute-driver-plugin",
"version": "3.0.33",
"version": "3.0.35",
"description": "Plugin for batching and executing driver commands with Appiums",
"keywords": [
"automation",
@@ -42,8 +42,7 @@
"bluebird": "3.7.2",
"lodash": "4.17.21",
"source-map-support": "0.5.21",
"vm2": "3.9.19",
"webdriverio": "8.40.0"
"webdriverio": "8.40.5"
},
"peerDependencies": {
"appium": "^2.0.0-beta.35"
+19
View File
@@ -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.
## [5.5.4](https://github.com/appium/appium/compare/@appium/fake-driver@5.5.3...@appium/fake-driver@5.5.4) (2024-09-26)
### Bug Fixes
* **universal-xml-plugin:** update dependency @xmldom/xmldom to v0.9.3 ([#20599](https://github.com/appium/appium/issues/20599)) ([f344504](https://github.com/appium/appium/commit/f344504f15a08eb1f92f2d742f32d3f48f494e02))
## [5.5.3](https://github.com/appium/appium/compare/@appium/fake-driver@5.5.2...@appium/fake-driver@5.5.3) (2024-09-16)
### Bug Fixes
* **universal-xml-plugin:** update dependency @xmldom/xmldom to v0.9.0 ([#20513](https://github.com/appium/appium/issues/20513)) ([da3f9ff](https://github.com/appium/appium/commit/da3f9ff8812be0c25841734293bd852d3a181c36))
* **universal-xml-plugin:** update dependency @xmldom/xmldom to v0.9.2 ([#20537](https://github.com/appium/appium/issues/20537)) ([3d674d0](https://github.com/appium/appium/commit/3d674d0085d22959fcf62a195af42ab2f9ba6d3a))
## [5.5.2](https://github.com/appium/appium/compare/@appium/fake-driver@5.5.1...@appium/fake-driver@5.5.2) (2024-05-27)
**Note:** Version bump only for package @appium/fake-driver
+3 -3
View File
@@ -94,7 +94,7 @@ export class FakeApp {
this.rawXml = this.rawXml.replace('<app ', '<AppiumAUT><app ');
this.rawXml = this.rawXml.replace('<app>', '<AppiumAUT><app>');
this.rawXml = this.rawXml.replace('</app>', '</app></AppiumAUT>');
this.dom = new XMLDom.DOMParser().parseFromString(this.rawXml);
this.dom = new XMLDom.DOMParser().parseFromString(this.rawXml, XMLDom.MIME_TYPE.XML_TEXT);
this.activeDom = this.dom;
}
@@ -106,7 +106,7 @@ export class FakeApp {
activateWebview(wv) {
this.activeWebview = wv;
let fragment = new XMLDom.XMLSerializer().serializeToString(wv.node);
this.activeDom = new XMLDom.DOMParser().parseFromString(fragment, 'application/xml');
this.activeDom = new XMLDom.DOMParser().parseFromString(fragment, XMLDom.MIME_TYPE.XML_TEXT);
}
deactivateWebview() {
@@ -117,7 +117,7 @@ export class FakeApp {
activateFrame(frame) {
this.activeFrame = frame;
let fragment = new XMLDom.XMLSerializer().serializeToString(frame);
this.activeDom = new XMLDom.DOMParser().parseFromString(fragment, 'application/xml');
this.activeDom = new XMLDom.DOMParser().parseFromString(fragment, XMLDom.MIME_TYPE.XML_TEXT);
}
deactivateFrame() {
+1 -1
View File
@@ -108,7 +108,7 @@ export class FakeElement {
get xmlFragment() {
let frag = new XMLDom.XMLSerializer().serializeToString(this.node);
return new XMLDom.DOMParser().parseFromString(frag, 'application/xml');
return new XMLDom.DOMParser().parseFromString(frag, XMLDom.MIME_TYPE.XML_TEXT);
}
}
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@appium/fake-driver",
"version": "5.5.2",
"version": "5.5.4",
"description": "Mock driver used internally by Appium for testing. Ignore",
"keywords": [
"automation",
@@ -43,7 +43,7 @@
},
"dependencies": {
"@types/bluebird": "3.5.42",
"@xmldom/xmldom": "0.8.10",
"@xmldom/xmldom": "0.9.3",
"asyncbox": "3.0.0",
"bluebird": "3.7.2",
"lodash": "4.17.21",
+16
View File
@@ -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.
## [3.1.49](https://github.com/appium/appium/compare/@appium/fake-plugin@3.1.48...@appium/fake-plugin@3.1.49) (2024-09-26)
**Note:** Version bump only for package @appium/fake-plugin
## [3.1.48](https://github.com/appium/appium/compare/@appium/fake-plugin@3.1.47...@appium/fake-plugin@3.1.48) (2024-09-16)
**Note:** Version bump only for package @appium/fake-plugin
## [3.1.47](https://github.com/appium/appium/compare/@appium/fake-plugin@3.1.46...@appium/fake-plugin@3.1.47) (2024-08-07)
**Note:** Version bump only for package @appium/fake-plugin
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@appium/fake-plugin",
"version": "3.1.47",
"version": "3.1.49",
"description": "A fake Appium 2.0 plugin",
"keywords": [
"automation",
@@ -39,8 +39,8 @@
"test:unit": "mocha \"./test/unit/**/*.spec.js\""
},
"dependencies": {
"@appium/base-plugin": "^2.2.43",
"@appium/support": "^5.1.3",
"@appium/base-plugin": "^2.2.45",
"@appium/support": "^5.1.4",
"@types/bluebird": "3.5.42",
"bluebird": "3.7.2",
"lodash": "4.17.21",
+8
View File
@@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [3.0.19](https://github.com/appium/appium/compare/@appium/images-plugin@3.0.18...@appium/images-plugin@3.0.19) (2024-09-16)
**Note:** Version bump only for package @appium/images-plugin
## [3.0.18](https://github.com/appium/appium/compare/@appium/images-plugin@3.0.17...@appium/images-plugin@3.0.18) (2024-08-07)
+4 -4
View File
@@ -1,6 +1,6 @@
{
"name": "@appium/images-plugin",
"version": "3.0.18",
"version": "3.0.19",
"description": "Plugin for working with images and image elements in Appium",
"keywords": [
"automation",
@@ -39,11 +39,11 @@
"test:unit": "mocha \"./test/unit/**/*.spec.js\""
},
"dependencies": {
"@appium/opencv": "^3.0.5",
"@appium/support": "^5.1.3",
"@appium/opencv": "^3.0.6",
"@appium/support": "^5.1.4",
"lodash": "4.17.21",
"lru-cache": "10.4.3",
"sharp": "0.33.4",
"sharp": "0.33.5",
"source-map-support": "0.5.21"
},
"peerDependencies": {
@@ -4,6 +4,11 @@ describe('Log Internals', function () {
/** @type {import('../../lib/secure-values-prepreocessor').SecureValuesPreprocessor} */
let preprocessor;
before(async function () {
const chai = await import('chai');
chai.should();
});
beforeEach(function () {
preprocessor = new SecureValuesPreprocessor();
});
+8
View File
@@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [3.0.6](https://github.com/appium/appium/compare/@appium/opencv@3.0.5...@appium/opencv@3.0.6) (2024-09-16)
**Note:** Version bump only for package @appium/opencv
## [3.0.5](https://github.com/appium/appium/compare/@appium/opencv@3.0.4...@appium/opencv@3.0.5) (2024-07-10)
**Note:** Version bump only for package @appium/opencv
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@appium/opencv",
"version": "3.0.5",
"version": "3.0.6",
"description": "OpenCV-related helper library",
"keywords": [
"automation",
@@ -45,7 +45,7 @@
"bluebird": "3.7.2",
"lodash": "4.17.21",
"opencv-bindings": "4.5.5",
"sharp": "0.33.4",
"sharp": "0.33.5",
"source-map-support": "0.5.21"
},
"engines": {
@@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [0.3.42](https://github.com/appium/appium/compare/@appium/plugin-test-support@0.3.41...@appium/plugin-test-support@0.3.42) (2024-09-16)
**Note:** Version bump only for package @appium/plugin-test-support
## [0.3.41](https://github.com/appium/appium/compare/@appium/plugin-test-support@0.3.40...@appium/plugin-test-support@0.3.41) (2024-08-07)
**Note:** Version bump only for package @appium/plugin-test-support
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@appium/plugin-test-support",
"version": "0.3.41",
"version": "0.3.42",
"description": "Testing utilities for Appium plugins",
"keywords": [
"automation",
@@ -41,7 +41,7 @@
"test:unit": "exit 0"
},
"dependencies": {
"@appium/types": "^0.21.2",
"@appium/types": "^0.21.3",
"get-port": "5.1.1",
"log-symbols": "4.1.0",
"source-map-support": "0.5.21",
+15
View File
@@ -3,6 +3,21 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [5.1.4](https://github.com/appium/appium/compare/@appium/support@5.1.3...@appium/support@5.1.4) (2024-09-16)
### Bug Fixes
* **support:** update dependency axios to v1.7.4 ([d17d022](https://github.com/appium/appium/commit/d17d0222245ab94a78e578c0398734e65a89ba68))
* **support:** update dependency axios to v1.7.5 ([fedabb1](https://github.com/appium/appium/commit/fedabb1fdc7af10f9e4b06ea23815c4bc7c6bf5e))
* **support:** update dependency axios to v1.7.7 ([7fe67a2](https://github.com/appium/appium/commit/7fe67a286a15a917ce3b1b47a08e982e65bbd9e4))
* **types:** update dependency type-fest to v4 ([#20467](https://github.com/appium/appium/issues/20467)) ([482a1f7](https://github.com/appium/appium/commit/482a1f7bbfbf6478ee09bb1668b830ddbf13b143))
* **types:** update dependency type-fest to v4 ([#20471](https://github.com/appium/appium/issues/20471)) ([9a66f48](https://github.com/appium/appium/commit/9a66f4800141cc86c90d58ca1103bab0066081bc))
* **types:** update dependency type-fest to v4 ([#20548](https://github.com/appium/appium/issues/20548)) ([5b8cb76](https://github.com/appium/appium/commit/5b8cb76ea3cda75095e79c91539be73feeadf869))
* **types:** update dependency type-fest to v4.26.0 ([#20511](https://github.com/appium/appium/issues/20511)) ([8f20c97](https://github.com/appium/appium/commit/8f20c973f4a6d3380163b6afd7f113808453a62d))
## [5.1.3](https://github.com/appium/appium/compare/@appium/support@5.1.2...@appium/support@5.1.3) (2024-08-07)
+5 -5
View File
@@ -1,6 +1,6 @@
{
"name": "@appium/support",
"version": "5.1.3",
"version": "5.1.4",
"description": "Support libs used across appium packages",
"keywords": [
"automation",
@@ -43,7 +43,7 @@
"dependencies": {
"@appium/logger": "^1.6.1",
"@appium/tsconfig": "^0.3.3",
"@appium/types": "^0.21.2",
"@appium/types": "^0.21.3",
"@colors/colors": "1.6.0",
"@types/archiver": "6.0.2",
"@types/base64-stream": "1.0.5",
@@ -61,7 +61,7 @@
"@types/uuid": "10.0.0",
"@types/which": "3.0.4",
"archiver": "7.0.1",
"axios": "1.7.3",
"axios": "1.7.7",
"base64-stream": "1.0.0",
"bluebird": "3.7.2",
"bplist-creator": "0.1.1",
@@ -89,13 +89,13 @@
"source-map-support": "0.5.21",
"supports-color": "8.1.1",
"teen_process": "2.2.0",
"type-fest": "4.23.0",
"type-fest": "4.26.1",
"uuid": "10.0.0",
"which": "4.0.0",
"yauzl": "3.1.3"
},
"optionalDependencies": {
"sharp": "0.33.4"
"sharp": "0.33.5"
},
"engines": {
"node": "^14.17.0 || ^16.13.0 || >=18.0.0",
+18
View File
@@ -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.0.49](https://github.com/appium/appium/compare/@appium/test-support@3.0.48...@appium/test-support@3.0.49) (2024-09-26)
### Bug Fixes
* **test-support:** update dependency sinon to v19 ([#20576](https://github.com/appium/appium/issues/20576)) ([6a8f26a](https://github.com/appium/appium/commit/6a8f26a9cbf01a7c9181c90bb999d332a343d94d))
## [3.0.48](https://github.com/appium/appium/compare/@appium/test-support@3.0.47...@appium/test-support@3.0.48) (2024-09-16)
### Bug Fixes
* **test-support:** update dependency sinon to v18.0.1 ([980aa69](https://github.com/appium/appium/commit/980aa69b931bab815e353945f392429a6772182d))
## [3.0.47](https://github.com/appium/appium/compare/@appium/test-support@3.0.46...@appium/test-support@3.0.47) (2024-08-07)
**Note:** Version bump only for package @appium/test-support
-1
View File
@@ -3,6 +3,5 @@ import './unhandled-rejection';
export {stubEnv} from './env-utils';
export {stubLog} from './log-utils';
export {fakeTime} from './time-utils';
export {withMocks, verifyMocks} from './mock-utils';
export {withSandbox, verifySandbox} from './sandbox-utils';
-24
View File
@@ -1,24 +0,0 @@
/** @deprecated */
function fakeTime(sandbox) {
let clock = sandbox.useFakeTimers();
return new TimeLord(clock);
}
class TimeLord {
constructor(clock) {
this.clock = clock;
}
speedup(interval, times) {
let tick = (n) => {
if (n === 0) return; // eslint-disable-line curly
process.nextTick(() => {
this.clock.tick(interval);
n--;
tick(n);
});
};
tick(times);
}
}
export {fakeTime};
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@appium/test-support",
"version": "3.0.47",
"version": "3.0.49",
"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": "^5.1.3",
"@appium/support": "^5.1.4",
"@colors/colors": "1.6.0",
"bluebird": "3.7.2",
"lodash": "4.17.21",
"loud-rejection": "2.2.0",
"sinon": "18.0.0",
"sinon": "19.0.2",
"source-map-support": "0.5.21"
},
"engines": {
@@ -1,38 +0,0 @@
import {fakeTime} from '../../lib';
import sinon from 'sinon';
import B from 'bluebird';
function doSomething() {
return new B.Promise((resolve) => {
let ret = '';
function appendOneByOne() {
if (ret.length >= 10) {
return resolve(ret);
}
setTimeout(() => {
ret = ret + ret.length;
appendOneByOne();
}, 1000);
}
appendOneByOne();
});
}
describe('time-utils', function () {
describe('fakeTime', function () {
let sandbox;
beforeEach(function () {
sandbox = sinon.createSandbox();
});
afterEach(function () {
sandbox.restore();
});
it('should fake time', async function () {
let timeLord = fakeTime(sandbox);
let p = doSomething();
timeLord.speedup(200, 60);
(await p).should.equals('0123456789');
});
});
});
+13
View File
@@ -3,6 +3,19 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [0.21.3](https://github.com/appium/appium/compare/@appium/types@0.21.2...@appium/types@0.21.3) (2024-09-16)
### Bug Fixes
* **base-driver:** Add a server flag to check if it operates a secure protocol ([#20449](https://github.com/appium/appium/issues/20449)) ([622b245](https://github.com/appium/appium/commit/622b245ea38793280d9785a59a0416ce025862fe))
* **types:** update dependency type-fest to v4 ([#20467](https://github.com/appium/appium/issues/20467)) ([482a1f7](https://github.com/appium/appium/commit/482a1f7bbfbf6478ee09bb1668b830ddbf13b143))
* **types:** update dependency type-fest to v4 ([#20471](https://github.com/appium/appium/issues/20471)) ([9a66f48](https://github.com/appium/appium/commit/9a66f4800141cc86c90d58ca1103bab0066081bc))
* **types:** update dependency type-fest to v4 ([#20548](https://github.com/appium/appium/issues/20548)) ([5b8cb76](https://github.com/appium/appium/commit/5b8cb76ea3cda75095e79c91539be73feeadf869))
* **types:** update dependency type-fest to v4.26.0 ([#20511](https://github.com/appium/appium/issues/20511)) ([8f20c97](https://github.com/appium/appium/commit/8f20c973f4a6d3380163b6afd7f113808453a62d))
## [0.21.2](https://github.com/appium/appium/compare/@appium/types@0.21.1...@appium/types@0.21.2) (2024-08-07)
+2
View File
@@ -45,6 +45,8 @@ export interface AppiumServerExtension {
keysFilter?: string | null
): Promise<Record<string, WSServer>>;
webSocketsMapping: Record<string, WSServer>;
/** Returns true if the server operates via HTTPS protocol */
isSecure(): boolean;
}
/**
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@appium/types",
"version": "0.21.2",
"version": "0.21.3",
"description": "Various type declarations used across Appium",
"keywords": [
"automation",
@@ -43,7 +43,7 @@
"@appium/tsconfig": "^0.3.3",
"@types/express": "4.17.21",
"@types/ws": "8.5.12",
"type-fest": "4.23.0"
"type-fest": "4.26.1"
},
"engines": {
"node": "^14.17.0 || ^16.13.0 || >=18.0.0",
@@ -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.
## [1.0.23](https://github.com/appium/appium-plugins/compare/@appium/universal-xml-plugin@1.0.22...@appium/universal-xml-plugin@1.0.23) (2024-09-26)
### Bug Fixes
* **universal-xml-plugin:** update dependency @xmldom/xmldom to v0.9.3 ([#20599](https://github.com/appium/appium-plugins/issues/20599)) ([f344504](https://github.com/appium/appium-plugins/commit/f344504f15a08eb1f92f2d742f32d3f48f494e02))
## [1.0.22](https://github.com/appium/appium-plugins/compare/@appium/universal-xml-plugin@1.0.21...@appium/universal-xml-plugin@1.0.22) (2024-09-16)
### Bug Fixes
* **universal-xml-plugin:** update dependency @xmldom/xmldom to v0.9.0 ([#20513](https://github.com/appium/appium-plugins/issues/20513)) ([da3f9ff](https://github.com/appium/appium-plugins/commit/da3f9ff8812be0c25841734293bd852d3a181c36))
* **universal-xml-plugin:** update dependency @xmldom/xmldom to v0.9.2 ([#20537](https://github.com/appium/appium-plugins/issues/20537)) ([3d674d0](https://github.com/appium/appium-plugins/commit/3d674d0085d22959fcf62a195af42ab2f9ba6d3a))
* **universal-xml-plugin:** update dependency fast-xml-parser to v4.5.0 ([75710ab](https://github.com/appium/appium-plugins/commit/75710ab8230a80bf693944b66c84440a86d26b5e))
## [1.0.21](https://github.com/appium/appium-plugins/compare/@appium/universal-xml-plugin@1.0.20...@appium/universal-xml-plugin@1.0.21) (2024-08-07)
+4 -2
View File
@@ -1,9 +1,11 @@
import {select as xpathQuery} from 'xpath';
import {DOMParser} from '@xmldom/xmldom';
import {DOMParser, MIME_TYPE} from '@xmldom/xmldom';
import _ from 'lodash';
export function runQuery(query, xmlStr) {
const dom = new DOMParser().parseFromString(xmlStr);
const dom = new DOMParser().parseFromString(xmlStr, MIME_TYPE.XML_TEXT);
// @ts-expect-error Misssing Node properties are not needed.
// https://github.com/xmldom/xmldom/issues/724
const nodes = xpathQuery(query, dom);
return nodes;
}
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@appium/universal-xml-plugin",
"version": "1.0.21",
"version": "1.0.23",
"description": "Appium plugin for making XML source and XPath queries the same across iOS and Android",
"keywords": [
"automation",
@@ -37,8 +37,8 @@
},
"dependencies": {
"@types/xmldom": "0.1.34",
"@xmldom/xmldom": "0.8.10",
"fast-xml-parser": "4.4.1",
"@xmldom/xmldom": "0.9.3",
"fast-xml-parser": "4.5.0",
"lodash": "4.17.21",
"source-map-support": "0.5.21",
"xpath": "0.0.34"
@@ -45,7 +45,7 @@ describe('UniversalXMLPlugin', function () {
driver.caps = {platformName: 'iOS'};
// mock out the findElement function to just return an xml node from the fixture
driver.findElement = (strategy, selector) => {
const nodes = runQuery(selector, XML_IOS.replace(/<\/?AppiumAUT>/, ''));
const nodes = runQuery(selector, XML_IOS.replace(/<\/?AppiumAUT>/g, ''));
return nodes[0];
};
const node = await p.findElement(next, driver, 'xpath', '//TextInput[@axId="username"]');
-1
View File
@@ -57,7 +57,6 @@ Appium extension authors--or anyone else--may use this config as well.
### Additional Config
- Uses the parent directory for the commit scope if applicable; otherwise uses `deps`. The parent directory is _typically_ only applicable in monorepos.
- Attempts transititive remediation of vulns
## License
+3 -6
View File
@@ -45,7 +45,7 @@
},
{
"extends": ["packages:eslint"],
"matchPackagePrefixes": ["@appium/eslint-config-appium"],
"matchPackageNames": ["@appium/eslint-config-appium**"],
"groupName": "ESLint-related packages",
"groupSlug": "eslint"
},
@@ -55,13 +55,10 @@
"groupSlug": "teen_process"
},
{
"matchPackagePrefixes": ["@appium/"],
"excludePackageNames": ["@appium/eslint-config-appium", "@appium/eslint-config-appium-ts"],
"matchPackageNames": "appium",
"matchPackageNames": ["appium", "@appium/**", "!@appium/eslint-config-appium**"],
"groupName": "Appium-related packages",
"groupSlug": "appium"
}
],
"semanticCommitScope": "{{#if parentDir}}{{parentDir}}{{else}}deps{{/if}}",
"transitiveRemediation": true
"semanticCommitScope": "{{#if parentDir}}{{parentDir}}{{else}}deps{{/if}}"
}