mirror of
https://github.com/appium/appium.git
synced 2026-10-31 22:32:24 +08:00
Compare commits
30
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5482c921bc | ||
|
|
88a6655253 | ||
|
|
38b4fa2bad | ||
|
|
67dacd87cf | ||
|
|
f1b36cc7c5 | ||
|
|
ec1b95b96c | ||
|
|
bbce027f34 | ||
|
|
2e7c1bb46e | ||
|
|
9df8c08b09 | ||
|
|
a67ba79dba | ||
|
|
de5a96fb08 | ||
|
|
90918200e2 | ||
|
|
a725d052f8 | ||
|
|
e49ab6d343 | ||
|
|
fdee8701a6 | ||
|
|
2e8e7a5d65 | ||
|
|
39aab21aef | ||
|
|
b957123401 | ||
|
|
a2b2ded1e4 | ||
|
|
b34b75a80e | ||
|
|
4d91f76e4c | ||
|
|
2e57fd4900 | ||
|
|
1201230b6a | ||
|
|
70f9b38dd5 | ||
|
|
c5787f7cf0 | ||
|
|
5bdc476c62 | ||
|
|
9bfe482b97 | ||
|
|
00f38df09a | ||
|
|
19c4cd246b | ||
|
|
0d7f851410 |
@@ -0,0 +1 @@
|
||||
* text=auto eol=lf
|
||||
@@ -21,7 +21,9 @@ jobs:
|
||||
- name: Install latest npm
|
||||
run: npm install -g npm
|
||||
- name: Install dependencies
|
||||
run: npm install
|
||||
run: |
|
||||
npm install
|
||||
npm run install-mjpeg-consumer
|
||||
- name: Run all tests
|
||||
run: npm run test:ci
|
||||
|
||||
|
||||
+24
-12
@@ -29,11 +29,11 @@
|
||||
"build:loose": "run-s -c build:distfiles build:types || true",
|
||||
"build:types": "tsc -b",
|
||||
"clean": "run-s clean:artifacts clean:packages clean:monorepo",
|
||||
"clean:artifacts": "run-s clean:distfiles clean:types && npx rimraf \"packages/*/build\"",
|
||||
"clean:distfiles": "npx rimraf \"packages/*/build/**/*.js\"",
|
||||
"clean:monorepo": "npx rimraf node_modules package-lock.json",
|
||||
"clean:packages": "lerna clean -y && npx rimraf \"packages/*/package-lock.json\"",
|
||||
"clean:types": "tsc -b --clean",
|
||||
"clean:artifacts": "run-s clean:distfiles clean:types && npx rimraf \"packages/*/build\"",
|
||||
"dev": "run-p dev:*",
|
||||
"dev:distfiles": "lerna run --parallel --prefix --concurrency=8 dev",
|
||||
"dev:types": "tsc -b --watch",
|
||||
@@ -41,6 +41,7 @@
|
||||
"generate-docs": "lerna run --scope=appium generate-docs",
|
||||
"postinstall": "npm run build:loose",
|
||||
"install-fake-driver": "npm start -- driver install --source=local ./packages/fake-driver",
|
||||
"install-mjpeg-consumer": "npm install mjpeg-consumer --no-save",
|
||||
"lint": "eslint .",
|
||||
"lint:fix": "npm run lint -- --fix",
|
||||
"precommit-lint": "lint-staged",
|
||||
@@ -69,13 +70,22 @@
|
||||
"precommit-lint"
|
||||
],
|
||||
"lint-staged": {
|
||||
"*.js": "eslint --fix"
|
||||
"*.js": [
|
||||
"eslint --fix",
|
||||
"prettier --write"
|
||||
]
|
||||
},
|
||||
"prettier": {
|
||||
"bracketSpacing": false,
|
||||
"singleQuote": true
|
||||
},
|
||||
"dependencies": {
|
||||
"@appium/base-driver": "file:packages/base-driver",
|
||||
"@appium/base-plugin": "file:packages/base-plugin",
|
||||
"@appium/doctor": "file:packages/doctor",
|
||||
"@appium/docutils": "file:packages/docutils",
|
||||
"@appium/eslint-config-appium": "file:packages/eslint-config-appium",
|
||||
"@appium/execute-driver-plugin": "file:packages/execute-driver-plugin",
|
||||
"@appium/fake-driver": "file:packages/fake-driver",
|
||||
"@appium/fake-plugin": "file:packages/fake-plugin",
|
||||
"@appium/gulp-plugins": "file:packages/gulp-plugins",
|
||||
@@ -87,16 +97,15 @@
|
||||
"@appium/test-support": "file:packages/test-support",
|
||||
"@appium/types": "file:packages/types",
|
||||
"@appium/universal-xml-plugin": "file:packages/universal-xml-plugin",
|
||||
"@appium/execute-driver-plugin": "file:packages/execute-driver-plugin",
|
||||
"appium": "file:packages/appium"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@appium/fake-plugin": "1.3.1",
|
||||
"@babel/cli": "7.17.6",
|
||||
"@babel/core": "7.17.9",
|
||||
"@babel/cli": "7.17.10",
|
||||
"@babel/core": "7.17.10",
|
||||
"@babel/eslint-parser": "7.17.0",
|
||||
"@babel/plugin-transform-runtime": "7.17.0",
|
||||
"@babel/preset-env": "7.16.11",
|
||||
"@babel/plugin-transform-runtime": "7.17.10",
|
||||
"@babel/preset-env": "7.17.10",
|
||||
"@babel/register": "7.17.7",
|
||||
"@babel/runtime": "7.17.9",
|
||||
"@colors/colors": "1.5.0",
|
||||
@@ -116,10 +125,10 @@
|
||||
"@types/klaw": "3.0.3",
|
||||
"@types/lockfile": "1.0.2",
|
||||
"@types/method-override": "0.0.32",
|
||||
"@types/mocha": "9.1.0",
|
||||
"@types/mocha": "9.1.1",
|
||||
"@types/mv": "2.1.2",
|
||||
"@types/ncp": "2.0.5",
|
||||
"@types/node": "16.11.27",
|
||||
"@types/node": "16.11.33",
|
||||
"@types/npmlog": "4.1.4",
|
||||
"@types/pluralize": "0.0.29",
|
||||
"@types/pngjs": "6.0.1",
|
||||
@@ -138,8 +147,9 @@
|
||||
"babel-plugin-source-map-support": "2.1.3",
|
||||
"chai": "4.3.6",
|
||||
"chai-as-promised": "7.1.1",
|
||||
"chai-webdriverio-async": "2.6.0",
|
||||
"chai-webdriverio-async": "2.7.0",
|
||||
"eslint": "7.32.0",
|
||||
"eslint-config-prettier": "8.5.0",
|
||||
"eslint-find-rules": "4.1.0",
|
||||
"eslint-plugin-import": "2.26.0",
|
||||
"eslint-plugin-mocha": "9.0.0",
|
||||
@@ -151,12 +161,13 @@
|
||||
"handlebars": "4.7.7",
|
||||
"json-schema-to-typescript": "10.1.5",
|
||||
"lerna": "4.0.0",
|
||||
"lint-staged": "12.3.8",
|
||||
"lint-staged": "12.4.1",
|
||||
"log-symbols": "4.1.0",
|
||||
"mjpeg-server": "0.3.1",
|
||||
"mocha": "9.2.2",
|
||||
"npm-run-all": "4.1.5",
|
||||
"pre-commit": "1.2.2",
|
||||
"prettier": "2.6.2",
|
||||
"rewiremock": "3.14.3",
|
||||
"rimraf": "3.0.2",
|
||||
"serve-static": "1.15.0",
|
||||
@@ -165,9 +176,10 @@
|
||||
"sync-monorepo-packages": "0.3.5",
|
||||
"through2": "4.0.2",
|
||||
"type-fest": "2.12.2",
|
||||
"typescript": "4.6.3",
|
||||
"typescript": "4.6.4",
|
||||
"validate.js": "0.13.1",
|
||||
"webdriverio": "7.19.5",
|
||||
"ws": "8.6.0",
|
||||
"yaml-js": "0.3.1"
|
||||
},
|
||||
"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.
|
||||
|
||||
# [2.0.0-beta.34](https://github.com/appium/appium/compare/appium@2.0.0-beta.33...appium@2.0.0-beta.34) (2022-05-02)
|
||||
|
||||
**Note:** Version bump only for package appium
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [2.0.0-beta.33](https://github.com/appium/appium/compare/appium@2.0.0-beta.32...appium@2.0.0-beta.33) (2022-04-20)
|
||||
|
||||
**Note:** Version bump only for package appium
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: Execute Script Overloads
|
||||
---
|
||||
|
||||
TODO
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: The Settings API
|
||||
---
|
||||
|
||||
TODO
|
||||
@@ -2,4 +2,201 @@
|
||||
title: Intro to Appium
|
||||
---
|
||||
|
||||
TODO
|
||||
As mentioned on the main page, Appium is an open-source project and ecosystem of related software,
|
||||
designed to facilitate UI automation of many app platforms. With the release of Appium 2.0, Appium
|
||||
has the following primary goals:[^1]
|
||||
|
||||
- Make platform-specific automation capabilities available under a cross-platform, standard API
|
||||
- Allow easy access to this API from any programming language
|
||||
- Provide tools to enable convenient community development of Appium extensions
|
||||
|
||||
[^1]:
|
||||
To meet these primary goals, we also work with a set of secondary goals or methodology
|
||||
principles, which we also encourage for Appium extension developers:
|
||||
|
||||
- As far as possible, rely on (and contribute to) open source technology
|
||||
- As far as possible, rely on vendor-provided tools for a given platform
|
||||
- As far as possible, rely on automation tools that allow automation of unmodified apps (prefer
|
||||
not to require the user to build in additional SDKs or software that introduce discrepancies
|
||||
between the test version of the app and the production version)
|
||||
- As far as possible, rely on existing standards instead of creating new ones
|
||||
|
||||
So, take any app platform you know about, like iOS or Android. Appium wants for there to be a way
|
||||
for developers and testers to write UI automation code for that platform, according to a single,
|
||||
unified API. Based on Appium's goals, we have a lot of questions to answer to make it all work:
|
||||
|
||||
- Which API should that "single, unified" API be?
|
||||
- How do we map that API to automation behaviour for a specific platform?
|
||||
- How do we make that API accessible via multiple popular programming languages?
|
||||
|
||||
There's another, larger, question lurking in the background here too, given that there are more app
|
||||
platforms out there than just iOS and Android:
|
||||
|
||||
- How do we enable automation for *all* the platforms?
|
||||
|
||||
Exploring Appium's answers to these questions may not be the quickest way to learn what Appium is,
|
||||
but it is certainly a good one! So let's dive in.
|
||||
|
||||
## Appium's choice of API
|
||||
|
||||
Appium is very fortunate to have been preceded by a technology which has been a long-standing
|
||||
pioneer in the field of UI automation, namely [Selenium](https://seleniumhq.org). The goal of the
|
||||
Selenium project has been to support UI automation of web browsers, and in this way we can think of
|
||||
it as occupying a subset of Appium's goals. Along the way, Selenium (and, after they merged,
|
||||
another project called WebDriver) developed a relatively stable API for browser automation.
|
||||
|
||||
Over the years, Selenium worked with various web browser vendors and the [W3C](https://w3c.org)
|
||||
standards group to turn its API into an official web browser standard, called the [WebDriver
|
||||
specification](https://w3c.github.io/webdriver/webdriver-spec.html). All the main browsers now
|
||||
implement automation capabilities inline with the WebDriver spec, without the Selenium team having
|
||||
to maintain any software that performs actual automation; standards for the win!
|
||||
|
||||
Appium's initial goals were to develop an automation standard for mobile apps (iOS and Android). We
|
||||
could have made up something new, but in the spirit of joining forces and keeping standards, well,
|
||||
standard, we decided to adopt the WebDriver spec as Appium's API.[^2] While user interaction on
|
||||
websites and in mobile native apps are not entirely identical (with even greater differences once
|
||||
we start to consider, for example, TV platforms controlled by simple remotes), the fact is that
|
||||
most software UIs are pretty much the same. This means that the WebDriver spec provides automation
|
||||
API primitives (finding elements, interacting with elements, loading pages or screens, etc...) that
|
||||
more or less map to any platform.
|
||||
|
||||
[^2]: Technically, when Appium was first written, we were dealing with something older than the
|
||||
WebDriver spec, called the JSON Wire Protocol. Since then, Appium continued to evolve along with
|
||||
the W3C spec and is fully W3C-compliant.
|
||||
|
||||
Of course, Appium wants to support the cases where user interaction *does* differ from web to
|
||||
mobile or web to TV, and so Appium also makes use of the built-in *extensibility* of the WebDriver
|
||||
spec. The result is that, no matter what platform you want to automate, when you use Appium, you
|
||||
will do so using the standard WebDriver spec, with two caveats:
|
||||
|
||||
- We might not have any way to support a particular WebDriver API command on a given platform, and
|
||||
so some commands might be unsupported (for example, getting or setting cookies is not possible in
|
||||
the world of native mobile app automation).
|
||||
- We might support automation behaviours that go *beyond* what's available in the WebDriver API
|
||||
command list, though any such commands will be valid and spec-compliant extensions to the
|
||||
WebDriver API.
|
||||
|
||||
How do you actually *use* the WebDriver API, particularly in the context of Appium? We'll cover
|
||||
that in the [section below](#universal-programming-language-access) on how Appium provides
|
||||
universal programming language access. All you need to know for now is that the way Appium
|
||||
introduces a universal UI automation interface is by implementing the WebDriver protocol.
|
||||
|
||||
## Platform automation behaviour
|
||||
|
||||
The next question is, how does Appium map this protocol to automation behaviour on a wide range of
|
||||
platforms? The trick is that, strictly speaking, Appium doesn't! It leaves this responsibility up
|
||||
to a kind of software module called an Appium *driver*. There's a whole [Driver
|
||||
Introduction](./drivers.md) which you can read next, so we won't go into huge detail on how they
|
||||
work for now.
|
||||
|
||||
What's important to understand at the moment is that a driver is kind of like a pluggable module
|
||||
for Appium that gives Appium the power to automate a particular platform (or set of platforms,
|
||||
depending on the goal of the driver). At the end of the day, a driver's responsibility is to simply
|
||||
implement an Appium-internal interface representing the WebDriver protocol. How it implements this
|
||||
interface is totally up to the driver, based on its strategy for making automation happen on
|
||||
a specific platform. Typically, and with a lot more complexity and difficulty in the details,
|
||||
a driver does this by relying on platform-specific automation technologies. For example, Apple
|
||||
maintains an iOS automation technology called
|
||||
[XCUITest](https://developer.apple.com/documentation/xctest/user_interface_tests). The Appium
|
||||
driver that supports iOS app automation is called the [XCUITest
|
||||
Driver](https://github.com/appium/appium-xcuitest-driver) because ultimately what it does is
|
||||
convert the WebDriver protocol to XCUITest library calls.
|
||||
|
||||
One of the reasons that drivers are independent, pluggable modules is that they work completely
|
||||
differently from one another. The tools and requirements for building and using drivers for
|
||||
different platforms are completely different. And so Appium lets you use just the drivers that you
|
||||
need for your automation tasks. Choosing drivers and installing them so that you can use them with
|
||||
your Appium instance is so important that Appium has its very own [CLI for managing
|
||||
drivers](../cli/extensions.md).
|
||||
|
||||
So, to answer our original question, the way that Appium provides access to automation capabilities
|
||||
for a given platform is that the Appium team (or anyone else[^3]) writes a *driver* for that
|
||||
platform, implementing as much or little of the WebDriver protocol as desired. The driver can then
|
||||
be installed by anyone using Appium.
|
||||
|
||||
[^3]: You can build and share your own drivers! Check out [Building
|
||||
Drivers](../ecosystem/build-drivers.md) to learn more about how to develop drivers in Node.js
|
||||
that can be used with Appium.
|
||||
|
||||
## Universal programming language access
|
||||
|
||||
But what does it mean, or look like, to *use* Appium, anyway? Since Appium is ultimately a Node.js
|
||||
program, it *could* have looked like importing Appium and its drivers as libraries into your own
|
||||
Node.js programs. But that wouldn't meet Appium's goal of providing automation capabilities to
|
||||
people using any popular programming language.
|
||||
|
||||
Luckily, the fact that Appium rode in on Selenium's coattails meant that we had a solution to this
|
||||
problem from day one. You see, the WebDriver specification is actually an HTTP-based protocol,
|
||||
meaning it is designed to be used over a network rather than within the memory of a single program.
|
||||
|
||||
One of the main benefits of this "client-server" architecture is that it allows the automation
|
||||
implementer (the thing doing the automation, in this case the 'server') to be completely distinct
|
||||
from the automation runner (the thing defining what automation should be done, in what steps,
|
||||
etc..., in this case the 'client'). Basically, all the "hard stuff" (actually figuring out how to
|
||||
make automation happen on a given platform) can be handled in one place by the server, and "thin"
|
||||
client libraries can be written in any programming language which simply encode HTTP requests to
|
||||
the server in language-appropriate way. It's possible, in other words, to bring basic Appium
|
||||
/ WebDriver capabilities to a new programming language relatively easily, assuming high-level HTTP
|
||||
libraries exist, simply by coding up a basic HTTP client in that language.
|
||||
|
||||
There are a couple important takeaways here for you, the Appium user:
|
||||
|
||||
- Appium is an *HTTP server*. It must run as a process on some computer for as long as you want to
|
||||
be able to use it for automation. It must be accessible on the network to whichever computer you
|
||||
want to use to run the automation from (whether that is the same machine or one across the
|
||||
world).
|
||||
- Unless you want to write raw HTTP calls or use cURL, using Appium for automation involves the use
|
||||
of an [Appium Client](clients.md) in the language of your choice. The goal of each of these
|
||||
clients is to encapsulate the WebDriver protocol so that rather than worrying about the protocol
|
||||
itself, you can work with objects and methods that feel idiomatic for your language.
|
||||
- The Appium server and the Appium client do *not* need to be running on the same computer. You
|
||||
simply need to be able to send HTTP requests from the client to the server over some network.
|
||||
This greatly facilitates the use of cloud providers for Appium, since they can host the Appium
|
||||
server and any related drivers and devices, and all you need to do is point your client script to
|
||||
their secure endpoints.
|
||||
|
||||
And of course, none of this is about "testing" per se, purely about the use of Appium and its
|
||||
client libraries for automation purposes. If you want to do automation for the purpose of
|
||||
"testing", you'll likely want to enlist the help of test runners, test frameworks, and the like,
|
||||
none of which need be related to Appium; one of the benefits of Appium's "universal accessibility"
|
||||
is that it plays well with whatever set of tools you find most beneficial for your situation.
|
||||
|
||||
## Appium's huge scope
|
||||
|
||||
Appium's vision (automation of everything under a single API) is huge! Certainly, much bigger than
|
||||
the team of core maintainers for the open source project. So how does Appium hope to achieve this
|
||||
goal? Basically, by empowering the community to develop functionality on top of Appium as
|
||||
a *platform*. This is what we call the Appium "ecosystem".
|
||||
|
||||
The Appium team does officially maintain a few drivers itself (for example, the XCUITest driver
|
||||
that we spoke about earlier). But it cannot hope to have the platform-specific expertise or the
|
||||
capacity to maintain drivers for many different platforms. But what we have done, particularly
|
||||
beginning with Appium 2.0, is to provide tools to empower the community to join in our vision:
|
||||
|
||||
- Anyone can create a driver simply by creating a Node.js module that conforms to the appropriate
|
||||
conventions and implements any (sub|super)set of the WebDriver protocol. Creating a driver often
|
||||
involves a minimal amount of code because the WebDriver protocol details are abstracted away, and
|
||||
many helper libraries are available---the same libraries that power the Appium team's own
|
||||
drivers.
|
||||
- Sharing drivers with others is easy using the Appium driver CLI. There is no central authority.
|
||||
Anyone can share drivers publicly or privately, for free or for sale. Drivers can be open or
|
||||
closed source (though obviously we appreciate open source!).
|
||||
|
||||
Appium's vision of being a platform for development extends beyond the support of automation for
|
||||
all app platforms. As a popular automation tool, there are many opportunities for integrating
|
||||
Appium with all kinds of other tools and services. In addition, there are many feature ideas for
|
||||
Appium, either as a core server or in its incarnation across various drivers, which the core team
|
||||
will never have time to build. And so, with Appium 2.0, Appium has released a plugin system that
|
||||
enables anyone to build and share modules that change how Appium works!
|
||||
|
||||
In the same way that drivers are easily shareable and consumable via the Appium driver CLI, plugins
|
||||
can be published and consumed via a parallel [Plugin CLI](../cli/extensions.md). Plugins can do all
|
||||
sorts of things, for example adding the ability for Appium to find and interact with screen regions
|
||||
based on a template image (as in the [`images`
|
||||
plugin](https://github.com/appium/appium/tree/2.0/packages/images-plugin)). There are very few
|
||||
limitations on what you can do with plugins, so you might also be interested in learning how to
|
||||
[Build Plugins](../ecosystem/build-plugins.md) in Node.js that can be used with Appium.
|
||||
|
||||
So that's Appium: an extensible, universal interface for the UI automation of potentially
|
||||
everything! Read on into some of the specific intro docs for more details, or check out the various
|
||||
guides to dive into some more general concepts and features of Appium.
|
||||
|
||||
@@ -2,4 +2,50 @@
|
||||
title: Write a Test (Python)
|
||||
---
|
||||
|
||||
TODO
|
||||
The [Appium Python Client](https://github.com/appium/python-client) is
|
||||
an official Appium client in Python, which is available via pypi under the [Appium-Python-Client](https://pypi.org/project/Appium-Python-Client/) package name.
|
||||
It inherits from the [Selenium Python Binding](https://pypi.org/project/selenium/),
|
||||
so installing the Appium Python Client includes the selenium binding.
|
||||
|
||||
```bash
|
||||
pip install Appium-Python-Client
|
||||
```
|
||||
|
||||
This example uses Python's built-in `unittest` module, though you can use any Python test framework you want.
|
||||
The Appium Python client adds the `appium:` vendor prefix automatically.
|
||||
You usually do not need to worry about the prefix.
|
||||
|
||||
```python title="test.py"
|
||||
--8<-- "./sample-code/quickstarts/py/test.py"
|
||||
```
|
||||
|
||||
!!! note
|
||||
|
||||
It's not within the scope of this guide to give a complete run-down on the Python 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).
|
||||
- [functional test code](https://github.com/appium/python-client/tree/master/test/functional) in Python Client GitHub repository should help to find more working example.
|
||||
- [Documentation](https://appium.github.io/python-client-sphinx/) also helps to find methods
|
||||
defined in the Appium Python Client.
|
||||
|
||||
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:
|
||||
|
||||
```bash
|
||||
python test.js
|
||||
```
|
||||
|
||||
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 to explore.
|
||||
|
||||
@@ -12,18 +12,20 @@ theme:
|
||||
nav:
|
||||
- Welcome: index.md
|
||||
- Introduction:
|
||||
- intro/index.md
|
||||
- intro/drivers.md
|
||||
- intro/clients.md
|
||||
- Intro to Appium:
|
||||
- Overview of Appium: intro/index.md
|
||||
- intro/drivers.md
|
||||
- intro/clients.md
|
||||
- intro/requirements.md
|
||||
- intro/history.md
|
||||
- Quickstart:
|
||||
- quickstart/index.md
|
||||
- quickstart/install.md
|
||||
- quickstart/uiauto2-driver.md
|
||||
- quickstart/test-js.md
|
||||
- quickstart/test-py.md
|
||||
- quickstart/test-java.md
|
||||
- Write a Test:
|
||||
- quickstart/test-js.md
|
||||
- quickstart/test-py.md
|
||||
- quickstart/test-java.md
|
||||
- quickstart/next-steps.md
|
||||
- CLI Reference:
|
||||
- cli/index.md
|
||||
@@ -36,14 +38,17 @@ nav:
|
||||
- guides/security.md
|
||||
- guides/caps.md
|
||||
- guides/context.md
|
||||
- guides/settings.md
|
||||
- guides/execute-script-overload.md
|
||||
- guides/event-timing.md
|
||||
- guides/log-filters.md
|
||||
- guides/grid.md
|
||||
- Ecosystem:
|
||||
- ecosystem/index.md
|
||||
- ecosystem/build-drivers.md
|
||||
- ecosystem/build-plugins.md
|
||||
- ecosystem/build-docs.md
|
||||
- Developing Appium Extensions:
|
||||
- ecosystem/build-drivers.md
|
||||
- ecosystem/build-plugins.md
|
||||
- ecosystem/build-docs.md
|
||||
- Contributing: contributing/index.md
|
||||
- Resources: resources.md
|
||||
- More Appium Resources: resources.md
|
||||
- Issues: https://github.com/appium/appium/issues
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "appium",
|
||||
"version": "2.0.0-beta.33",
|
||||
"version": "2.0.0-beta.34",
|
||||
"description": "Automation for Apps.",
|
||||
"keywords": [
|
||||
"automation",
|
||||
@@ -53,11 +53,11 @@
|
||||
"test:unit": "mocha \"./test/unit/**/*.spec.js\""
|
||||
},
|
||||
"dependencies": {
|
||||
"@appium/base-driver": "^8.5.2",
|
||||
"@appium/base-plugin": "^1.8.4",
|
||||
"@appium/docutils": "^0.0.3",
|
||||
"@appium/schema": "^0.0.5",
|
||||
"@appium/support": "^2.57.4",
|
||||
"@appium/base-driver": "file:../base-driver",
|
||||
"@appium/base-plugin": "file:../base-plugin",
|
||||
"@appium/docutils": "file:../docutils",
|
||||
"@appium/schema": "file:../schema",
|
||||
"@appium/support": "file:../support",
|
||||
"@babel/runtime": "7.17.9",
|
||||
"@sidvind/better-ajv-errors": "1.1.1",
|
||||
"ajv": "8.11.0",
|
||||
@@ -65,13 +65,13 @@
|
||||
"argparse": "2.0.1",
|
||||
"async-lock": "1.3.1",
|
||||
"asyncbox": "2.9.2",
|
||||
"axios": "0.26.1",
|
||||
"axios": "0.27.2",
|
||||
"bluebird": "3.7.2",
|
||||
"find-up": "5.0.0",
|
||||
"lilconfig": "2.0.5",
|
||||
"lodash": "4.17.21",
|
||||
"longjohn": "0.2.12",
|
||||
"npmlog": "6.0.1",
|
||||
"npmlog": "6.0.2",
|
||||
"ora": "5.4.1",
|
||||
"package-changed": "1.9.0",
|
||||
"resolve-from": "5.0.0",
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
import unittest
|
||||
from appium import webdriver
|
||||
from appium.webdriver.common.appiumby import AppiumBy
|
||||
|
||||
capabilities = dict(
|
||||
platformName='Android',
|
||||
automationName='uiautomator2',
|
||||
deviceName='Android',
|
||||
appPackage='com.android.settings',
|
||||
appActivity='.Settings',
|
||||
language='en',
|
||||
locale='US'
|
||||
)
|
||||
|
||||
appium_server_url = 'http://localhost:4723'
|
||||
|
||||
class TestAppium(unittest.TestCase):
|
||||
def setUp(self) -> None:
|
||||
self.driver = webdriver.Remote(appium_server_url, capabilities)
|
||||
|
||||
def tearDown(self) -> None:
|
||||
if self.driver:
|
||||
self.driver.quit()
|
||||
|
||||
def test_find_battery(self) -> None:
|
||||
el = self.driver.find_element(by=AppiumBy.XPATH, value='//*[@text="Battery"]')
|
||||
el.click()
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
@@ -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.
|
||||
|
||||
## [8.5.3](https://github.com/appium/appium/compare/@appium/base-driver@8.5.2...@appium/base-driver@8.5.3) (2022-05-02)
|
||||
|
||||
**Note:** Version bump only for package @appium/base-driver
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [8.5.2](https://github.com/appium/appium/compare/@appium/base-driver@8.5.1...@appium/base-driver@8.5.2) (2022-04-20)
|
||||
|
||||
**Note:** Version bump only for package @appium/base-driver
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@appium/base-driver",
|
||||
"version": "8.5.2",
|
||||
"version": "8.5.3",
|
||||
"description": "Base driver class for Appium drivers",
|
||||
"keywords": [
|
||||
"automation",
|
||||
@@ -48,16 +48,16 @@
|
||||
"test:unit": "mocha \"./test/unit/**/*.spec.js\""
|
||||
},
|
||||
"dependencies": {
|
||||
"@appium/support": "^2.57.4",
|
||||
"@appium/support": "file:../support",
|
||||
"@babel/runtime": "7.17.9",
|
||||
"@colors/colors": "1.5.0",
|
||||
"async-lock": "1.3.1",
|
||||
"asyncbox": "2.9.2",
|
||||
"axios": "0.26.1",
|
||||
"axios": "0.27.2",
|
||||
"bluebird": "3.7.2",
|
||||
"body-parser": "1.20.0",
|
||||
"es6-error": "4.1.1",
|
||||
"express": "4.17.3",
|
||||
"express": "4.18.1",
|
||||
"http-status-codes": "2.2.0",
|
||||
"lodash": "4.17.21",
|
||||
"lru-cache": "7.8.1",
|
||||
@@ -67,9 +67,6 @@
|
||||
"source-map-support": "0.5.21",
|
||||
"validate.js": "0.13.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"ws": "8.5.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12",
|
||||
"npm": ">=6"
|
||||
|
||||
@@ -3,6 +3,14 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.8.5](https://github.com/appium/appium/compare/@appium/base-plugin@1.8.4...@appium/base-plugin@1.8.5) (2022-05-02)
|
||||
|
||||
**Note:** Version bump only for package @appium/base-plugin
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [1.8.4](https://github.com/appium/appium/compare/@appium/base-plugin@1.8.3...@appium/base-plugin@1.8.4) (2022-04-20)
|
||||
|
||||
**Note:** Version bump only for package @appium/base-plugin
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@appium/base-plugin",
|
||||
"version": "1.8.4",
|
||||
"version": "1.8.5",
|
||||
"description": "The base plugin used to create Appium 2.0 plugins",
|
||||
"bugs": {
|
||||
"url": "https://github.com/appium/appium/issues"
|
||||
@@ -31,7 +31,7 @@
|
||||
"test:unit": "mocha \"./test/unit/**/*.spec.js\""
|
||||
},
|
||||
"dependencies": {
|
||||
"@appium/support": "^2.57.4"
|
||||
"@appium/support": "file:../support"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12",
|
||||
|
||||
@@ -3,6 +3,14 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.16.18](https://github.com/appium/appium/compare/@appium/doctor@1.16.17...@appium/doctor@1.16.18) (2022-05-02)
|
||||
|
||||
**Note:** Version bump only for package @appium/doctor
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [1.16.17](https://github.com/appium/appium/compare/@appium/doctor@1.16.16...@appium/doctor@1.16.17) (2022-04-20)
|
||||
|
||||
**Note:** Version bump only for package @appium/doctor
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@appium/doctor",
|
||||
"version": "1.16.17",
|
||||
"version": "1.16.18",
|
||||
"description": "Test environment for fitness to run Appium",
|
||||
"keywords": [
|
||||
"automation",
|
||||
@@ -45,12 +45,12 @@
|
||||
"test:unit": "mocha \"./test/unit/**/*.spec.js\""
|
||||
},
|
||||
"dependencies": {
|
||||
"@appium/support": "^2.57.4",
|
||||
"@appium/support": "file:../support",
|
||||
"@babel/runtime": "7.17.9",
|
||||
"@colors/colors": "1.5.0",
|
||||
"appium-adb": "9.2.1",
|
||||
"bluebird": "3.7.2",
|
||||
"inquirer": "8.2.2",
|
||||
"inquirer": "8.2.4",
|
||||
"lodash": "4.17.21",
|
||||
"source-map-support": "0.5.21",
|
||||
"teen_process": "1.16.0",
|
||||
|
||||
@@ -3,6 +3,14 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [0.0.4](https://github.com/appium/appium/compare/@appium/docutils@0.0.3...@appium/docutils@0.0.4) (2022-05-02)
|
||||
|
||||
**Note:** Version bump only for package @appium/docutils
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [0.0.3](https://github.com/appium/appium/compare/@appium/docutils@0.0.2...@appium/docutils@0.0.3) (2022-04-20)
|
||||
|
||||
**Note:** Version bump only for package @appium/docutils
|
||||
|
||||
@@ -22,13 +22,7 @@ theme:
|
||||
name: material
|
||||
palette:
|
||||
- scheme: default
|
||||
toggle:
|
||||
icon: material/weather-night
|
||||
name: Switch to dark mode
|
||||
- scheme: slate
|
||||
toggle:
|
||||
icon: material/weather-sunny
|
||||
name: Switch to light mode
|
||||
primary: deep purple
|
||||
icon:
|
||||
repo: fontawesome/brands/github
|
||||
admonition:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@appium/docutils",
|
||||
"version": "0.0.3",
|
||||
"version": "0.0.4",
|
||||
"description": "Documentation generation utilities for Appium and related projects",
|
||||
"keywords": [
|
||||
"appium",
|
||||
@@ -38,11 +38,11 @@
|
||||
"test:unit": "mocha \"./test/unit/**/*.spec.js\""
|
||||
},
|
||||
"dependencies": {
|
||||
"@appium/support": "^2.57.4",
|
||||
"@appium/support": "file:../support",
|
||||
"@babel/runtime": "7.17.9",
|
||||
"docdash": "1.2.0",
|
||||
"jsdoc": "3.6.10",
|
||||
"jsdoc-plugin-typescript": "2.0.6",
|
||||
"jsdoc-plugin-typescript": "2.0.7",
|
||||
"source-map-support": "0.5.21",
|
||||
"teen_process": "1.16.0"
|
||||
},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Mike } from '../..';
|
||||
import { Mike } from '../../lib';
|
||||
import { expect } from 'chai';
|
||||
|
||||
describe('Mike', function () {
|
||||
|
||||
@@ -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.
|
||||
|
||||
# [5.1.0](https://github.com/appium/appium/compare/@appium/eslint-config-appium@5.0.6...@appium/eslint-config-appium@5.1.0) (2022-05-02)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **eslint-config-appium:** disable space-before-function-paren ([88a6655](https://github.com/appium/appium/commit/88a6655253a4879041478d64254471efebe4cbfe))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **eslint-config-appium:** adds a warning if code attempts to assign to an object prototype ([5bdc476](https://github.com/appium/appium/commit/5bdc476c626caa301c7cb4ffc01c296f437deb06)), closes [#16829](https://github.com/appium/appium/issues/16829)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [5.0.6](https://github.com/appium/appium/compare/@appium/eslint-config-appium@5.0.5...@appium/eslint-config-appium@5.0.6) (2022-04-20)
|
||||
|
||||
**Note:** Version bump only for package @appium/eslint-config-appium
|
||||
|
||||
@@ -6,22 +6,18 @@ module.exports = {
|
||||
sourceType: 'module',
|
||||
ecmaFeatures: {
|
||||
impliedStrict: true,
|
||||
experimentalObjectRestSpread: true
|
||||
}
|
||||
experimentalObjectRestSpread: true,
|
||||
},
|
||||
},
|
||||
env: {
|
||||
node: true,
|
||||
mocha: true,
|
||||
es6: true,
|
||||
},
|
||||
plugins: [
|
||||
'import',
|
||||
'mocha',
|
||||
'promise'
|
||||
],
|
||||
plugins: ['import', 'mocha', 'promise'],
|
||||
globals: {
|
||||
chai: true,
|
||||
should: true
|
||||
should: true,
|
||||
},
|
||||
rules: {
|
||||
'no-console': 2,
|
||||
@@ -29,23 +25,31 @@ module.exports = {
|
||||
radix: [2, 'always'],
|
||||
'dot-notation': 2,
|
||||
eqeqeq: [2, 'smart'],
|
||||
'brace-style': [2, '1tbs', {
|
||||
allowSingleLine: true,
|
||||
}],
|
||||
indent: [2, 2, {
|
||||
VariableDeclarator: {
|
||||
var: 2,
|
||||
let: 2,
|
||||
const: 3,
|
||||
'brace-style': [
|
||||
2,
|
||||
'1tbs',
|
||||
{
|
||||
allowSingleLine: true,
|
||||
},
|
||||
ImportDeclaration: 'first',
|
||||
CallExpression: {
|
||||
arguments: 'off',
|
||||
],
|
||||
indent: [
|
||||
2,
|
||||
2,
|
||||
{
|
||||
VariableDeclarator: {
|
||||
var: 2,
|
||||
let: 2,
|
||||
const: 3,
|
||||
},
|
||||
ImportDeclaration: 'first',
|
||||
CallExpression: {
|
||||
arguments: 'off',
|
||||
},
|
||||
MemberExpression: 'off',
|
||||
ObjectExpression: 'first',
|
||||
SwitchCase: 1,
|
||||
},
|
||||
MemberExpression: 'off',
|
||||
ObjectExpression: 'first',
|
||||
SwitchCase: 1,
|
||||
}],
|
||||
],
|
||||
'comma-dangle': 0,
|
||||
'no-empty': 0,
|
||||
'object-shorthand': 2,
|
||||
@@ -69,37 +73,61 @@ module.exports = {
|
||||
// enforce spacing
|
||||
'arrow-spacing': 2,
|
||||
'keyword-spacing': 2,
|
||||
'comma-spacing': [2, {
|
||||
before: false,
|
||||
after: true
|
||||
}],
|
||||
'comma-spacing': [
|
||||
2,
|
||||
{
|
||||
before: false,
|
||||
after: true,
|
||||
},
|
||||
],
|
||||
'array-bracket-spacing': 2,
|
||||
'no-trailing-spaces': 2,
|
||||
'no-whitespace-before-property': 2,
|
||||
'space-in-parens': [2, 'never'],
|
||||
'space-before-blocks': [2, 'always'],
|
||||
'space-before-function-paren': [2, 'always'],
|
||||
'space-unary-ops': [2, {
|
||||
words: true,
|
||||
nonwords: false,
|
||||
}],
|
||||
'space-unary-ops': [
|
||||
2,
|
||||
{
|
||||
words: true,
|
||||
nonwords: false,
|
||||
},
|
||||
],
|
||||
'space-infix-ops': 2,
|
||||
'key-spacing': [2, {
|
||||
mode: 'strict',
|
||||
beforeColon: false,
|
||||
afterColon: true,
|
||||
}],
|
||||
'key-spacing': [
|
||||
2,
|
||||
{
|
||||
mode: 'strict',
|
||||
beforeColon: false,
|
||||
afterColon: true,
|
||||
},
|
||||
],
|
||||
'no-multi-spaces': 2,
|
||||
quotes: [2, 'single', {
|
||||
avoidEscape: true,
|
||||
allowTemplateLiterals: true,
|
||||
}],
|
||||
quotes: [
|
||||
2,
|
||||
'single',
|
||||
{
|
||||
avoidEscape: true,
|
||||
allowTemplateLiterals: true,
|
||||
},
|
||||
],
|
||||
'no-buffer-constructor': 1,
|
||||
'require-atomic-updates': 0,
|
||||
'no-prototype-builtins': 1,
|
||||
'no-redeclare': 1,
|
||||
'no-restricted-syntax': [
|
||||
'warn',
|
||||
{
|
||||
selector: 'AssignmentExpression[left.object.property.name="prototype"]',
|
||||
message:
|
||||
'Avoid assignment to prototype; use class fields, methods or mixins instead.',
|
||||
},
|
||||
{
|
||||
selector:
|
||||
'CallExpression[callee.object.name="Object"][callee.property.name="assign"][arguments.0.property.name="prototype"]',
|
||||
message:
|
||||
'Avoid assignment to prototype; use class fields, methods or mixins instead.',
|
||||
},
|
||||
],
|
||||
},
|
||||
extends: [
|
||||
'eslint:recommended',
|
||||
],
|
||||
extends: ['eslint:recommended', 'prettier'],
|
||||
};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@appium/eslint-config-appium",
|
||||
"version": "5.0.6",
|
||||
"version": "5.1.0",
|
||||
"description": "Shared config for Appium's eslint style",
|
||||
"keywords": [
|
||||
"eslint",
|
||||
@@ -8,14 +8,15 @@
|
||||
"appium",
|
||||
"es2015"
|
||||
],
|
||||
"homepage": "https://appium.io",
|
||||
"bugs": {
|
||||
"url": "https://github.com/appium/appium/issues"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/appium/appium.git",
|
||||
"directory": "packages/eslint-config-appium"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/appium/appium/issues"
|
||||
},
|
||||
"license": "Apache-2.0",
|
||||
"author": "https://github.com/appium",
|
||||
"main": "index.js",
|
||||
@@ -30,20 +31,20 @@
|
||||
"lint": "eslint index.js"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@babel/core": "7.17.9",
|
||||
"@babel/core": "7.17.10",
|
||||
"@babel/eslint-parser": "7.17.0",
|
||||
"eslint": "7.32.0",
|
||||
"eslint-config-prettier": "8.5.0",
|
||||
"eslint-plugin-import": "2.26.0",
|
||||
"eslint-plugin-mocha": "9.0.0",
|
||||
"eslint-plugin-promise": "6.0.0"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"homepage": "https://appium.io",
|
||||
"engines": {
|
||||
"node": ">=12",
|
||||
"npm": ">=6"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"gitHead": "722ae145fb40bf17b0168ea8b025763f120ad574"
|
||||
}
|
||||
|
||||
@@ -3,6 +3,14 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.0.5](https://github.com/appium/appium/compare/@appium/execute-driver-plugin@1.0.4...@appium/execute-driver-plugin@1.0.5) (2022-05-02)
|
||||
|
||||
**Note:** Version bump only for package @appium/execute-driver-plugin
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [1.0.4](https://github.com/appium/appium/compare/@appium/execute-driver-plugin@1.0.3...@appium/execute-driver-plugin@1.0.4) (2022-04-20)
|
||||
|
||||
**Note:** Version bump only for package @appium/execute-driver-plugin
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@appium/execute-driver-plugin",
|
||||
"version": "1.0.4",
|
||||
"version": "1.0.5",
|
||||
"description": "Plugin for batching and executing driver commands with Appiums",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@@ -28,8 +28,8 @@
|
||||
"index.js"
|
||||
],
|
||||
"dependencies": {
|
||||
"@appium/base-plugin": "^1.8.4",
|
||||
"@appium/support": "^2.57.4",
|
||||
"@appium/base-plugin": "file:../base-plugin",
|
||||
"@appium/support": "file:../support",
|
||||
"bluebird": "3.7.2",
|
||||
"lodash": "4.17.21",
|
||||
"vm2": "3.9.9",
|
||||
|
||||
@@ -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.2.13](https://github.com/appium/appium/compare/@appium/fake-driver@3.2.12...@appium/fake-driver@3.2.13) (2022-05-02)
|
||||
|
||||
**Note:** Version bump only for package @appium/fake-driver
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [3.2.12](https://github.com/appium/appium/compare/@appium/fake-driver@3.2.11...@appium/fake-driver@3.2.12) (2022-04-20)
|
||||
|
||||
**Note:** Version bump only for package @appium/fake-driver
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@appium/fake-driver",
|
||||
"version": "3.2.12",
|
||||
"version": "3.2.13",
|
||||
"description": "Mock driver used internally by Appium for testing. Ignore",
|
||||
"keywords": [
|
||||
"automation",
|
||||
@@ -45,8 +45,8 @@
|
||||
"test:unit": "mocha \"./test/unit/**/*.spec.js\""
|
||||
},
|
||||
"dependencies": {
|
||||
"@appium/base-driver": "^8.5.2",
|
||||
"@appium/support": "^2.57.4",
|
||||
"@appium/base-driver": "file:../base-driver",
|
||||
"@appium/support": "file:../support",
|
||||
"@babel/runtime": "7.17.9",
|
||||
"@xmldom/xmldom": "0.8.2",
|
||||
"asyncbox": "2.9.2",
|
||||
|
||||
@@ -3,6 +3,14 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.3.4](https://github.com/appium/appium/compare/@appium/fake-plugin@1.3.3...@appium/fake-plugin@1.3.4) (2022-05-02)
|
||||
|
||||
**Note:** Version bump only for package @appium/fake-plugin
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [1.3.3](https://github.com/appium/appium/compare/@appium/fake-plugin@1.2.2...@appium/fake-plugin@1.3.3) (2022-04-20)
|
||||
|
||||
**Note:** Version bump only for package @appium/fake-plugin
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
"tags": [
|
||||
"appium"
|
||||
],
|
||||
"version": "1.3.3",
|
||||
"version": "1.3.4",
|
||||
"author": "Appium <maintainers@appium.io>",
|
||||
"license": "Apache-2.0",
|
||||
"repository": {
|
||||
@@ -36,8 +36,8 @@
|
||||
"build"
|
||||
],
|
||||
"dependencies": {
|
||||
"@appium/base-plugin": "^1.8.4",
|
||||
"@appium/support": "^2.57.4",
|
||||
"@appium/base-plugin": "file:../base-plugin",
|
||||
"@appium/support": "file:../support",
|
||||
"bluebird": "3.7.2",
|
||||
"lodash": "4.17.21"
|
||||
},
|
||||
|
||||
@@ -3,6 +3,14 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [6.0.9](https://github.com/appium/appium/compare/@appium/gulp-plugins@6.0.8...@appium/gulp-plugins@6.0.9) (2022-05-02)
|
||||
|
||||
**Note:** Version bump only for package @appium/gulp-plugins
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [6.0.8](https://github.com/appium/appium/compare/@appium/gulp-plugins@6.0.7...@appium/gulp-plugins@6.0.8) (2022-04-20)
|
||||
|
||||
**Note:** Version bump only for package @appium/gulp-plugins
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@appium/gulp-plugins",
|
||||
"version": "6.0.8",
|
||||
"version": "6.0.9",
|
||||
"description": "Custom gulp plugins to be used across all appium modules",
|
||||
"keywords": [
|
||||
"automation",
|
||||
@@ -41,17 +41,17 @@
|
||||
"test:e2e": "gulp e2e-test:run"
|
||||
},
|
||||
"dependencies": {
|
||||
"@appium/eslint-config-appium": "^5.0.6",
|
||||
"@babel/core": "7.17.9",
|
||||
"@appium/eslint-config-appium": "file:../eslint-config-appium",
|
||||
"@babel/core": "7.17.10",
|
||||
"@babel/eslint-parser": "7.17.0",
|
||||
"@babel/plugin-transform-runtime": "7.17.0",
|
||||
"@babel/preset-env": "7.16.11",
|
||||
"@babel/plugin-transform-runtime": "7.17.10",
|
||||
"@babel/preset-env": "7.17.10",
|
||||
"@babel/runtime": "7.17.9",
|
||||
"@octokit/rest": "18.12.0",
|
||||
"@types/mocha": "9.1.0",
|
||||
"@types/node": "16.11.27",
|
||||
"@types/mocha": "9.1.1",
|
||||
"@types/node": "16.11.33",
|
||||
"ansi-red": "0.1.1",
|
||||
"axios": "0.26.1",
|
||||
"axios": "0.27.2",
|
||||
"babel-eslint": "10.1.0",
|
||||
"babel-plugin-istanbul": "6.1.1",
|
||||
"babel-plugin-source-map-support": "2.1.3",
|
||||
|
||||
@@ -3,6 +3,14 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.1.10](https://github.com/appium/appium/compare/@appium/images-plugin@1.1.9...@appium/images-plugin@1.1.10) (2022-05-02)
|
||||
|
||||
**Note:** Version bump only for package @appium/images-plugin
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [1.1.9](https://github.com/appium/appium/compare/@appium/images-plugin@1.1.8...@appium/images-plugin@1.1.9) (2022-04-20)
|
||||
|
||||
**Note:** Version bump only for package @appium/images-plugin
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@appium/images-plugin",
|
||||
"version": "1.1.9",
|
||||
"version": "1.1.10",
|
||||
"description": "Plugin for working with images and image elements in Appium",
|
||||
"keywords": [
|
||||
"appium",
|
||||
@@ -35,10 +35,10 @@
|
||||
"test:unit": "mocha \"./test/unit/**/*.spec.js\""
|
||||
},
|
||||
"dependencies": {
|
||||
"@appium/base-driver": "^8.5.2",
|
||||
"@appium/base-plugin": "^1.8.4",
|
||||
"@appium/opencv": "^1.0.7",
|
||||
"@appium/support": "^2.57.4",
|
||||
"@appium/base-driver": "file:../base-driver",
|
||||
"@appium/base-plugin": "file:../base-plugin",
|
||||
"@appium/opencv": "file:../opencv",
|
||||
"@appium/support": "file:../support",
|
||||
"lru-cache": "6.0.0"
|
||||
},
|
||||
"appium": {
|
||||
|
||||
@@ -3,6 +3,14 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [1.0.0-beta.6](https://github.com/appium/appium/compare/@appium/relaxed-caps-plugin@1.0.0-beta.5...@appium/relaxed-caps-plugin@1.0.0-beta.6) (2022-05-02)
|
||||
|
||||
**Note:** Version bump only for package @appium/relaxed-caps-plugin
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [1.0.0-beta.5](https://github.com/appium/appium/compare/@appium/relaxed-caps-plugin@1.0.0-beta.4...@appium/relaxed-caps-plugin@1.0.0-beta.5) (2022-04-20)
|
||||
|
||||
**Note:** Version bump only for package @appium/relaxed-caps-plugin
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
"tags": [
|
||||
"appium"
|
||||
],
|
||||
"version": "1.0.0-beta.5",
|
||||
"version": "1.0.0-beta.6",
|
||||
"author": "Appium <maintainers@appium.io>",
|
||||
"license": "Apache-2.0",
|
||||
"repository": {
|
||||
@@ -32,7 +32,7 @@
|
||||
"build"
|
||||
],
|
||||
"dependencies": {
|
||||
"@appium/base-plugin": "^1.8.4",
|
||||
"@appium/base-plugin": "file:../base-plugin",
|
||||
"lodash": "4.17.21"
|
||||
},
|
||||
"scripts": {
|
||||
|
||||
@@ -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.58.0](https://github.com/appium/appium/compare/@appium/support@2.57.4...@appium/support@2.58.0) (2022-05-02)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **support:** Add a helper to deep freeze objects ([#16849](https://github.com/appium/appium/issues/16849)) ([a2b2ded](https://github.com/appium/appium/commit/a2b2ded1e4cab84b6ff9a6ecdc5bb3e544118ba0))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [2.57.4](https://github.com/appium/appium/compare/@appium/support@2.57.3...@appium/support@2.57.4) (2022-04-20)
|
||||
|
||||
**Note:** Version bump only for package @appium/support
|
||||
|
||||
@@ -166,4 +166,33 @@ function getObjectId (object) {
|
||||
return OBJECTS_MAPPING.get(object);
|
||||
}
|
||||
|
||||
export { requirePackage, getObjectSize, getObjectId };
|
||||
/**
|
||||
* Perform deep freeze of the given object (e. g.
|
||||
* all nested objects also become immutable).
|
||||
* If the passed object is of a plain type
|
||||
* then no change is done and the same object
|
||||
* is returned.
|
||||
* ! This function changes the given object,
|
||||
* so it becomes immutable.
|
||||
*
|
||||
* @param {*} object Any valid ECMA object
|
||||
* @returns {*} The same object that was passed to the
|
||||
* function after it was made immutable.
|
||||
*/
|
||||
function deepFreeze (object) {
|
||||
let propNames;
|
||||
try {
|
||||
propNames = Object.getOwnPropertyNames(object);
|
||||
} catch (ign) {
|
||||
return object;
|
||||
}
|
||||
for (const name of propNames) {
|
||||
const value = object[name];
|
||||
if (value && typeof value === 'object') {
|
||||
deepFreeze(value);
|
||||
}
|
||||
}
|
||||
return Object.freeze(object);
|
||||
}
|
||||
|
||||
export { requirePackage, getObjectSize, getObjectId, deepFreeze };
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@appium/support",
|
||||
"version": "2.57.4",
|
||||
"version": "2.58.0",
|
||||
"description": "Support libs used across appium packages",
|
||||
"keywords": [
|
||||
"automation",
|
||||
@@ -43,7 +43,7 @@
|
||||
"dependencies": {
|
||||
"@babel/runtime": "7.17.9",
|
||||
"archiver": "5.3.1",
|
||||
"axios": "0.26.1",
|
||||
"axios": "0.27.2",
|
||||
"base64-stream": "1.0.0",
|
||||
"bluebird": "3.7.2",
|
||||
"bplist-creator": "0.1.0",
|
||||
@@ -59,7 +59,7 @@
|
||||
"moment": "2.29.3",
|
||||
"mv": "2.1.1",
|
||||
"ncp": "2.0.0",
|
||||
"npmlog": "6.0.1",
|
||||
"npmlog": "6.0.2",
|
||||
"opencv-bindings": "4.5.5",
|
||||
"pkg-dir": "5.0.0",
|
||||
"plist": "3.0.5",
|
||||
@@ -85,11 +85,5 @@
|
||||
"access": "public"
|
||||
},
|
||||
"types": "./build/lib/index.d.ts",
|
||||
"devDependencies": {
|
||||
"type-fest": "2.12.2"
|
||||
},
|
||||
"overrides": {
|
||||
"type-fest": "$type-fest"
|
||||
},
|
||||
"gitHead": "722ae145fb40bf17b0168ea8b025763f120ad574"
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { should } from 'chai';
|
||||
import { node } from '../../lib';
|
||||
|
||||
describe('node utilities', function () {
|
||||
@@ -30,4 +31,17 @@ describe('node utilities', function () {
|
||||
node.getObjectId(obj2).should.eql(node.getObjectId(obj2));
|
||||
});
|
||||
});
|
||||
|
||||
describe('deepFreeze', function () {
|
||||
it('should be able to deep freeze objects', function () {
|
||||
const obj1 = {};
|
||||
node.deepFreeze(obj1).should.eql(obj1);
|
||||
const obj2 = node.deepFreeze({a: {b: 'c'}});
|
||||
should().throw(() => obj2.a.b = 'd');
|
||||
node.deepFreeze(1).should.eql(1);
|
||||
should().equal(node.deepFreeze(null), null);
|
||||
const obj3 = [1, {}, 3];
|
||||
should().equal(node.deepFreeze(obj3), obj3);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -3,6 +3,14 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.3.19](https://github.com/appium/appium/compare/@appium/test-support@1.3.18...@appium/test-support@1.3.19) (2022-05-02)
|
||||
|
||||
**Note:** Version bump only for package @appium/test-support
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [1.3.18](https://github.com/appium/appium/compare/@appium/test-support@1.3.17...@appium/test-support@1.3.18) (2022-04-20)
|
||||
|
||||
**Note:** Version bump only for package @appium/test-support
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@appium/test-support",
|
||||
"version": "1.3.18",
|
||||
"version": "1.3.19",
|
||||
"description": "A collection of test utilities used across Appium packages",
|
||||
"keywords": [
|
||||
"automation",
|
||||
@@ -45,7 +45,7 @@
|
||||
"test:unit": "mocha \"./test/unit/**/*.spec.js\""
|
||||
},
|
||||
"dependencies": {
|
||||
"@appium/support": "^2.57.4",
|
||||
"@appium/support": "file:../support",
|
||||
"@babel/runtime": "7.17.9",
|
||||
"bluebird": "3.7.2",
|
||||
"lodash": "4.17.21",
|
||||
|
||||
@@ -3,6 +3,14 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [0.2.3](https://github.com/appium/appium/compare/@appium/types@0.2.2...@appium/types@0.2.3) (2022-05-02)
|
||||
|
||||
**Note:** Version bump only for package @appium/types
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [0.2.2](https://github.com/appium/appium/compare/@appium/types@0.2.1...@appium/types@0.2.2) (2022-04-20)
|
||||
|
||||
**Note:** Version bump only for package @appium/types
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@appium/types",
|
||||
"version": "0.2.2",
|
||||
"version": "0.2.3",
|
||||
"description": "Various type declarations used across Appium",
|
||||
"keywords": [
|
||||
"appium",
|
||||
@@ -38,6 +38,6 @@
|
||||
},
|
||||
"gitHead": "722ae145fb40bf17b0168ea8b025763f120ad574",
|
||||
"dependencies": {
|
||||
"@appium/schema": "^0.0.5"
|
||||
"@appium/schema": "file:../schema"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,14 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [1.0.0-beta.8](https://github.com/appium/appium-plugins/compare/@appium/universal-xml-plugin@1.0.0-beta.7...@appium/universal-xml-plugin@1.0.0-beta.8) (2022-05-02)
|
||||
|
||||
**Note:** Version bump only for package @appium/universal-xml-plugin
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [1.0.0-beta.7](https://github.com/appium/appium-plugins/compare/@appium/universal-xml-plugin@1.0.0-beta.6...@appium/universal-xml-plugin@1.0.0-beta.7) (2022-04-20)
|
||||
|
||||
**Note:** Version bump only for package @appium/universal-xml-plugin
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@appium/universal-xml-plugin",
|
||||
"version": "1.0.0-beta.7",
|
||||
"version": "1.0.0-beta.8",
|
||||
"description": "Appium plugin for making XML source and XPath queries the same across iOS and Android",
|
||||
"keywords": [
|
||||
"appium",
|
||||
@@ -32,8 +32,8 @@
|
||||
"test:unit": "mocha \"./test/unit/**/*.spec.js\""
|
||||
},
|
||||
"dependencies": {
|
||||
"@appium/base-driver": "^8.5.2",
|
||||
"@appium/base-plugin": "^1.8.4",
|
||||
"@appium/base-driver": "file:../base-driver",
|
||||
"@appium/base-plugin": "file:../base-plugin",
|
||||
"fast-xml-parser": "3.21.1",
|
||||
"xmldom": "0.6.0",
|
||||
"xpath": "0.0.32"
|
||||
|
||||
Reference in New Issue
Block a user