Compare commits

...
Author SHA1 Message Date
Christopher Hiller e36a701058 Publish
- appium@2.0.0-beta.22
 - @appium/base-driver@8.2.1
 - @appium/doctor@1.16.7
 - @appium/eslint-config-appium@5.0.0
 - @appium/fake-driver@3.2.1
 - @appium/gulp-plugins@6.0.0
 - @appium/support@2.55.2
 - @appium/test-support@1.3.9
2021-11-19 12:07:28 -08:00
Renovate Bot 894a5928ac chore(test-support): update dependency source-map-support to v0.5.21 2021-11-19 13:23:40 +00:00
Renovate Bot 4aa28b0635 chore(gulp-plugins): update dependency @types/node to v16.11.9 2021-11-19 11:43:03 +00:00
Christopher Hiller 0b4f714549 chore(appium): rename appiumCliIgnore to appiumCliIgnored
which, hopefully, is more indicative that we have a boolean
2021-11-18 12:22:15 -08:00
Christopher Hiller b04d26ca70 test(appium): better metadata about failed appium executions, hopefully
- type fiddling
2021-11-18 12:22:15 -08:00
Christopher Hiller aa69388c7a feat(appium): support for deprecated arguments
This PR adds the `appiumDeprecated` keyword which can be used to mark an argument as deprecated in the `--help` text.

In addition:

- fix a bug where `--help` would cause Appium to exit with a nonzero exit code (it would essentially `throw undefined`)
- remove unused `lib/cli/argparse-actions` and stuff that used it, since that stuff was also unused
- implement `appiumCliIgnore`, though it's not actually being used atm.
- extract helpers for running `appium` into `test/cli/cli-helpers.js`
2021-11-18 12:22:15 -08:00
Christopher Hiller 91c3ff7f19 chore: attempt to get install-fake-driver working again in CI 2021-11-18 12:08:50 -08:00
Christopher Hiller 9a4fdaece5 test(support): fix busted path in mjpeg-e2e-specs 2021-11-18 12:08:50 -08:00
Christopher Hiller 7fb1667a3b fix(eslint-config-appium): switch to peerdeps
BREAKING CHANGE:

ESLint expects configs or plugins which require other configs or plugins to have _peer dependencies_ of those things _and_ of ESLint itself.  All deps have been changed to peer deps, and this module now requires the installation of the following _if_ using npm older than v7:

```
    "@babel/core": "7.16.0",
    "@babel/eslint-parser": "7.16.3",
    "eslint": "7.32.0",
    "eslint-plugin-import": "2.25.3",
    "eslint-plugin-mocha": "9.0.0",
    "eslint-plugin-promise": "5.1.1"
```

npm@7 will install these automatically if they do not exist.
2021-11-18 12:08:50 -08:00
Christopher Hiller b3771b0042 fix(gulp-plugins): do not transpile pkg root .js files by default
BREAKING CHANGE:

Package-root `.js` files (typically `index.js`) are now (typically) cjs wrappers.  These files needn't be transpiled, and in fact, doing so will create an invalid module because it will attempt to reference `build/whatever` but the resulting artifact would live in `build/index.js`.  `build/index.js` will no longer exist.
2021-11-18 12:08:50 -08:00
Christopher Hiller d201d64b49 fix: use relative package references
This should (hopefully) fix the Lerna issues we've been encountering.  With this change, the root monorepo lists all packages as dependencies and uses relative `file:` URLs to do so.  This means `lerna bootstrap` is no longer necessary.

In addition, defaults to `--save-exact` in `npm install` and `lerna add`.  Also installs peer dependencies of `@appium/eslint-config-appium`.
2021-11-18 12:08:50 -08:00
Christopher Hiller 57f39c5488 fix(test-support): create cjs wrapper 2021-11-18 12:08:50 -08:00
Christopher Hiller 0d7019273b fix(support): create cjs wrapper 2021-11-18 12:08:50 -08:00
Christopher Hiller a93f37ad06 fix(fake-driver): create cjs wrapper 2021-11-18 12:08:50 -08:00
Christopher Hiller 69820eaf93 fix(doctor): move index to support cjs wrapper 2021-11-18 12:08:50 -08:00
Christopher Hiller 85cd55bc2c fix(base-driver): create cjs wrapper 2021-11-18 12:08:50 -08:00
Christopher Hiller 24596d67b0 fix(appium): create cjs wrapper 2021-11-18 12:08:50 -08:00
Kazuaki Matsuo 3f7bed69fd docs: add environment about APPIUM_PREFER_SYSTEM_UNZIP (#16119) 2021-11-18 09:59:45 -08:00
Christopher Hiller 46a2041fbd fix(appium): enable --relaxed-security
The `relaxed-security` option should be stored in a property named `relaxedSecurityEnabled`, but it was stored in one named `relaxedSecurity`, which broke the functionality

Ref: https://github.com/appium/appium/discussions/16103#discussioncomment-1655985
2021-11-17 18:34:30 -08:00
Christopher Hiller 22de31d6ae chore(appium): remove unused fixture 2021-11-17 18:34:30 -08:00
Jonathan Lipps 00f578dedb docs(appium): --plugins is now --use-plugins 2021-11-17 10:38:04 -08:00
Renovate Bot a237dff45c chore(): update dependency type-fest to v2.5.4 2021-11-17 14:05:19 +00:00
Renovate Bot c17a9e4ede chore(gulp-plugins): update babel monorepo to v7.16.4 2021-11-17 11:48:28 +00:00
Renovate Bot 9ad8eb3b3a chore(appium): update dependency ajv to v8.8.1 2021-11-17 10:03:53 +00:00
Kazuaki Matsuo e7ea40a656 Revert "chore(support): update dependency klaw to v4" (#16105)
This reverts commit 6095fae8c3.
2021-11-17 05:43:22 +09:00
Jonathan Lipps 7fa14c2082 docs(appium): note change in chromedriver install args for appium 2 2021-11-16 11:56:18 -08:00
Christopher Hiller 192f5eb0b9 Publish
- appium@2.0.0-beta.21
2021-11-15 17:08:20 -08:00
Jonathan Lipps 5443b570ad fix(appium): resolve-from is a dependency 2021-11-15 12:24:42 -08:00
Jonathan Lipps d7882a15ee Publish
- appium@2.0.0-beta.20
 - @appium/base-driver@8.2.0
 - @appium/doctor@1.16.6
 - @appium/eslint-config-appium@4.7.4
 - @appium/fake-driver@3.2.0
 - @appium/gulp-plugins@5.5.5
 - @appium/support@2.55.1
 - @appium/test-support@1.3.8
2021-11-15 12:15:51 -08:00
Christopher Hiller a56cba0b03 fix(appium): ensure correct paths for schema declaration generation
- also convert script to ESM for fun
- transpiles appium just to be sure -- this generates the base schema `.json` file
2021-11-15 11:52:22 -08:00
Renovate Bot f5ef3230eb chore(appium): update dependency ajv to v8.8.0 2021-11-14 09:46:53 +00:00
Kazuaki Matsuo 1307b2554a chore(base): Make useSystemUnzip option configurable via process environment (#16082) 2021-11-13 17:40:46 +09:00
Jonathan Lipps 5b9a4c2ffa chore(appium): some cosmetic improvements to session and proxy naming etc 2021-11-12 22:15:06 -05:00
Jonathan Lipps fff6b2eb00 feat(appium): allow plugins to react to unexpected session shutdowns 2021-11-12 22:15:06 -05:00
Jonathan Lipps ead3e0723f fix(appium): stop calling plugins 'sessionless' since the name is immutable
and plugins can now migrate from sessionless to session-based
2021-11-12 22:15:06 -05:00
Jonathan Lipps 70910087d1 fix(appium): fix interaction of plugins with proxying
Previously, you could not 'await next()' in a plugin and trigger the default proxy behaviour.
Now this is possible.
2021-11-12 22:15:06 -05:00
Jonathan Lipps 9e6c0a13ef feat(fake-driver): add a new 'PROXY' context that does 'proxying' for use in testing 2021-11-12 22:15:06 -05:00
Jonathan Lipps c5f363f5d9 refactor(base-driver): all drivers now support executeCommand 2021-11-12 22:15:06 -05:00
Jonathan Lipps 3f1bb4c9c3 fix(appium): if a sessionless plugin is used for createSession, promote it to a session plugin
so it can share state within itself
2021-11-12 22:15:06 -05:00
Christopher Hiller 7052bd2f07 chore(appium): rename package.json config prop to appiumConfig
- update `configuration-system.md` docs to reflect this and a bunch of other things while I was in there
2021-11-12 14:17:59 -08:00
Renovate Bot 3c14756835 chore(): update dependency @appium/fake-plugin to v1.3.0 2021-11-12 14:45:59 +00:00
Renovate Bot 27a248835d chore(appium): update dependency @appium/base-plugin to v1.8.0 2021-11-12 12:32:43 +00:00
Christopher Hiller e951010055 fix(appium): add missing support for schema-as-object
I had intended to allow extensions to define a schema via `package.json` instead of a path to a file, and apparently forgot to implement this.  So, now it is implemented.
2021-11-11 09:19:23 -08:00
Renovate Bot 4338bb8830 chore(): update dependency appium-base-driver to v7.11.0 2021-11-11 14:01:48 +00:00
Renovate Bot 7eff3c9fe7 chore(support): update dependency bplist-parser to v0.3.1 2021-11-11 13:07:24 +00:00
Renovate Bot 3cc5a4d3a1 chore(appium): update dependency ajv to v8.7.1 2021-11-11 11:54:04 +00:00
Renovate Bot 6bdb7a045c chore(eslint-config-appium): update babel monorepo to v7.16.3 2021-11-11 01:49:34 +00:00
Christopher Hiller 7381a13da3 fix(appium): remove extra logging from config-file
Logging was happening here before the logger was properly initialized, which looked weird.  Just remove logs for now until we find a better solution.

In addition, fixed some typing problems:
- we need `@types/node` for node globals (like errors that have a `code` property)
- set various typings as globals: `node`, `mocha`, `chai` & its ilk
2021-11-10 14:44:37 -08:00
Renovate Bot 02bfd74021 chore(appium): update dependency lilconfig to v2.0.4 2021-11-10 21:40:49 +00:00
Renovate Bot 701a9aee33 chore(appium): update dependency ajv-formats to v2.1.1 2021-11-10 19:09:59 +00:00
Renovate Bot 94648da93d chore(gulp-plugins): update dependency @types/node to v16 2021-11-10 11:55:33 -05:00
Renovate Bot 3929592e6d chore(test-support): update dependency sinon to v12 2021-11-10 11:55:16 -05:00
Renovate Bot d53cbcfbf6 chore(): update dependency eslint-find-rules to v4 2021-11-10 11:54:47 -05:00
Renovate Bot 47b9f0406f chore(eslint-config-appium): update dependency eslint-plugin-import to v2.25.3 2021-11-10 11:24:56 -05:00
Renovate Bot 6095fae8c3 chore(support): update dependency klaw to v4 2021-11-10 11:24:33 -05:00
Renovate Bot cc315a944e chore(): update dependency type-fest to v2.5.3 2021-11-10 14:29:50 +00:00
Renovate Bot 69ef7520b0 chore(appium): update dependency @sidvind/better-ajv-errors to v0.9.2 2021-11-10 12:31:39 +00:00
Renovate Bot f4cf4db4cc chore(): update dependency json-schema-to-typescript to v10.1.5 2021-11-10 10:58:17 +00:00
Christopher Hiller 9a5ad9350f chore(appium): review changes
- replace `_.forEach`
- simplify `ArgSpec` constructor
- update `appium` executable description
- avoid a bunch of warnings in `cli-args-specs.js`
2021-11-09 11:57:26 -08:00
Christopher Hiller 4f2d424971 docs(appium): add configuration system technical overview 2021-11-09 11:57:26 -08:00
Christopher Hiller 68009b68dc chore(appium): commit appium-config.schema.json to vcs
- we want to reference this file from the documentation, and the easiest way to do so is just to add it to vcs.  we can change where it lives later, if necessary.
- modify gulpfile to handle this
2021-11-09 11:57:26 -08:00
Christopher Hiller 94b727eaf1 docs: update migration guide to reflect changes to configuration files, arguments, etc.
- add a JS example config file
2021-11-09 11:57:26 -08:00
Christopher Hiller 5b8c448648 docs(appium): update example configuration files 2021-11-09 11:57:26 -08:00
Christopher Hiller a940533a1b chore(appium): fix access of wrong arguments object
Prevented subcommands from working properly.
In addition, cleaned up some types; `FlattenedAppiumConfig` is now just `ParsedArgs`.
2021-11-09 11:57:26 -08:00
Christopher Hiller fc566628f5 fix(appium): avoid deprecation warning from argparse 2021-11-09 11:57:26 -08:00
Christopher Hiller 94c07a6333 chore(appium): more type fixes
- revert changes to default boolean values
- fix types w/r/t the object returned by `parseArgs()`
- `.d.ts` files _and_ `.js` files can now be checked via `tsc` (given typescript Version 4.6.0-dev.20211102 or newer); remove `jsconfig.json` in lieu of `tsconfig.json`.  js files will only be checked if `// @ts-check` pragma is present
2021-11-09 11:57:26 -08:00
Christopher Hiller a7fa66bb7d fix(appium): bad type name 2021-11-09 11:57:26 -08:00
Christopher Hiller ad69b6bcf9 chore(gulp-plugins): remove cruft from babel config 2021-11-09 11:57:26 -08:00
Christopher Hiller 95dfe24176 fix(appium): add types for parsed argument object
- add more comments explaining various types
- fix some types in `lib/main.js`
- rename `args` to `parsedArgs` to be more obvious about what's what
- `parsedArgs` is now correctly typed! I think.
- fix `NormalizedAppiumConfiguration` (and rename to `NormalizedAppiumConfig`) which was essentially incorrect, since it did not respect `appiumCliDest` (e.g., `tmp` would be `tmpDir` in the config normalized by the code, but the type would not reflect this)
- add type for `driverConfig` prop to `AppiumDriver`
- remove a bunch of `default: false` nonsense from schema
- fix `tmp`, which is now stored in `tmpDir` as it should be

Note that any source file with a `// @ts-check` in it which operates on the parsed arguments object will have type support available.  we're not linting the types (yet), but when we do, it will save us some potential headaches like incorrect usage or unknown arguments
2021-11-09 11:57:26 -08:00
Christopher Hiller b7c230c1e9 fix(appium): properly validates config files containing extension config
When combining extension schemas with the base schema, the keywords weren't quite right (the extension name was not being recognized in any config files).

refactored a few things to support this, but the nut of it is in `AppiumSchema#finalize`, where we no longer use `anyOf`.  I added a couple more functions to `ArgSpec` which generate various IDs and references in order to avoid having mysterious calls to `_.kebabCase()` everywhere.

in addition:

- no longer breaks if the exact same extension tries to register itself twice.  this can happen if one happens to, say, instantiate multiple `DriverConfig`s.  this happens in the tests.  it _should_ not happen, since it's really unnecessary, so instead of this, we have a `DriverConfig.getInstance()` (and for `PluginConfig`) which keeps track of singletons linked to `APPIUM_HOME` dirs.  at runtime, we're unlikely to ever need to instantiate multiple instances of these classes _anyway_, so it's on a per-appium-home basis mainly for testing purposes.  the constructors are still usable directly, but discouraged (now marked `@private`).
- updated tests to reflect this change.  in at least one place in the tests, we're trying to get at the actual extension class constructor, and were instantiating an extra `DriverConfig` to do that--but now we do not need to, as `DriverConfig.getInstance()` just grabs the one already created when we called `runExtensionCommand()`.
- removed unused `AppiumSchema#getAllSchemas`
- renamed "ID" to "ref" to be more clear about which identifier we're talking about--a schema reference, as one would put in a `$ref` field
- renamed arg `<extension-type>s` to `use-<extension-type>s` wherever necessary, since that arg was renamed; fix a bunch of fixtures
- restore default value of `[]` to `use-plugins`, since the code expects it to be defined
2021-11-09 11:57:26 -08:00
Christopher Hiller 0ef53d4e99 fix(gulp-plugins): fix potential race condition re: gulpfile.js
the `configure()` function in the spawn watcher could fail in some circumstances because because the task created by the call to `this.gulp.watch('./gulpfile.js')` does not actually signal completion, which can cause gulp to fail with a "did you forget to signal async completion?" error.

instead of trying to watch gulpfiles, we can just ignore them.  not ideal, but at least it won't break.
2021-11-09 11:57:26 -08:00
Christopher Hiller 867cdbcfdc chore(appium): refactor validation by referencing properties directly
previously, we'd create a new schema for every single argument.  I felt this was probably wrong... and I was right.  `ajv` allows getting the schema (and thus validation) by reference path!  so `appium.json#/properties/server/properties/address` would be the schema for `address`.
this necessitated storing the reference path for each argument, so `ArgSpec` was updated to reflect that.  further, we add references (`$ref`) to each schema added by each extension under an `anyOf` prop of the `driver` and `plugin` config attributes.

- in addition, added some more tests to more thoroughly cover branches and define behavior (especially in `toParserArgs()`)
- moved some tests into `test/schema/`
- added a couple tests for `ArgSpec`
- renamed `--plugins` to `--use-plugins` and `--drivers` to `--use-drivers`
- schema updated to nest `driver` and `plugin` under `server`.  `server` is now currently the only top-level prop.
- removed all hard-coded `$id` fields from arguments, as they aren't needed anyway (and maintaining them is likely going to be a source of bugs)
- `ArgumentDefinition` type becomes `ArgumentDefinitions` and is now a `Map`, as it's basically a devolved `Map` anyway.
- fixed problem with extensions using `appiumCliAliases`, which could allow conflicts with base appium server args.
- add some missing `appiumCliDescription` fields
2021-11-09 11:57:26 -08:00
Christopher Hiller c67b26f861 chore(schema): finish converting AppiumSchema to singleton
- `lib/schema/schema.js` now exports bound methods from the `AppiumSchema` instance
- add some specific error types
- expose `ArgSpec.toId` which is helpful if we have all of the information about an argument, but don't have its unique ID handy
- much docstrings/types
2021-11-09 11:57:26 -08:00
Christopher Hiller cab0c4c3f2 chore(appium): maintain struct to help translation of arguments
- see `schema/arg-spec.js`
- avoids problems with weirdly-named extensions
- make arg handling easier to reason about
- significantly improve speed of default value checks
- remove unused `warnNodeDeprecations`
- move extension schema reading to `extension-config`
- add a `ReadonlyMap` util class
- fixed issue with incorrectly-derived CLI argument
2021-11-09 11:57:26 -08:00
Christopher Hiller 6e362a1249 chore: update 'dev' script to NOT notify 2021-11-09 11:57:26 -08:00
Christopher Hiller 37de68df68 chore(appium): review changes
- some reformatting + import organization
- renamed some unclear variables
- created more constants
- remove schema migration code
- remove log-fiddling in `config-file-e2e-specs.js`
2021-11-09 11:57:26 -08:00
Christopher Hiller 40a5bac610 chore(fake-driver): add missing LICENSE 2021-11-09 11:57:26 -08:00
Christopher Hiller 0bb78f0870 chore(appium): ensure schema TS declaration is added to stage
`lint-staged` doesn't want to do it because reasons.  I don't think it necessarily supports the use case where if file _A_ is staged, then file _B_ should be staged--it only acts upon file _A_.

also replace the `lint:fix` script with use of `eslint` proper, since using `gulp` misses files _not_ in `packages/`.
2021-11-09 11:57:26 -08:00
Christopher Hiller 548310d018 chore(appium): use Ajv to validate CLI args
This now consumes Ajv directly to validate CLI args.  Since a JSON schema is made of JSON schemas, we can simply validate an argument against _the schema for that argument_.

- Replaced parser transformation functions (`parseSecurityFeatures()`, `parseJsonStringOrFile()`) with custom transforms which are bound to keyword `appiumCliTransformer`.  e.g., any option that can now accept a JSON string or filepath on the command line may use `appiumCliTransformer: 'json'`.  This is the default behavior for `array` and `object` -type options, which cannot easily be expressed on the CLI.  The config file does _not_ support this behavior, so the value must be whatever the schema `type` says (e.g., an `object` instead of a JSON string or filepath).  To this end, removed `parser-helpers.js`
- Further, we now disallow union types in the schema. A prop must have a single type.
- Added custom keywords `appiumCliDest`, `appiumCliDescription`, and `appiumCliTransformer`. Previously (if existed), this could have been any value--these are now typed by the schema--e.g., a number for `appiumCliDest` will fail.
- Added more types and TS checks around
- Fixed misspelling of "successfully" in various places
- Removed `@oclifg/errors` because we can now use `better-ajv-errors` to display them, as intended. It looks great!
- Moved all schema-related stuff to `lib/schema/` because I had too many modules
- Added more constants to please @mykola-mokhnach 😄
- Handles untyped properties or `null`-typed properties
- `getSchema()`, `validate()` etc now accept a schema ID. The schema ID is derived from the argument name. This is how we handle validation for each argument individually.  The config file is still validated against the entire schema at once.
- Fixed problem where only `driverConfigs` were ever used to call extension commands!
- Added some semaphore-like things to `ExtConfigIO` to avoid multiple reads/writes at once
- Fixed display of metavars in `--help`
- More tests; removed tests for removed code
2021-11-09 11:57:26 -08:00
Christopher Hiller 1a860cade2 fix(appium): restore missing call to validate extensions 2021-11-09 11:57:26 -08:00
Christopher Hiller 44be52d822 test(appium): use version constant in cli-e2e-specs 2021-11-09 11:57:26 -08:00
Christopher Hiller 237479c67c chore(appium): implement review changes
- flip if/else conditions in various places
- add export `SERVER_SUBCOMMAND` constant to `parser.js` (which is the string `server`)
- add `SERVER_PROP` constant to `schema.js` (which is also the string `server` but means a difft thing)
- more constants in `ext-config-io.js`
- add some more types in `ArgParser` constructor; simplify
- add constant regexp in `schema-args.js`
- use more lodash in `grid-register.js`
- simplify `_.includes()` call in `main.js`
- simplify error-handling in `readExtensionSchema()` of `schema.js`; fix docstring; remove associated tests
- fix a sanity check in `schema-specs.js`
2021-11-09 11:57:26 -08:00
Christopher Hiller d52c36e1ea feat(appium): configuration file and schema support
Summary: This PR adds support for configuration files (e.g., `.appiumrc.json`) and schema definitions.  Command-line options _and_ configuration is now derived from the schema(s), for Appium _and_ its extensions (both plugins and drivers).

## Dependencies
### Development
- Added `through2` for a custom gulp task to convert `appium/lib/appium-config-schema.js` to a JSON file
- Added `json-schema-to-typescript` for converting aforementioned JSON file to a `.d.ts` file (which gets published)

### Production (applies to `appium` only)
- Added `libconfig` for multi-format config file loading, which is a smaller drop-in replacement for `cosmiconfig`
- Added `ajv` for schema support and validation
- Added `ajv-formats` to understand optional value formats (e.g., `ipv4`)
- Added `@sidvind/better-ajv-errors` which provides nice error output on the CLI if the config file is invalid
- Added `@oclif/errors` for better error output on the CLI if _arguments_ are invalid

## New Modules of Note

- `lib/schema.js` consumes `ajv` to create and modify a schema
    - It exposes a handful of public API functions, so that consumers can query the schemas without actually running Appium.
    - The flow is basically this: read the base schema (`appium-config-schema.js`).  When extensions load and have schemas, add those to a pot.  When `finalizeSchema()` is called, throw the base schema into the pot as well, stir, and add to singleton `ajv` instance.  Now we can validate against the stew.
    - The schema for an extension is read and registered via `readExtensionSchema()`
    - Provides a way to get at default (for showing those "non-default" options) and `flattenSchema()` which squishes the finalized schema into a single `Record` key/value object, for use by the CLI.  This may make sense to move into `schema-args.js`
    - Provides access to ajv-and-JSON-schema-defined _formatters_ (which are basically just validation functions).  For example, if we want any string, it's just a `string`.  But if we want the string to match a regexp, that's a formatter.  (e.g., the `hostname` type)
-  lib/config-file.js` consumes `lilconfig` to read config files, validate them against the schema, and provide the result as CLI args
    - Handles conversion between kebab-case and camelCase
    - Contains `formatErrors()` which will be called after validation of a config file fails, which shows _exactly_ where the config file is wrong (usually).
- `lib/cli/schema-args.js` which serves as an adapter between the schema and `argparse`
    - Translates between JSON schema and `argparse`, which...well, I did what I could.  It's pretty close.
    - Wraps the formatters as mentioned above, and provides custom ones.
    - We cannot, unfortunately, wholly use schema validation against CLI args.  The flag names are different, the structure is different, there's no actual _file_ to compare against, and `argparse` does not help.  We _can_ use anything `argparse` natively provides, in addition to `ajv` formatters, and any custom ones (e.g., allowable number ranges).
    - Will likely end up adding more formatters corresponding to various JSON schema features later.  We _may_ be able to use _more_ of Ajv to do this (e.g., reuse its internal validators, if they are public APIs).
- `lib/appium-config-schema.js` which is the root schema. Extensions add to this before it is registered & compiled by `ajv`.
    - The basic shape is that there are three top-level props, `server`, `driver`, and `plugin`.  `server` contains all of the server options as you'd expect, and `driver` and `plugin` will be filled in by extensions.  Each will have properties corresponding to the extension name.  You can find examples in `sample-code` and the test fixtures
    - There's a gulp task that takes this file, rewrites it as JSON, then pipes it into another tool which outputs a `.d.ts` file, nicely described using all of the metadata from the schema.  This will be useful for mainly contributors, extension authors, and consumers of Appium (though not end-users).
- `lib/ext-config-io.js`
    - A new module which handles reading/writing of YAML extension config files only.
    - This class is a singleton.
    - Some logic pulled out of `extension-config.js` and into here
    - Previously, we would read/write this file multiple times (once per subclass of `ExtensionConfig`)
    - This module uses a naive dirty-tracker to persist the extension data automatically.
    - Subclasses of `ExtensionConfig` only have access to their "portion" of the config file; drivers can't see plugins and vice-versa.
    - `DRIVER_TYPE` and `PLUGIN_TYPE` originate here, mainly to avoid a circular dependency

## Modifications

- The single source of truth for the CLI _and_ config file options is the schema, with the caveats that:
    - Command-line arguments (for `appium server` are effectively a flat list, but the schema/config file is not.
    - Extension-specific configuration lives in an extension-type-specific property (`driver` or `plugin`) in the config file
        - Under each (`driver` or `plugin`), each extension may have a configuration section corresponding to the extension name
        - The shape of the extension-specific options _can_ be defined by a schema (and referenced in the `appium.schema` prop of the extension's `package.json`)
        - If an extension does not provide a schema, no validation will occur on any options found here -- TODO needs tests
    - This does _not_ affect _CLI commands_ added by extensions; only options for `server`.
- The `--appium-home` flag is now removed, as we can't find extensions without `APPIUM_HOME`, which means we can't parse arguments (because extensions may have added some).
- `--plugin-args` and `--driver-args` are removed.  These are replaced by individual flags for each argument, defined by the extension in its schema, e.g., `--driver-fake-host=127.0.0.1`
- Extensions can still define argument "constraints" using `argConstraints`, but this is considered deprecated
- `lib/main.js`
    - Now exports a few public APIs
    - split into functions `init` and `main`.  `init` is intended to be run via a consumer, which does what the old `main` did up to starting the server.  This bisection is not perfect, as `init` still does some CLI-related things; it needs to be further broken up.
    - `driverConfig.read()` and `pluginConfig.read()` are now called in `lib/cli/parser.js`.
    - Merges the CLI args, config file args, and defaults, in that order of precedence.
- `lib/grid-register.js`
    - Supports embedded configuration instead of just a path to a JSON file.
    - Not clear to me if `nodeconfig` is a thing we need to keep?
- `lib/extension-config.js`
    - Given `APPIUM_HOME` is where we keep the extensions, this file now defines `APPIUM_HOME`. It is exported from the `appium` package.
    - Add `getSchemaProblems()` method, which will read/validate/register the schema for an extension, if one exists.
    - Added many type annotations
    - `read()` and `write()` now delegate to the singleton `ExtConfigIO` instnace
    - Re-exports `DRIVER_TYPE` and `PLUGIN_TYPE`
- `lib/driver-config.js`
    - **Fix** the case where two drivers attempt to use the same `automationName`.  It appears this was intended, but did not work correctly.  This involved overloading `read()`.
- `lib/plugin-config.js`
    - Literally nothing, which is neat.
- `lib/config.js`
    - Remove unused validations (now occur via schema validation or are extension-specific)
    - Rename `getNonDefaultArgs` to `getNonDefaultServerArgs` to be more specific
    - Rewrote `getNonDefaultServerArgs`, which became much more complicated due to adding a config file and schema defaults to the mix. Flexed my lodash-fu, which is still kind of crappy because I'm better with `lodas/fp`.
- `lib/cli/parser.js`
    - Created a wrapper for `argparse`: class `ArgParser`, which replaces the monkeypatching we were doing here.
    - This class also stores extension-specific args in a namespace.  For example, `--driver-foo-bar=baz` would normally be stored in prop `driverFooBar`, but this moves it into `driver: {foo: {bar: 'baz'}}`, which will be provided to its associated extension
    - `addExtensionsToParser` renamed to `addExtensionCommandsToParser` which is more specific.
    - Removed `getDefaultServerArgs` since those now come from the schema.
    - Removed "shared args" stuff
    - `getParser` is now async, and constructs an `ArgParser`.  By necessity, the extension config YAML is read here (which is still wonky because we have to call `read()` twice; it only actually ends up reading once)
    - `getParser` also _finalizes_ the schema, which means "katamari-up the base schema and all extension schemas, then tell ajv about the result"
- `lib/cli/parser-helpers.js`
    - Allow security features to just be an array (as allowed in schema)
    - TODO: needs test
- `lib/cli/extension.js`
    - Use `APPIUM_HOME` exported from `lib/extension-config` instead of `args.appiumHome`
    - Avoids re-instantiating `ExtensionConfig` subclasses if not needed
- `lib/cli/args.js`
    - Remove all server argument definitions in lieu of schema; leave a few that do not make sense in a config file (like `--config`, which determines the location of the config file!)
    - Server args are now pulled from the schema via a call to `toParserArgs()` with overrides for various validation functions (which are confusingly "types" in `argparse` parlance).  Overrides can probably be removed or relocated to `schema-args`
    - Instantiates the `DriverConfig` and `PluginConfig` instances, which are exported.   These might want to move somewhere else
- Tests
    - Added unit tests for `extension-config`, `grid-register` which were missing
    - Added unit tests for new `schema` and `schema-args` and `config-file` modules
    - Added e2e test for config file handling
    - Other necessary modifications
    - Fix path to `fake-driver` in `driver-e2e-specs`
    - Removed stuff from `parser-specs` which no longer applies

## Other

- Added `scripts/generate-schema-declarations.js` which uses `json-schema-to-typescript` to create `appium-config.d.ts`
- Added config file samples in `.json` and `.yaml` formats
- Added custom gulp task to `appium/gulpfile.js` to generate schema in JSON format, since its "single source of truth" is actually just a big JS object
- Moved `appium` CLI-related tests into `test/cli`
- Added some declarations into `packages/appium/types`; the schema-related one is generated by the script mentioend above, but `types.d.ts` is just some stuff that was not expressible in a docstring
2021-11-09 11:57:26 -08:00
Jonathan Lipps 71357e52e1 Publish
- appium@2.0.0-beta.19
 - @appium/base-driver@8.1.2
 - @appium/doctor@1.16.5
 - @appium/eslint-config-appium@4.7.3
 - @appium/fake-driver@3.1.0
 - @appium/gulp-plugins@5.5.4
 - @appium/support@2.55.0
 - @appium/test-support@1.3.7
2021-11-09 14:07:38 -05:00
Renovate Bot 6bb9439089 chore(gulp-plugins): update babel monorepo to v7.16.0 2021-10-30 10:41:03 +00:00
Renovate Bot bcc441c612 chore(): update dependency type-fest to v2.5.2 2021-10-27 13:25:10 +00:00
Renovate Bot fb957786fa chore(support): update dependency axios to v0.24.0 2021-10-27 12:06:57 +00:00
Renovate Bot dedd1a25fa chore(): update dependency @types/sinon to v10.0.6 2021-10-27 10:11:30 +00:00
Renovate Bot 97a9d898f5 chore(): update dependency lint-staged to v11.2.6 2021-10-27 08:29:45 +00:00
Renovate Bot 05ec960c34 chore(): update dependency lint-staged to v11.2.4 2021-10-24 14:02:16 +00:00
Renovate Bot 6e28a8ffce chore(): update dependency @types/sinon to v10.0.5 2021-10-24 11:21:17 +00:00
Renovate Bot 3b16633a0a chore(gulp-plugins): update dependency replace-in-file to v6.3.2 2021-10-23 09:39:10 +00:00
Renovate Bot c69815b5e4 chore(gulp-plugins): update dependency replace-in-file to v6.3.1 2021-10-21 22:38:01 +00:00
Renovate Bot 2fae09b9f1 chore(support): update dependency axios to v0.23.0 2021-10-21 20:50:00 +00:00
Renovate Bot 7cbe1f220f chore(gulp-plugins): update dependency babel-plugin-istanbul to v6.1.1 2021-10-21 19:51:41 +00:00
Renovate Bot 54ed9292ac chore(): update dependency type-fest to v2.5.1 2021-10-21 18:39:38 +00:00
Renovate Bot 863e44e657 chore(eslint-config-appium): update dependency eslint-plugin-import to v2.25.2 2021-10-21 16:34:57 +00:00
Renovate Bot 276f5697ee chore(support): update dependency shell-quote to v1.7.3 2021-10-21 15:05:31 +00:00
Renovate Bot c3fa3c841f chore(eslint-config-appium): update dependency eslint-plugin-promise to v5.1.1 2021-10-21 14:08:13 +00:00
Renovate Bot 0d787d9002 chore(): update dependency @types/json-schema to v7.0.9 2021-10-21 12:36:38 +00:00
Renovate Bot 5c6a630686 chore(): update dependency @types/sinon to v10.0.4 2021-10-21 10:48:12 +00:00
Renovate Bot 1a6cf81d55 chore(): update dependency @types/chai to v4.2.22 2021-10-21 10:01:59 +00:00
Renovate Bot 8a6732c47c chore(doctor): update dependency appium-adb to v8.16.2 2021-10-21 08:44:48 +00:00
Renovate Bot 64c5733123 chore(): update dependency lint-staged to v11.2.3 2021-10-21 06:05:33 +00:00
Renovate Bot fb602e3741 chore(gulp-plugins): update dependency mocha to v9.1.3 2021-10-21 03:54:56 +00:00
Renovate Bot b295d85198 chore(): update dependency appium-base-driver to v7.10.1 2021-10-21 01:16:51 +00:00
Christopher Hiller a91bec3456 chore(gulp-plugins): postTranspile task always runs after transpile task; add dev task
- `postTranspile` would only run from certain _other_ tasks (like `test`).  This seemed incorrect, so now it runs after `transpile`, regardless of what task (or human) runs `transpile`.
- Added a `dev` task, which is like `watch`, except does not run tests (only transpiles)
2021-10-20 16:02:32 -07:00
Christopher Hiller 7b7a983bbe test(support): skip problem global-resolution test 2021-10-20 16:02:32 -07:00
Christopher Hiller cf7438a352 feat(fake-driver): add a schema
Adds an example schema to `fake-driver`. This is used for testing.
Also simplify assignment of commands to `FakeDriver.prototype`.
2021-10-20 16:02:32 -07:00
Christopher Hiller f0cb12d2e8 chore(eslint-config-appium): dev & test env improvements
- add `jsconfig.json` for the TS language server to understand the project
- update `.wallaby.js` to transpile fixtures if necessary; run on save to reduce lag
- update single-file Mocha debug launch config
- add `test` env in `babel.config.json` which is used by the former
- add some handy vscode tasks
- add a bunch of types
- remove unused `babel-eslint` (we use `@babel/eslint-parser`)
- bump `ecmaVersion` in `eslint-config-appium`
- remove cruft from babel configs (`shippedProposals: true` goes a long way)
- enable `sinon-chai` globally in tests
- add `rewiremock` for module-level mocking (sinon cannot do this itself, but they work in tandem)
2021-10-20 11:39:59 -07:00
Corneliu Duplachi 0e633939f9 fix(base-driver): type inconsistency (#15982)
* fix(base-driver): type inconsistency

* reset is set in BaseDriver
2021-10-18 14:30:10 -07:00
Kazuaki Matsuo 829eb6623d chore(base-driver): Add params to setWindowRect handler (#15974) 2021-10-17 08:07:04 +09:00
Renovate Bot f10c2c3630 chore(): update dependency lint-staged to v11.2.1 2021-10-09 08:58:52 +00:00
Corneliu Duplachi 476dbf3e32 chore(base-driver): add type definition for optional commands (#15931)
* feat(base-driver): add type definition for optional commands

* update type definition

* reuse Rect in Size, Position type

* fix: actions is unwrapped
2021-10-08 19:10:02 -07:00
Renovate Bot ac49b6b5db chore(gulp-plugins): update dependency @octokit/rest to v18.12.0 2021-10-08 08:49:10 +00:00
Renovate Bot 6732b1d8f6 chore(gulp-plugins): update babel monorepo to v7.15.8 2021-10-07 08:42:01 +00:00
Renovate Bot 537faa6670 chore(doctor): update dependency inquirer to v8.2.0 2021-10-06 07:54:49 +00:00
Renovate Bot 19b6b34519 chore(): update dependency lint-staged to v11.2.0 2021-10-04 13:04:37 +00:00
Renovate Bot 7a476af925 chore(support): update dependency axios to v0.22.0 2021-10-01 10:48:41 +00:00
Renovate Bot 0d0eb17acb chore(gulp-plugins): update dependency @octokit/rest to v18.11.4 2021-10-01 09:52:39 +00:00
Renovate Bot 1dc5f2916f chore(doctor): update dependency appium-adb to v8.16.1 2021-10-01 08:49:53 +00:00
Renovate Bot bf4fac2ab0 chore(gulp-plugins): update dependency @octokit/rest to v18.11.3 2021-09-30 08:29:22 +00:00
Christopher Hiller a5d91addd1 chore(pkg): obviousify scripts
- also speedify install by running `postinstall` builds in parallel
2021-09-28 07:54:20 -07:00
Christopher Hiller a172196d43 chore(base-driver): revert name change of TEST_HOST to DEFAULT_TEST_HOST
This would have been a breaking change if other packages depend on it, since I think it's a public API
2021-09-28 07:54:20 -07:00
Christopher Hiller cf86871d4f fix(base-driver): allow https in helper URL generation
- use constants/helpers for `jsonwp-proxy` url tests
2021-09-28 07:54:20 -07:00
Christopher Hiller 01d7c1bd7e fix(base-driver): better URL handling in driver-e2e tests
- fix a potential port-reuse issue in `getTestPort()` helper
- dedupe `127.0.0.1` constant
- export curried `createAppiumURL(address, port, session, pathname)` helper for less error-prone URL generation
- export some HTTP method names as constants
2021-09-28 07:54:20 -07:00
Christopher Hiller 3396594f76 chore(fake-driver): make wdio quieter 2021-09-28 07:54:20 -07:00
Christopher Hiller a3b021a0e8 chore: replace occurrences of 'localhost' with '127.0.01'; use random ports; closes #15399
- `base-driver` gets a new `helpers` module with a `getTestPort` function; this is now used throughout the tests
- `fake-driver` can't use random ports because it depends on `appium-base-driver`'s test suite, and that is _not_ the current appium-2.0-compatible `@appium/base-driver`
2021-09-28 07:54:20 -07:00
Renovate Bot 02a9b27799 chore(gulp-plugins): update dependency @octokit/rest to v18.11.2 2021-09-28 08:50:17 +00:00
Renovate Bot b1c7673f8d chore(doctor): update dependency appium-adb to v8.16.0 2021-09-26 13:51:24 +00:00
Renovate Bot c96069520a chore(gulp-plugins): update dependency yargs to v17.2.1 2021-09-26 11:52:58 +00:00
Kazuaki Matsuo 98e07de197 chore(support): Increase the default timeout for upload/download (#15894) 2021-09-26 16:11:56 +09:00
Renovate Bot 017925d9e0 chore(doctor): update dependency appium-adb to v8.15.0 2021-09-25 14:25:25 +00:00
Renovate Bot 85c1e46209 chore(gulp-plugins): update dependency mocha to v9.1.2 2021-09-25 12:58:17 +00:00
Renovate Bot 6a17749a7e chore(gulp-plugins): update dependency @octokit/rest to v18.11.1 2021-09-25 10:39:55 +00:00
Kazuaki Matsuo 0d1d3f2b66 chore(appium): apply command yml and ja resource in 1.x to 2.0 (#15881)
* chore: apply command yml and ja resource in 1.x to 2.0

* update commands

* tweak

* tweak

* remove appium prefix

* tweak toc

* tweak positions
2021-09-24 01:23:49 +09:00
Kazuaki Matsuo 1383366899 feat: Add a possibility to use PowerShell to unzip files in Windows (from appium-support#227) (#15882) 2021-09-24 01:22:34 +09:00
Renovate Bot b57c5b5035 chore(support): update dependency glob to v7.2.0 2021-09-23 11:44:55 +00:00
Renovate Bot 8f50af69f0 chore(gulp-plugins): update dependency yargs to v17.2.0 2021-09-23 10:31:08 +00:00
Renovate Bot 0d5ea9a531 chore(gulp-plugins): update dependency @octokit/rest to v18.11.0 2021-09-23 08:51:29 +00:00
Renovate Bot 760aebadac chore(fake-driver): update dependency asyncbox to v2.9.2 2021-09-21 07:47:00 +00:00
Renovate Bot 502dd81cea chore(): update dependency yaml-js to v0.3.1 2021-09-20 09:50:45 +00:00
Renovate Bot 987130981a chore(eslint-config-appium): update dependency @babel/eslint-parser to v7.15.7 2021-09-18 02:33:41 +00:00
Jonathan Lipps 01dd42ee17 Publish
- appium@2.0.0-beta.18
 - @appium/base-driver@8.1.1
 - @appium/fake-driver@3.0.5
2021-09-16 10:37:18 -07:00
Jonathan Lipps 31af0e1167 chore(base-driver): start to document BaseDriver types for TS users 2021-09-16 10:24:56 -07:00
Jonathan Lipps 4f89d398a4 Publish
- appium@2.0.0-beta.17
 - @appium/base-driver@8.1.0
 - @appium/doctor@1.16.4
 - @appium/fake-driver@3.0.4
2021-09-16 10:15:01 -07:00
Jonathan Lipps 3e5aec945b feat(base-driver): allow drivers, and plugins to declare that certain routes must never be proxied 2021-09-16 10:13:57 -07:00
Renovate Bot 650f4e2688 chore(doctor): update dependency inquirer to v8.1.5 2021-09-16 10:21:57 +00:00
Jonathan Lipps e0c7754af6 Publish
- appium@2.0.0-beta.16
 - @appium/base-driver@8.0.3
 - @appium/fake-driver@3.0.3
2021-09-15 12:02:01 -07:00
Jonathan Lipps ff3bb4f4b5 feat(appium): add env var to trigger reloading of extensions
this is useful during driver/plugin development, so the appium server does not always
need to be restarted, at least not when extensions are created on new sessions
2021-09-15 11:40:07 -07:00
Renovate Bot 96079de6b3 chore(fake-driver): update dependency asyncbox to v2.9.1 2021-09-15 08:41:36 +00:00
Jonathan Lipps 4ec2d1edd7 Publish
- appium@2.0.0-beta.15
 - @appium/base-driver@8.0.2
 - @appium/doctor@1.16.3
 - @appium/eslint-config-appium@4.7.2
 - @appium/fake-driver@3.0.2
 - @appium/gulp-plugins@5.5.3
 - @appium/support@2.54.2
 - @appium/test-support@1.3.6
2021-09-14 14:08:52 -07:00
Jonathan Lipps 47ae708945 Publish
- appium@2.0.0-beta.14
 - @appium/base-driver@8.0.1
 - @appium/doctor@1.16.2
 - @appium/fake-driver@3.0.1
 - @appium/gulp-plugins@5.5.2
 - @appium/support@2.54.1
 - @appium/test-support@1.3.5
2021-09-14 14:03:56 -07:00
Jonathan Lipps 2b170dddb6 chore(base-driver): try to fake out lerna 2021-09-14 14:01:47 -07:00
Jonathan Lipps 5d23a15035 chore(base-driver): bring lerna gitHead into line with errant publish 2021-09-14 13:57:44 -07:00
Renovate Bot 54c483ee50 chore(): update dependency sinon to v11.1.2 2021-09-14 18:44:17 +00:00
Renovate Bot 64be12ae7f chore(): update dependency mocha to v9.1.1 2021-09-14 10:40:02 -07:00
Renovate Bot 08284eacb7 chore(support): update dependency npmlog to v5 2021-09-14 10:34:53 -07:00
Renovate Bot 7cb49d59ef chore(appium): pin dependencies 2021-09-14 09:33:34 -07:00
Jonathan Lipps 44471cd1c1 chore(base-driver): no need for basedriver to be in beta since it has a new package name 2021-09-10 10:49:52 -07:00
Jonathan Lipps 8981853e2e refactor(appium): reduce duplication in cli arg setting
chore(appium): add docstrings to cli arg related methods
2021-09-10 10:35:56 -07:00
Jonathan Lipps 726cfdbdfa docs(appium): add extra note to --allow-cors to explain relationship to inspector 2021-09-10 10:35:56 -07:00
Jonathan LippsandAyan Khan c8f12d1e95 feat(appium): support plugin-specific args via --plugin-args
Co-authored-by: Ayan Khan <ayan@headspin.io>
2021-09-10 10:35:56 -07:00
Jonathan LippsandAyan Khan 050d099e87 feat!(appium): support driver-specific args via --driver-args
Co-authored-by: Ayan Khan <ayan@headspin.io>
2021-09-10 10:35:56 -07:00
Kazuaki Matsuo 6b8ac24b25 chore(base-driver): remove non-W3C route which are already in W3C (#15809)
* chore: remove some mjsonwp route

* update hash
2021-09-10 14:46:54 +09:00
Jonathan Lipps feaa90ac21 chore: get rid of shrinkwrap and related functionality 2021-09-09 13:23:43 -07:00
youngfreeFJS 61661f100e doc:cn add driver-cli.md and modify toc.js 2021-09-02 09:32:59 -07:00
youngfreeFJS d397de983a add doc:cn migrating to appium 2.0 2021-09-02 09:32:59 -07:00
Kazuaki Matsuo 71e50c5619 feat(base-driver): add /se route for log (#15788)
* feat(base-driver): add /se route for log

* fix(base-driver): fix test
2021-08-30 15:11:06 +09:00
Jonathan Lipps ab68a70856 docs(appium): add recommendations for service/cloud providers in 2.0 migration doc 2021-08-23 11:34:55 -07:00
Jonathan Lipps c9a989ab28 chore(base-driver): remove beta tag from package.json. we can publish as latest now. 2021-08-19 15:00:38 -07:00
Jonathan Lipps b671d0cef3 docs(appium): add FAQ to 1.x EOL plan 2021-08-19 14:05:44 -07:00
Jonathan Lipps 5c962965e4 docs(appium): add note about appium:options to 2.0 migration doc 2021-08-19 13:38:28 -07:00
Jonathan Lipps bf313c2b07 fix(ci): fix fossa script yml typo 2021-08-19 13:38:28 -07:00
Jonathan Lipps 4f1bf3d3b8 feat(base-driver): support appium:options capability to hold all appium caps 2021-08-19 13:38:28 -07:00
Christopher Hiller 76d147aba1 chore: configure FOSSA
FOSSA was giving us a bunch of warnings about copyleft licenses, but these licenses are only present in our examples.  This configuration file will tell FOSSA to ignore that stuff.

FOSSA recognizes `examples/` as something it should skip, but not `sample-code`.  It's easier to rename the dir than it is to negotiate a PR with FOSSA.  Why they don't allow the config file to just ignore directories is beyond me...
2021-08-18 12:25:13 -07:00
Renovate Bot 797a1990a6 chore(gulp-plugins): update dependency eslint to ^7.32.0 2021-08-17 10:34:58 -07:00
Renovate Bot 4a7b02d03a chore(gulp-plugins): update dependency babel-plugin-source-map-support to ^2.1.3 2021-08-17 10:34:41 -07:00
Jonathan Lipps eaafb29fee chore: update git tags in package.json based on last lerna release 2021-08-16 16:05:50 -07:00
478 changed files with 12046 additions and 4494 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
coverage
node_modules
sample-code/javascript-wd
examples/javascript-wd
packages/*/build/**/*
**/*.min.js
sample-code
Executable
+64
View File
@@ -0,0 +1,64 @@
# Generated by FOSSA CLI (https://github.com/fossas/fossa-cli)
# Visit https://fossa.com to learn more
version: 2
cli:
server: https://app.fossa.com
fetcher: git
project: github.com/appium/appium
analyze:
modules:
- name: appium-monorepo
type: npm
target: .
path: .
options:
strategy: node_modules
- name: appium
type: npm
target: ./packages/appium
path: ./packages/appium
options:
strategy: node_modules
- name: '@appium/base-driver'
type: npm
target: ./packages/base-driver
path: ./packages/base-driver
options:
strategy: node_modules
- name: '@appium/doctor'
type: npm
target: ./packages/doctor
path: ./packages/doctor
options:
strategy: node_modules
- name: eslint-config-appium
type: npm
target: ./packages/eslint-config-appium
path: ./packages/eslint-config-appium
options:
strategy: node_modules
- name: '@appium/fake-driver'
type: npm
target: ./packages/fake-driver
path: ./packages/fake-driver
options:
strategy: node_modules
- name: '@appium/gulp-plugins'
type: npm
target: ./packages/gulp-plugins
path: ./packages/gulp-plugins
options:
strategy: node_modules
- name: '@appium/support'
type: npm
target: ./packages/support
path: ./packages/support
options:
strategy: node_modules
- name: '@appium/test-support'
type: npm
target: ./packages/test-support
path: ./packages/test-support
options:
strategy: node_modules
+2 -2
View File
@@ -28,6 +28,6 @@ If you are reporting a bug, _always_ include Appium logs!
Please remember that with sample code it's easier to reproduce the bug and it's much faster to fix it.
Please git clone https://github.com/appium/appium and from the `sample-code` directory, use one of your favourite languages and sample apps to reproduce the issue.
Please git clone https://github.com/appium/appium and from the `examples` directory, use one of your favourite languages and sample apps to reproduce the issue.
In case a similar scenario is missing in sample-code, please submit a PR with one of the sample apps provided.
In case a similar scenario is missing in examples, please submit a PR with one of the sample apps provided.
+20 -3
View File
@@ -18,12 +18,29 @@ jobs:
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- run: |
npm install
npm test
- name: Install latest npm
run: npm install -g npm
- name: Install dependencies
run: npm install
- name: Run unit tests
run: npm test
- name: Run E2E tests
run: |
npm run install-fake-driver
npm run e2e-test
fossa-scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Analyze with FOSSA
run: |
npm install
curl https://raw.githubusercontent.com/fossas/fossa-cli/master/install.sh | sudo bash
fossa analyze
env:
FOSSA_API_KEY: ${{secrets.FOSSA_API_KEY}}
generate_docs:
needs: [build]
runs-on: ubuntu-latest
+14 -14
View File
@@ -8,10 +8,10 @@ xcuserdata
*.sublime-*
test/functional/_joined
*.iml
!sample-code/java/*.iml
!examples/java/*.iml
*.autosave
.idea/
!sample-code/java/.idea/
!examples/java/.idea/
*.log
*.t
artifacts
@@ -40,18 +40,18 @@ old
.tern-project
coverage
docs/mkdocs.yml
sample-code/javascript-wd/node_modules
sample-code/php/vendor
sample-code/php/composer.lock
sample-code/java/out/
sample-code/ruby/Gemfile.lock
sample-code/python/test/results/
sample-code/python/test/input
sample-code/python/.pytest_cache/
sample-code/csharp/test/bin
sample-code/csharp/test/obj
sample-code/csharp/test/bin
sample-code/csharp/packages
examples/javascript-wd/node_modules
examples/php/vendor
examples/php/composer.lock
examples/java/out/
examples/ruby/Gemfile.lock
examples/python/test/results/
examples/python/test/input
examples/python/.pytest_cache/
examples/csharp/test/bin
examples/csharp/test/obj
examples/csharp/test/bin
examples/csharp/packages
appium.zip
.vscode/settings.json
.nyc_output
+3 -1
View File
@@ -1,2 +1,4 @@
# Do not disable package-lock. Disabling package-lock also disables npm-shrinkwrap
package-lock=true
package-lock=true
save-exact=true
+9 -9
View File
@@ -2,20 +2,20 @@
"version": "0.2.0",
"configurations": [
{
"args": [
"--require",
"@babel/register",
"--timeout",
"999999",
"--colors",
"${file}"
],
"args": ["--colors", "--timeout", "0", "${file}"],
"internalConsoleOptions": "openOnSessionStart",
"name": "Test - Current File",
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
"runtimeArgs": ["-r", "@babel/register"],
"request": "launch",
"skipFiles": ["<node_internals>/**"],
"type": "pwa-node"
"type": "pwa-node",
"sourceMaps": true,
"cwd": "${workspaceFolder}",
"outfiles": [],
"env": {
"NODE_ENV": "test"
}
},
{
"name": "Debug",
+150
View File
@@ -0,0 +1,150 @@
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "build",
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": [],
"label": "npm: build",
"detail": "lerna exec gulp transpile"
},
{
"type": "shell",
"command": "npm",
"args": [
"exec",
"--",
"lerna",
"exec",
"--scope=@appium/fake-driver",
"--",
"gulp",
"transpile"
],
"label": "transpile: @appium/fake-driver",
"problemMatcher": []
},
{
"type": "shell",
"command": "npm",
"args": [
"exec",
"--",
"lerna",
"exec",
"--scope=appium",
"--",
"gulp",
"transpile"
],
"label": "transpile: appium",
"problemMatcher": []
},
{
"type": "shell",
"command": "npm",
"args": [
"exec",
"--",
"lerna",
"exec",
"--scope=@appium/support",
"--",
"gulp",
"transpile"
],
"label": "transpile: @appium/support",
"problemMatcher": []
},
{
"type": "shell",
"command": "npm",
"args": [
"exec",
"--",
"lerna",
"exec",
"--scope=@appium/test-support",
"--",
"gulp",
"transpile"
],
"label": "transpile: @appium/test-support",
"problemMatcher": []
},
{
"type": "shell",
"command": "npm",
"args": [
"exec",
"--",
"lerna",
"exec",
"--scope=@appium/gulp-plugins",
"--",
"gulp",
"transpile"
],
"label": "transpile: @appium/gulp-plugins",
"problemMatcher": []
},
{
"type": "shell",
"command": "npm",
"args": [
"exec",
"--",
"lerna",
"exec",
"--scope=@appium/doctor",
"--",
"gulp",
"transpile"
],
"label": "transpile: @appium/doctor",
"problemMatcher": []
},
{
"type": "shell",
"command": "npm",
"args": [
"exec",
"--",
"lerna",
"exec",
"--scope=@appium/base-driver",
"--",
"gulp",
"transpile"
],
"label": "transpile: @appium/base-driver",
"problemMatcher": []
},
{
"type": "shell",
"command": "node_modules/.bin/mocha",
"args": [
"--bail",
"-r",
"@babel/register",
"-t",
"20s",
"packages/appium/test/*e2e-specs.js"
],
"label": "appium: E2E",
"problemMatcher": []
},
{
"type": "npm",
"script": "dev",
"problemMatcher": [],
"isBackground": true,
"label": "npm: dev",
"detail": "lerna exec --parallel gulp dev"
}
]
}
+3 -5
View File
@@ -16,6 +16,7 @@ module.exports = (wallaby) => {
'!./packages/**/test/**/*-specs.js',
'!./packages/*/node_modules/**',
'!./packages/*/gulpfile.js',
'./packages/*/test/**/fixtures/**/*',
// below this are fixtures
{
binary: true,
@@ -25,10 +26,6 @@ module.exports = (wallaby) => {
instrument: false,
pattern: './packages/support/test/assets/sample_text.plist',
},
{
instrument: false,
pattern: './packages/*/test/**/fixtures/**/*',
},
{
instrument: false,
pattern: './packages/base-driver/static/**/*',
@@ -55,6 +52,7 @@ module.exports = (wallaby) => {
},
setup() {
require('./test/setup');
}
},
runMode: 'onsave'
};
};
+8 -13
View File
@@ -4,22 +4,13 @@
"@babel/preset-env",
{
"targets": {
"node": "10"
}
"node": "12"
},
"shippedProposals": true
}
]
],
"plugins": [
"source-map-support",
"@babel/plugin-transform-runtime",
"@babel/plugin-syntax-bigint",
"@babel/plugin-proposal-nullish-coalescing-operator",
"@babel/plugin-proposal-numeric-separator",
"@babel/plugin-proposal-optional-chaining",
["@babel/plugin-proposal-private-methods", {"loose": true}],
["@babel/plugin-proposal-class-properties", {"loose": true}],
["@babel/plugin-proposal-private-property-in-object", {"loose": true}]
],
"plugins": ["source-map-support", "@babel/plugin-transform-runtime"],
"comments": false,
"sourceMaps": "both",
"env": {
@@ -32,6 +23,10 @@
}
]
]
},
"test": {
"retainLines": true,
"comments": true
}
}
}
-29
View File
@@ -1,29 +0,0 @@
steps:
- task: NodeTool@0
inputs:
versionSpec: '12.x'
- script: npm install
displayName: NPM install
- script: |
git remote add triager https://triager:$GITHUB_TOKEN@github.com/appium/appium
git checkout -b $MINOR_BRANCH_NAME
git status
node ./ci-jobs/scripts/set-package-json-version
rm -rf package-lock.json
npm shrinkwrap
git add .
git commit -n -m "Set version to $(MINOR_BRANCH_NAME).0-rc.0"
git push -u triager $MINOR_BRANCH_NAME
displayName: Create branch
env:
GITHUB_TOKEN: $(GITHUB_TOKEN)
MINOR_BRANCH_NAME: $(MINOR_BRANCH_NAME)
- script: |
git tag $MINOR_BRANCH_NAME.0-rc.0
git push --tags -u triager
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc
npm publish --tag $(node ./ci-jobs/scripts/parse-tag)
env:
NPM_TOKEN: $(NPM_TOKEN)
displayName: Tag and Publish
+1 -1
View File
@@ -12,7 +12,7 @@ jobs:
- task: NodeTool@0
inputs:
versionSpec: '12.x'
- script: npm ci || npm install # "npm ci" if shrinkwrap is present
- script: npm install
displayName: Install NPM Dependencies
- script: npm run build
displayName: npm run build
@@ -0,0 +1,256 @@
# 从 Appium1.x 迁移到 Appium2.x
如果你正在使用 Appium1.x,并期望迁移至 Appium2.x,这份文档可以作为您的迁移指南。它包含了一系列我们重大变化的修改、您如何改变您的环境或测试套件来对 Appium2.0进行兼容。
## Appium 2.0 概述
Appium 2.0 是 Appium 近5年来最重要的新版本。首先,Appium2.0 最大的变化,*并不是* 对不同平台上的测试行为发生了改变。相反的,Appium 2.0 将Appium 重新定义为一个*平台*,它(Appium2.0)让驱动 (driver)(引入对给定平台自动化支持的代码项目)、插件(plugin)(允许覆盖、修改、扩展或向Appium添加行为的代码项目)变得更易创建与分享。
与此同时,Appium项目正在利用这个机会删除许多旧的和被弃用的功能。
这些都对Appium的安装方式、驱动程序和各种特性的管理方式以及协议支持等方面带来了一些重大变化。以下是详细说明。
## 重大变化
查看[Appium 2.0发布说明](https://github.com/appium/appium/releases/tag/v2.0.0-beta)以获得更全面的变更列表。这里有我们所郑重展示的重大变化,与您需要为他们做的一些事情。
#### :bangbang: 在准备过程中安装需要的驱动(drivers)
如果您使用过 Appium1.x,所有的能支持使用的驱动(driver)都会在同一时间通过Appium主服务安装好。现在已经不是这样了。简单地安装 Appium 2.0(例如,通过' npm install -g Appium '),将只会安装没有任何驱动(driver)的 Appium 的主服务。如果想要安装驱动(driver),您必须使用新的 [Appium 扩展命令行工具(Appium extension CLI)](../drivers/driver-cli.md)。例如,要安装XCUITest和UiAutomator2驱动程序的最新版本,在安装Appium之后,您将运行以下命令:
```
appium driver install xcuitest
appium driver install uiautomator2
```
执行安装命令后,您的驱动程序已经安装就绪。使用这个CLI可以做的事情还有很多,所以一定要查看它的文档。
如果您正在CI环境中运行,或期望在安装后接着安装一些驱动(driver),可以在安装时添加一些参数,如:
```
npm install -g appium --drivers=xcuitest,uiautomator2
```
这将为您一次性安装Appium和两个驱动程序。
#### :bangbang: 驱动(driver)更新
在过去,要更新 iOS 或 Android 驱动程序,你只需等待这些更新被整合到新发行的 Appium 中,然后更新你的 Appium 版本。在 Appium2.0,Appium 服务器和Appium 驱动(driver)的版本和发布是分开的。这意味着驱动(driver)的更新可以按照驱动本身的发布节奏进行发布,您可以在驱动程序更新发生时进行更新,而不是等待新的Appium服务器发布。检查驱动程序更新的方法是使用CLI:
```
appium driver list --updates
```
如果有任何驱动(driver)可以更新了,你可以对任何给定的驱动(driver)执行' update '命令:
```
appium driver update xcuitest
```
要更新 Appium 服务器本身,您需要执行与过去相同的操作:' npm install -g Appium '。现在,安装新版本的 Appium 服务器将不会影响您的驱动程序,因此整个过程将会更快。
#### :bangbang: 协议的变更
Appium 的 API 基于[W3C WebDriver协议](https://www.w3.org/TR/webdriver/),并且多年来一直遵循该协议。在 W3C WebDriver 协议被设计成 web 标准之前,Selenium 和 Appium 都曾使用了其他几个协议。这些协议是 "JSONWP" (JSON有线协议) 和 "MSJONWP"(移动JSON有线协议)。W3C协议与(M)JSONWP协议有几处不同。
在Appium 2.0之前,Appium支持这两种协议,因此较老的Selenium/Appium客户端(client)仍然可以与较新的Appium服务器通信。今后,对旧协议的支持将被移除。
:bangbang: *功能*
新旧协议之间的一个重要区别是功能的格式。以前称为“所需的功能”,现在简单地称为“功能”,现在对任何非标准功能都需要一个所谓的“供应商前缀”。标准的功能列表在[WebDriver协议规范](https://www.w3.org/TR/webdriver/#capabilities)中给出,包括一些常用的功能,如“browserName”和“platformName”。
这些标准功能仍可以按原来的方式使用。但是所有功能的名称中必须包含一个“供应商前缀”。vendor前缀是一个冒号后面的字符串,例如' appium: '。Appium的大多数功能都超出了标准的W3C功能,因此必须包含供应商前缀(我们建议您使用' appium: ',除非文档另有指示)。例如:
* `appium:app`
* `appium:noReset`
* `appium:deviceName`
针对Appium 2.0的测试套件来说,这些改变,可能是也可能不是一个重大的变化。如果你正在使用一个已经适配更新的 Appium 客户端(如:Appium-java-client等),客户端会在所有必要的功能上为你添加' appium: '前缀。新版本的Appium Inspector工具(如:Appium Desktop 或 Appium inspector)也会这样做。
基于云的Appium提供商也可能这样做。因此,只要注意:如果您得到提示消息,说您的功能缺少供应商前缀,这就是解决问题的方法。
另外,使用不支持W3C协议的WebDriver客户端启动Appium会话将不再允许(请参阅下面关于WD库这种效果的注释)。
为了让每个人的生活更容易一些,我们还引入了一个选项,将所有与appium相关的功能打包到一个对象功能中,即 "appium:options"。你可以将任何你通常会在这个功能上添加' appium: '前缀的东西捆绑在一起。以下是一个关于如何在Safari浏览器上使用 "appium:options" 启动 iOS 会话的示例(基于原始JSON):
```json
{
"platformName": "iOS",
"browserName": "Safari",
"appium:options": {
"platformVersion": "14.4",
"deviceName": "iPhone 11",
"automationName": "XCUITest"
}
}
```
(当然,每个客户端都有不同的方式来创建结构化功能,如“appium:options”或其他你可能见过的功能,如“goog:chromeOptions”)。注意:在“appium:options”中显示的能力将覆盖在对象顶层显示的相同名称的能力。
:bangbang: *被删除的命令*
那些旧的JSON有线协议的一部分,并且不是W3C协议的一部分的命令不再可用:
* TODO (这些命令正在被归纳和删除,完成后将在这里进行更新)
如果您使用最新的 Appium 或 Selenium 客户端(client),那么无论如何您都不应该再访问这些文件,因此任何重大的改变都会首先在客户端体现。
#### :bangbang: 图像分析功能移至插件(plugin)
Appium 2.0 的设计目标之一,是将非核心特性迁移到称为[插件(plugins)](#TODO)的特殊扩展中。这会让大家选择性地、按需地花费功夫去安装并设置这些。
Appium 的各种图像相关特性(图像比较、根据图像查找元素等)已经转移到官方支持的插件[图像插件(images)](https://github.com/appium/appium-plugins/tree/master/packages/images)中。
如果您使用了这些与图像相关的方法,并且需要继续使用它们,您需要做两件事。
1. 安装插件:`appium plugin install images`
2. 确保你启动了Appium服务器,通过在命令行指定的插件列表中包含它来运行插件,例如,`appium --plugins=images`
与图像相关的命令也将在客户端删除,这意味着您需要按照插件README上的说明安装客户端插件来访问这些功能。
#### :bangbang: 删除一些旧的驱动(driver)
The old iOS and Android (UiAutomator 1) drivers and related tools (e.g., `authorize-ios`) have been removed. They haven't been relevant for many years anyway.
旧版本的 iOS 与 Android 驱动(driver)(UiAutomator 1) 及相关联的工具(如:`authorize-ios`)已经被删除。他们已经很多年不被使用了。
#### :warning: 内部包重命名
一些 appium 内部的 NPM 包被重命名 (如:`appium-base-driver` 改为 `@appium/base-driver`)。这并不是一个突破性的变化,只是为了那些已经构建了直接合并Appium代码的软件的人来进行了解。
#### :warning: 不再支持“WD”JavaScript客户端库
多年来,Appium的一些作者维护了[WD](https://github.com/admc/wd)客户库。此库已弃用,并没有更新以与W3C WebDriver协议一起使用。因此,如果您正在使用这个库,您将需要转向一个更新的库。我们建议(WebdriverIO) (https://webdriver.io)。
#### :warning: 将 Appium 检查器(Appium Inspector)从 Appium Desktop 中分离出来
Appium Desktop 的检查器部分(查看页面元素树的功能)已经转移到它自己的app,Appium 检查器(Appium Inspector): [github.com/appium/appium-inspector](https://github.com/appium/appium-inspector)。它完全兼容Appium 2.0服务器。如果您只需要对页面元素树进行检查与操作,那么下载并运行检查器单独的app即可,不需要一定得下载GUI 版本的 Appium Desktop了。Appium Desktop 仍在原来的地方维护中,[github.com/appium/appium-desktop](https://github.com/appium/appium-desktop)。只是它不再会与检查器完全捆绑在一起了。
您也可以不需要下载 Appium 检查器(Appium Inspector),直接从网页访问[web version of Appium Inspector](https://inspector.appiumpro.com)。注意,要针对本地服务器进行测试,您需要使用`--allow-cors`启动服务器,以便基于浏览器的Appium Inspector可以访问您的Appium服务器来启动会话。
## 重要的新特性
除了上面提到的重大变化之外,本节列出了一些您也许会喜欢的 Appium 2.0 重要的新特性。
#### 插件(Plugins)
:tada: *服务端插件(Server Plugins)*
TODO
:tada: *客户端插件(Client Plugins)*
TODO
#### :tada: 从任何地方下载驱动(driver)与插件(plugin)
TODO
#### :tada: 驱动(driver)与插件(plugin)的命令行参数
TODO
## 云提供商的特别说明
本文之外的地方一般是Appium的通用部分,但Appium 2.0中的一些架构更改将对与Appium相关的服务提供商(无论是基于云的Appium主机还是内部服务)构成重大变化。最终,Appium服务器的维护者负责安装和提供终端用户可能希望使用的各种Appium驱动程序和插件。
有了 Appium 2.0,我们进入了一个新时代,终端用户可以使用各种独立版本的驱动(driver)和插件(plugin)。在 Appium 1.x 上,这是无法实现的。因为任何给定的 Appium 版本都会包含且仅包含每个驱动(driver)的一个版本。当然,这取决于每个服务提供商希望如何实现任何官方或第三方驱动程序或插件的发现、安装和可用性。但 Appium 团队希望就服务提供商支持的功能提出建议,以确保整个行业的一致性。这只是一个建议,而不是一个标准,但是采用它将帮助用户应对在云环境中使用 Appium 2.0 可能带来的日益增加的复杂性。
### 建议使用的功能
除了标准的`platformName`, `appium:deviceName`, `appium:automationName`, 与 `appium:platformVersion`,我们建议使用 `$cloud:appiumOptions`, 当标签为:`$cloud` 并不是要直接按这个写,而是应该被你的供应商前缀替换(举几个例子,HeadSpin应该是' HeadSpin ', Sauce Labs应该是' Sauce ', BrowserStack应该是' BrowserStack ')。`appium:platformVersion` 功能本身将是一个JSON对象,具有以下内部key:
|能力(Capability)|作用域(Used for)|示例(Example)|
|----------|-------|-------|
|`version`|指定用于托管和管理驱动程序的 Appium 服务器版本。如果不写,按提供商提供的为准,但建议提供最新的官方版本|`2.0.0`|
|`automationVersion`|指定应该使用指定驱动程序的哪个版本。|`1.55.2`|
|`automation`|指定要使用的自定义驱动程序(参见下面的更多信息)。将会覆盖: `appium:automationName` and `$cloud:automationVersion`|`{"name": "org/custom-driver", "source": "github", "package": "custom-driver"}`|
|`plugins`|指定要激活的插件列表(以及可能的插件版本)(参见下面的更多信息)。|`["images", "universal-xml"]`|
### 基础示例
Appium扩展(驱动程序和插件)有一组属性,指定它们可以从哪里安装。云提供商显然没有义务为任意指定的扩展提供支持,因为这些扩展可能使得在托管环境中运行的不可信代码。在不支持任意扩展的情况下,`appium:automationName`, `$cloud:automationVersion`, 与 `$cloud:appiumPlugins`的功能应该足够了。以下JSON对象表示会话的功能:
```json
{
"platformName": "iOS",
"appium:platformVersion": "14.4",
"appium:deviceName": "iPhone 11",
"appium:app": "Some-App.app.zip",
"appium:automationName": "XCUITest",
"$cloud:appiumOptions": {
"appiumVersion": "2.0.0",
"automationVersion": "3.52.0",
"plugins": ["images"],
}
}
```
这组功能参数,指示 Appium 2.0 服务器支持 `3.52.0` 版本的 XCUITest 驱动程序,并激活`images`插件。云提供商很容易验证这个集合。显而易见,云提供商可以通过这些功能参数,做任何它想做的事情来响应这些功能,包括:动态下载Appium、驱动程序和插件包,或者如果请求的版本不在一个支持的集中,或者提示插件不支持,等等……
### `appium:options`的基础示例
前面的例子看起来仍然有点混乱,所以我们当然也建议云提供商支持 `appium:options` 参数,就像上面详细描述的那样,这可以将之前的功能集变成以下参数:
```json
{
"platformName": "iOS",
"appium:options": {
"platformVersion": "14.4",
"deviceName": "iPhone 11",
"app": "Some-App.app.zip",
"automationName": "XCUITest",
},
"$cloud:appiumOptions": {
"appiumVersion": "2.0.0",
"automationVersion": "3.52.0",
"plugins": ["images"],
}
}
```
### 扩展对象
一些服务提供商可能希望动态地允许访问 Appium 2.0 CLI 的所有特性,包括下载任意驱动程序和插件。为了支持使用这些扩展,我们可以定义特殊的JSON“扩展对象”,关键字如下:
* `name`: 扩展名。这是一个NPM包名(如果是从NPM下载),或者是一个git或GitHub规格(如果是从git服务器或GitHub下载)。
* `version`: 扩展的版本,例如NPM包版本或Git SHA。
* (optional) `source`: 扩展可以从哪里下载的表示。建议支持以下值: `appium`, `npm`, `git`, `github`。 这里的: `appium` 表示" Appium 自己的官方列表",如果不包含此key,`appium` 则应该是默认值。
* (optional) `package`: 当从git或github下载扩展时,扩展的NPM包名也必须提供。对于非git源,这是可选的。
由于每个会话都由单个驱动程序处理,`$cloud:appiumOptions`/`$automation` 功能参数可以与扩展对象值一起使用,以表示该驱动程序,例如:
```json
{
...,
"$cloud:appiumOptions": {
...,
"automation": {
"name": "git+https://some-git-host.com/custom-driver-project.git",
"version": "some-git-sha",
"source": "git",
"package": "driver-npm-package-name"
},
...
},
...
}
```
由于会话可以处理多个插件,`$cloud:appiumPlugins` 列表中的每个值也可以是一个扩展对象,而不是字符串,这样就可以请求特定的版本:
```json
{
...,
"$cloud:appiumOptions": {
...,
"plugins": [{
"name": "images",
"version": "1.1.0"
}, {
"name": "my-github-org/my-custom-plugin",
"version": "a83f2e",
"source": "github",
"package": "custom-plugin"
}],
...,
}
...
}
```
这些都是本文建议的说明性示例。当然,要由服务提供商在他们的前端/负载均衡器上实现对这些功能的处理,去完成任何情况下的错误检查,或运行任何一个用户请求的`appium driver` 或 `appium plugin` 。本节只是关于服务提供商如何设计他们面向用户的功能 API 的建议,如果他们自己运行 Appium,原则上支持 Appium 为最终用户提供的所有功能。
+77
View File
@@ -0,0 +1,77 @@
## Appium 2.0 驱动的命令行工具 Command Line Interface (CLI)
Appium 将使用某种利用自动化技术,实现某个平台自动化的软件称为"驱动程序(driver)"。包括 iOS、Android 及其他平台。在 Appium 2.0 上,将不会您下载 Appium 时,按以往那样,默认下载所有驱动(driver)。因为这样被下载的驱动太多了。取而代之的,是您可以使用一个特殊的命令行来指导 Appium 为您安装和注册驱动程序,以便能够真正用到您需要的驱动。本文档强调了该界面中可用的各种命令。
### 概述
所有这些命令都可以在输入`appium driver`后使用。例如,在本文档中,定义为`list`的命令将以以下方式使用:
```
appium driver list
```
*公共参数*
这里有些所有命令都可用的公共参数:
|参数|描述|默认值|
|----|-----------|-------|
|`-ah`, `--home`, `--appium-home`|设置 APPIUM_HOME 目录的路径,该目录将安装驱动程序和插件,并将维护驱动程序/插件清单,|如果设置了该参数,默认值为设置的地址,否则默认地址为:`$HOME/.appium`|
|`--json`|只输出JSON格式的命令返回结果,而不输出人们可读的日志信息|默认值为false。通过包含此标志设置为true。|
### `list`
该命令无参数时,按名称列出可安装的驱动程序,以及通过任何方式安装的驱动。
|参数|描述|默认值|
|----|-----------|-------|
|`--installed`|只展示已安装的|否|
|`--updates`|对于通过NPM安装的驱动程序,检查并显示任何更新|否|
|示例|描述|
|-------|-----------|
|`appium driver list`|列出可用的驱动程序|
|`appium driver list --installed`|列出已安装的驱动程序|
|`appium driver list --updates`|列出已安装且可更新的驱动程序|
### `install`
该命令使用驱动名称或规格,或来源标识(如果它不是正式驱动程序)来作为参数,
|参数|描述|默认值|
|----|-----------|-------|
|`--source`|如果不是官方驱动,可以按以下几种方式之一来表示: `npm`, `local`, `github`, `git`|None|
注意,对于任何通过NPM安装的驱动程序(包括官方驱动程序,以及使用`--source=npm`安装的驱动),你可以在驱动程序名称后面使用任何有效的NPM安装规范,如:`xcuitest@2.1.2` 将会安装指定版本的XCUITest驱动程序。
|示例|描述|
|-------|-----------|
|`appium driver install xcuitest`|下载安装官方 XCUITest 驱动|
|`appium driver install xcuitest@2.1.2`|下载安装官方指定版本的 XCUITest 驱动|
|`appium driver install --source=npm appium-fake-driver`|通过 NPM 下载安装 `appium-fake-driver` |
|`appium driver install --source=github appium/appium-fake-driver`|从 github 下载安装 `appium-fake-driver` 驱动|
|`appium driver install --source=local /path/to/driver/directory`|从本地文件安装|
### `update`
该命令通过添加已经安装的驱动名称,或关键词 `installed`,来自动更新一个或所有的驱动(如果用了: `installed`)。
注意:这将更新驱动程序到最高可用的小版本(minor version),但将*不*更新到新的大版本(major version)。因为可能包含一些重大变化。如果期望更新到大版本,使用参数:`--unsafe`
|参数|描述|默认值|
|----|-----------|-------|
|`--unsafe`|更新到一个大版本|None|
|示例|描述|
|-------|-----------|
|`appium driver update xcuitest`|更新 XCUITest 驱动到最新的安全版本|
|`appium driver update installed`|更新所有已安装的驱动到最新的安全版本|
|`appium driver update --unsafe xcuitest`|更新 XCUITest 驱动到最新版本 (即使是最新的大版本)|
### `uninstall`
删除一个驱动.
|示例|描述|
|-------|-----------|
|`appium driver uninstall xcuitest`|删除 XCUITest 驱动|
+74 -6
View File
@@ -1,12 +1,11 @@
# Appium version 1 End Of Life (EOL) Plan
Appium 1 has been around for quite a while and now is the time to move
project development forward and to provide even better automation
experience with Appium version 2.
Appium 1 has been around for quite a while and now is the time to move project development forward
and to provide even better automation experience with Appium version 2.
## Upgrading to Appium 2.x
While Appium 2.0 leaves most of the fundamental automation behaviors from the various platfrom
While Appium 2.0 leaves most of the fundamental automation behaviors from the various platform
drivers untouched, it does rework the way that drivers are installed and accessed, and enforces
stricter protocol usage, among other changes. For that reason, it's important to fully read,
understand, and implement the steps discussed in the [Appium 1.x to 2.x Migration
@@ -29,8 +28,8 @@ release of Appium 2.0 (until March 15, 2022):
* Bug fixes to the Appium 1.x server.
Once the 6 months of transition have passed, we will publish new versions of the core drivers that
will only be compatible with Appium 2.x. From that point forward, no features, platform support, or
patches will be added to 1.x.
will only be guaranteed to be compatible with Appium 2.x. From that point forward, no features,
platform support, or patches will be added to 1.x.
Based on the current release schedule, it is likely that Appium 1.22.x will be the last in the set
of Appium 1.x releases.
@@ -39,3 +38,72 @@ of Appium 1.x releases.
Since Appium 2.0's documentation may not be published on the website until its release, you may
want to check out the `docs` folders in this repo, under the `2.0` git branch.
## FAQ
<b>Will Appium 1.x stop working for me after the EOL date?</b>
No. Appium is not a service. Existing versions of Appium will continue to work just fine. You
can keep using Appium 1.x for years if you want. However, bugs found in Appium 1.x will not be
fixed after the EOL date, and updates to make drivers compatible with new OS/platform updates may
not be compatible with Appium 1.x after the EOL date, so older versions of Appium are not
guaranteed to support, for example, new versions of iOS or Android.
<b>What is Appium's existing "support" strategy?</b>
With Appium 1.x (and with 2.x moving forward), no patches are made to existing versions or
backported to previous version lines. Changes are always only released in new versions. If you
discover a bug in, say, Appium 1.22.1, and it is fixed, that fix would be released in Appium
1.22.2, or Appium 1.23.0. The fix will not be retroactively applied to Appium 1.21 or any earlier
version. For this reason, it's important to always be using the latest version of Appium. The
only exception to this rule will be the transition period before the 1.x EOL date, wherein the
team will release new versions of Appium 1.x if necessary, while also releasing the 2.x line.
<b>How will Appium 1.x receive updates between the release of 2.0 and the 1.x EOL date? What kind
of updates will they be?</b>
With Appium 1.x, there were basically two kinds of updates:
1. Updates to Appium core code, including the Appium server, internal libraries, etc...
2. Updates to platform drivers (like the XCUITest driver, where many updates happened in the
WebDriverAgent project, or like the UiAutomator2 driver).
All of these updates were bundled haphazardly together in the course of an
Appium 1.x release. With Appium 2.x, these kinds of updates are appropriately disentangled. Appium
2.x core updates will be released as new versions of Appium 2.x, but these updates will not be
related at all to changes in platform driver code. Instead, drivers will maintain their own release
schedules, and new versions of drivers can be used without necessarily upgrading the Appium server
version (see the migration doc for more information on how to do this). With that context, we can
say that Appium 1.x will continue to receive the two types of updates mentioned, with the caveat
that the core Appium 1.x code will only see important bugfixes, and no feature development. So to
summarize, during the transition period, Appium 1.x will receive the following kinds of updates:
1. Important bugfixes to the core 1.x code (server, etc...)
2. All updates to platform driver code (this is made possible because the Appium team will ensure
that platform drivers are compatible with both Appium 1.x and 2.x, until the EOL period, after
which they will only be guaranteed to be compatible with 2.x).
<b>I use Appium via a cloud service. How will that work moving forward with Appium 2.0? Will cloud
providers stop supporting Appium 1.x at the same time the Appium team does?</b>
Appium cloud providers can support as much or as little of Appium 2.0's ecosystem as they want.
They might choose to make available only the most recent versions of the Appium 2.x server, and the
most recent versions of a few popular drivers. Or, they might have a predetermined list of drivers,
plugins, and versions that can be selected via capabilities. They might even allow for arbitrary
installation of any drivers or plugins from anywhere on the Internet. All of these factors are left
to the policy of the provider in question, though the Appium team makes some recommendations about
appropriate capabilities for Appium 2.x frontends, in the migration document.
Cloud providers are of course free to make their own plans for Appium 1.x EOL, and could choose to
support Appium 1.x for years to come. If you have any questions about your cloud provider's plan
for Appium 2.0 support or 1.x EOL, reach out to them directly. They should be familiar with this
document as well as the migration guide and should be able to assist.
<b>Why is there not a longer deprecation period for Appium 1.x? Why only 6 months?</b>
* The extent of the user-facing breaking changes is quite small, as you can see in the migration
doc. The necessary changes are mostly superficial, and some are handled automatically by newer
Appium clients.
* Appium 2.0 has been in beta for well over a year.
* Supporting incompatible versions of Appium for an extended period of time is not possible for
a small, part-time team of core committers.
@@ -0,0 +1,288 @@
# Appium 2 Configuration System
Appium 2 supports configuration files. A configuration file is intended to have (nearly) 1:1 parity with command-line arguments. An end user can supply Appium 2 with a configuration file, CLI args, or both (the args have precedence over the config file).
This document will be a technical overview of how the configuration system works. It is intended for Appium contributors, but will also explain the system's fundamental features.
## Reading a Config File
A config file is a JSON, JavaScript, or YAML file which can be validated against a schema. By default, this file will be named `.appiumrc.{json,js,yaml,yml}` and should be in the root of the project which depends upon `appium`. Other filenames and locations are supported via the `--config <file>` flag. For obvious reasons, the `config` argument is disallowed within config files.
In lieu of a separate file, configuration can be embedded in a project's `package.json` using the `appiumConfig` property, e.g.,:
```json
{
"appiumConfig": {
"server": {
"port": 12345
}
}
}
```
When an Appium server is started via the `appium` executable, the `init` function in `lib/main.js` will call into `lib/config-file.js` to load and/or search for a configuration file and in `package.json`.
> Note: It is not an error if configuration isn't found!
The [`lilconfig`](https://npm.im/lilconfig) package provides the search & load functionality; refer to its documentation for more information about the search paths. Additionally, Appium provides support for config files written in YAML via the package [`yaml`](https://npm.im/yaml).
If a config file is found and successfully [validated](#validation), the result will be merged with a set of defaults and any additionall CLI arguments. CLI arguments have precedence over config files, and config files have precedence over defaults.
## Validation
The same system is used for _both_ validation of config files _and_ command-line arguments.
The package [`ajv`](https://npm.im/ajv) provides validation. Of course, to make `ajv` validate anything, it must be provided a _schema_.
The _base_ schema is a [JSON Schema Draft-7](https://json-schema.org/draft/2020-12/json-schema-core.html)-compliant object exported by `lib/schema/appium-config-schema.js`. This schema defines configuration _native to Appium_, and only concerns its behavior as a _server_; it does not define configuration for any other functionality (e.g., the `plugin` or `driver` subcommands).
> Note that this file is the _base_ schema; this will become painfully relevant.
This file is is _not_ a JSON file, because a) JSON is painful to work with for humans, b) is especially reviled by @jlipps, and c) `ajv` accepts objects, not JSON files.
It is more straightforward to explain how config files are validated, so we'll start there.
### Validating Config Files
When a config file is found (`lib/config-file.js`), it will call the `validate` function exported from `lib/schema/schema.js` with the contents of the config file. In turn, this asks `ajv` to validate the data against the schema that Appium has provided it.
If the config file is invalid, errors will be generated to be displayed to the user. Finally, the `init` function will detect these errors, display them, and the process will exit.
I hope that made sense, because this is the easy part.
### Validating CLI Arguments
As mentioned earlier, the same system is used for validating both config files and CLI arguments.
Totally not judging, but Appium uses [`argparse`](https://npm.im/argparse) for its CLI argument parsing. This package, and others like it, provides an API to define the arguments a command-line Node.js script accepts, and will ultimately return an object representation of the user-supplied arguments.
Just as the schema defines what's allowed in a config file, it also defines what's allowed on the command-line.
#### Defining CLI Arguments via Schema
CLI arguments must be _defined_ before their values can be validated.
A JSON schema isn't a natural fit for defining CLI args--it needs some grease to make it work--but it's close enough that we can do so with an adapter and some custom metadata.
In `lib/cli/parser.js`, there's a wrapper around `argparse`'s `ArgumentParser`; it's called (wait for it)... `ArgParser`. The wrapper exists because we're doing some custom things with `argparse`, but is has nothing to do with the schema directly.
An `ArgParser` instance is created and its `parseArgs()` method is called with the raw CLI arguments. The definition of the accepted arguments comes from `lib/cli/args.js` in part--here, all of the arguments _not_ intended for use with the `server` subcommand are hard-coded (e.g., the `driver` subcommand and _its_ subcommands). `args.js` also contains a function `getServerArgs()`, which in turn calls into `toParserArgs` in `lib/schema/cli-args.js`. `lib/schema/cli-args.js` can be considered the "adapter" layer between `argparse` and the schema.
`toParserArgs` uses the `flattenSchema` function exported by `lib/schema/schema.js`, which "squashes" the schema into a key/value representation. Then, `toParserArgs` iterates over each key/value pair and "converts" it into a suitable `ArgumentOption` object for final handoff to `ArgParser`.
This adapter (`cli-args.js`) is where most of the mess is hidden; let's explore this rat's nest a bit further.
##### CLI & Schema Incongruities
The conversion algorithm (see function `subSchemaToArgDef` in `lib/schema/cli-args.js`) is mostly just hacks and special cases neatly packed into a function. Things that don't cleanly map from `argparse` to a JSON schema include, but are not limited to:
- A schema cannot natively express "store the value of `--foo=<value>` in a property called `bar`" in a schema (this corresponds to the `ArgumentOption['dest']` prop).
- A schema cannot natively express aliases; e.g., `--verbose` can also be `-v`
- A schema `enum` is not restricted to multiple types, but `argparse`'s equivalent `ArgumentOption['choices']` prop _is_
- A schema does not know about `argparse`'s concept of "actions" (note that Appium is not currently using custom actions--though it did, and it could again).
- `argparse` has no native type for `email`, `hostname`, `ipv4`, `uri` etc., and the schema does
- Schema validation only _validates_, it does not perform translation, transformation, or coercion (mostly). `argparse` allows this.
- Schemas allow the `null` type, for whatever reason. Ever pass `null` on the CLI?
- `argparse` does not understand anything other than primitives; no objects, arrays, etc., and certainly not arrays of a particular type.
All of the above cases and others are handled by the adapter.
> Note: some decisions made in the adapter were arrived at via coin toss. If you are curious about why something is the way it is, it's likely that it had to do _something_.
Let's look more closely at handling types.
#### Argument Types via `ajv`
While `argparse` allows consumers, via its API, to define the _type_ of various arguments (e.g., a string, number, boolean flag, etc.), Appium mostly avoids these built-in types. _Why is that?_ Well:
1. We already know the type of an argument, because we've defined it in a schema.
2. `ajv` provides validation against a schema.
3. A schema allows for greater expression of types, allowed values, etc., than `argparse` can provide natively.
4. The expressiveness of a schema allows for better error messaging.
To that end, the adapter eschews `argparse`'s built-in types (see allowed string values of `ArgumentOption['type']`) and instead abuses the ability to provide a _function_ as a `type`. The exception is _boolean_ flags, which do not have a `type`, but rather `action: 'store_true'`. The world may never know why.
##### Types as Functions
When a `type` is a function, the function performs both validation _and_ coercion (if necessary). So what are these functions?
> Note: `type` is _omitted_ (and thus _not_ a function) from the `ArgumentOption` if the property type is `boolean`, and is instead provided an `action` property of `store_true`. Yes, this is weird. No, I don't know why.
Well... it depends upon the schema. But generally speaking, we create a _pipeline_ of functions, each corresponding to a keyword in the schema. Let's take the example of the `port` argument. In lieu of asking the OS which ports the `appium`-running user can bind to, this argument is expected to be an integer between 1 and 65535. This turns out to be two functions which we combine into a pipeline:
1. Convert the value to an integer, if possible. Because _every value in `process.argv` is a string_, we must coerce if we want a number.
2. Use `ajv` to validate the integer against the schema for `port`. A schema lets us define a range via the `minimum` and `maximum` keywords. Read more about how this works in
Much like the config file validation, if errors are detected, Appium nicely tells the end-user and the process exits w/ some help text.
For other arguments which are naturally of non-primitive types, things are not so straightforward.
##### Transformers
Remember how `argparse` doesn't understand arrays? What if the most ergonomic way to express a value is, in fact, an array?
Well, Appium can't accept an array on the CLI, even though it can accept one in the config file. But Appium _can_ accept a comma-delimited string (a CSV "line"). Or a string filepath referring to a file which _contains_ a delimited list. Either way: by the time the value gets out of the argument parser, it should be an array.
And as mentioned above, the native facilities of a JSON schema cannot express this. However, it's possible to define a _custom keyword_ which Appium can then detect and handle accordingly. So that's what Appium does.
In this case, a custom keyword `appiumCliTransformer` is registered with `ajv`. The value of `appiumCliTransformer` (at the time of this writing) can be `csv` or `json`. In the base schema file, `appium-config-schema.js`, Appium uses `appiumCliTransformer: 'csv'` if this behavior is desired.
> Note: Any property defined in the schema having type `array` will _automatically_ uses the `csv` transformer. Likewise, a property having type `object` will use the `json` transformer. It's conceivable that `array` may want to use the `json` transformer, but otherwise, the presence of the `appiumCliTransformer` keyword on an `array`-or-`object`-typed property is not stricly necessary.
The adapter (remember the adapter?) creates a pipeline function including a special "CSV transformer" (transformers are defined in `lib/schema/cli-transformers.js`), and uses this function as the `type` property of the `ArgumentOption` passed into `argparse`. In this case, the `type: 'array'` in the schema is ignored.
> Note: the config file doesn't _need_ to perform any complex transformation of values, because it naturally allows Appium to define exactly what it expects. So Appium does no post-processing of config file values.
Properties that do not need this special treatment use `ajv` directly for validation. How this works requires some explanation, so that's next.
#### Validation of Individual Arguments via `ajv`
When we think of a JSON schema, we tend to think, "I have this JSON file and I want to validate it against the schema". That's valid, and in fact Appium does just that with config files! However, Appium does not do this when validating arguments.
> Note: During implementation, I was tempted to mash all of the arguments together into a config-file-like data structure and then validate it all at once. I think that would have been _possible_, but since an object full of CLI arguments is a flat key/value structure and the schema is not, this seemed like trouble.
Instead, Appium validates a value against a specific property _within_ the schema. To do this, it maintains a mapping between a CLI argument definition and its corresponding property. The mapping itself is a `Map` with a unique identifier for the argument as the key, and an `ArgSpec` (`lib/schema/arg-spec.js`) object as the value.
An `ArgSpec` object stores the following metadata:
| Property Name | Description |
| --------------- | ------------------------------------------------------------------------------------- |
| `name` | Canonical name of the argument, corresponding to the property name in the schema. |
| `extType?` | `driver` or `plugin`, if appropriate |
| `extName?` | Extension name, if appropriate |
| `ref` | Computed `$id` of the property in the schema |
| `arg` | Argument as accepted on CLI, without leading dashes |
| `dest` | Property name in parsed arguments object (as returned by `argparse`'s `parse_args()`) |
| `defaultValue?` | Value of the `default` keyword in schema, if appropriate |
When a schema is [finalized](#schema-finalization), the `Map` is populated with `ArgSpec` objects for all known arguments.
So when the adapter is creating the pipeline of functions for the argument's `type`, it already has an `ArgSpec` for the argument. It creates a function which calls `validate(value, ref)` (in `lib/schema/schema.js`) where `value` is whatever the user provided, and `ref` is the `ref` property of the `ArgSpec`. The concept is that `ajv` can validate using _any_ `ref` it knows about; each property in a schema can be referenced by this `ref` whether it's defined or not. To help visualize, if a schema is:
```json
{
"$id": "my-schema.json",
"type": "object",
"properties": {
"foo": {
"type": "number"
}
}
}
```
The `ref` of `foo` would be `my-schema.json#/properties/foo`. Assuming our `Ajv` instance knows about this `my-schema.json`, then we can call its `getSchema(ref)` method (which has a `schema` property, but is a misnomer nonetheless) to get a validation function; `validate(value, ref)` in `schema.js` calls this validation function.
> Note: The schema spec says a schema author can supply an explicit `$id` keyword to override this; it's unsupported by Appium at this time. If needed, extension authors must carefully use `$ref` without custom `$id`s. It's highly unlikely an extension would have a schema so complicated as to need this, however; Appium itself doesn't even use `$ref` to define its own properties!
Next, let's take a look at how Appium loads schemas. This actually happens _before_ any argument validation.
## Schema Loading
Let's ignore extensions for a moment, and start with the base schema.
When something first imports the `lib/schema/schema.js` module, an instance of an `AppiumSchema` is created. This is a singleton, and its methods are exported from the module (all of which are bound to the instance).
The constructor does very little; it instantiates an `Ajv` instance and configures it with Appium's [custom keywords](#custom-keyword-reference) and adds support for the `format` keyword via the [ajv-formats](https://npm.im/ajv-formats) module.
Otherwise, the `AppiumSchema` instance does not interact with the `Ajv` instance until its `finalize()` method (exported as `finalizeSchema()`) is called. When this method is called, we're saying "we are not going to add any more schemas; go ahead and create `ArgSpec` objects and register schemas with `ajv`".
When does finalization happen? Well:
1. When the `appium` executable begins, it _checks for and configures extensions_ (hand-wave) in `APPIUM_HOME`.
2. Only then does it start to think about arguments--it instantiates an `ArgParser`, which (as you'll recall) runs the adapter to convert the schema to arguments.
3. _Finalization happens here_--when creating the parser. Appium need the schema(s) to be registered with `ajv` in order to create validation functions for arguments.
4. Thereafter, Appium parses the arguments with the `ArgParser`.
5. Finally, decides what to do with the returned object.
Without extensions, `finalize()` still knows about the Appium base schema (`appium-config-schema.js`), and just registers that. However, step 1. above is doing a _lot of work_, so let's look at how extensions come into play.
## Extension Support
One of the design goals of this system is the following:
_An extension should be able to register custom CLI arguments with the Appium, and a user should be able to use them like any other argument_.
Previously, Appium 2.0 accepted arguments in this manner (via `--driverArgs`), but validation was hand-rolled and required extension implementors to use a custom API. It also required the user to awkwardly pass a JSON string as the configuration on the command-line. Further, no contextual help (via `--help`) existed for these arguments.
Now, by providing a schema for its options, a driver or plugin can register CLI arguments and config file schemas with Appium.
To register a schema, an extension must provide the `appium.schema` property in its `package.json`. The value may be a schema or a path to a schema. If the latter, the schema should be JSON or a CommonJS module (ESM not supported at this time, nor is YAML).
For any property in this schema, the property will appear as a CLI argument of the form `--<extension-type>-<extension-name>-<property-name>`. For example, if the `fake` driver provides a property `foo`, the argument will be `--driver-fake-foo`, and will show in `appium server --help` like any other CLI argument.
The corresponding property in a config file would be `server.<extension-type>.<extension-name>.<property-name>`, e.g.:
```json
{
"server": {
"driver": {
"fake": {
"foo": "bar"
}
}
}
}
```
The naming convention described above avoids problems of one extension type having a name conflict with a different extension type.
> Note: while an extension can provide aliases via `appiumCliAliases`, "short" flags are disallowed, since all arguments from extensions are prefixed with `--<extension-type>-<extension-name>-`. The extension name and argument name will be kebab-cased for the CLI, according to [Lodash's rules](https://lodash.com/docs/4.17.15#kebabCase) around kebab-casing.
The schema object will look much like Appium's base schema, but it will only have top-level properties (nested properties are currently unsupported). Example:
```json
{
"title": "my rad schema for the cowabunga driver",
"type": "object",
"properties": {
"fizz": {
"type": "string",
"default": "buzz",
"$comment": "corresponds to CLI --driver-cowabunga-fizz"
}
}
}
```
As written in a user's config file, this would be the `server.driver.cowabunga.fizz` property.
When extensions are loaded, the `schema` property is verified and the schema is registered with the `AppiumSchema` (it is _not_ registered with `Ajv` until `finalize()` is called).
During finalization, each registered schema is added to the `Ajv` instance. The schema is assigned an `$id` based on the extension type and name (which overrides whatever the extension provides, if anything). Schemas are also forced to disallowed unknown arguments via the `additionalProperties: false` keyword.
Behind the scenes, the base schema has `driver` and `plugin` properties which are objects. When finalized, a property is added to each--corresponding to an extension name--and the value of this property is a reference to the `$id` of a property in the extension schema. For example, the `server.driver` property will look like this:
```json
{
"driver": {
"cowabunga": {
"$ref": "driver-cowabunga.json"
}
}
}
```
This is why we call it the "base" schema--it is _mutated_ when extensions provide schemas. The extension schemas are kept separately, but the _references_ are added to the schema before it's ultimately added to `ajv`. This works because an `Ajv` instance understands references _from_ any schema it knows about _to_ any schema it knows about.
> Note: This makes it impossible to provide a complete static schema for Appium _and_ the installed extensions (as of Nov 5 2021). A static `.json` schema _is_ generated from the base (via a Gulp task), but it does not contain any extension schemas. The static schema also has uses beyond Appium; e.g., IDEs can provide contextual error-checking of config files this way. Let's solve this?
Just like how we look up the reference ID of a particular argument in the base schema, validation of arguments from extensions happens the exact same way. If the `cowabunga` driver has the schema ID `driver-cowabunga.json`, then the `fizz` property can be referenced from any schema registered with `ajv` via `driver-cowabunga.json#/properties/fizz`. "Base" schema arguments begin with `appium.json#properties/` instead.
## Development Environment Support
During the flow of development, a couple extra tasks have been automated to maintain the base schema:
- As a post-transpilation step, a `lib/appium-config.schema.json` gets generated from `lib/schema/appium-config-schema.js` (in addition to its CJS counterpart generated by Babel). This file is under version control. It ends up being _copied_ to `build/lib/appium-config.schema.json` in this step.
- A pre-commit hook (see `scripts/generate-schema-declarations.js` in the root monorepo) generates a `types/appium-config-schema.d.ts` from the above JSON file. The types in `types/types.d.ts` depend upon this file. This file is under version control.
## Custom Keyword Reference
Keywords are defined in `lib/schema/keywords.js`.
- `appiumCliAliases`: allows a schema to express aliases (e.g., a CLI argument can be `--verbose` or `-v`). This is an array of strings. Strings shorter than three (3) characters will begin with a single dash (`-`) instead of a double-dash (`--`). Note that any argument provided by an extension will begin with a double-dash, because these are required to have the `--<extension-type>-<extension-name>-` prefix.
- `appiumCliDest`: allows a schema to specify a custom property name in the post-`argprase` arguments objects. If not set, this becomes a camelCased string.
- `appiumCliDescription`: allows a schema to override the description of the argument when displayed on the command-line. This is useful paired with `appiumCliTransformer` (or `array`/`object`-typed properties), since there's a substantial difference between what a CLI-using user can provide vs. what a config-file-using user can provide.
- `appiumCliTransformer`: currently a choice between `csv` and `json`. These are custom functions which post-process a value. They are not used when loading & validating config files, but the idea should be that they result in the same object you'd get if you used whatever the config file wanted (e.g., an array of strings). `csv` is for comma-delimited strings and CSV files; `json` is for raw JSON strings and `.json` files.
- `appiumCliIgnore`: If `true`, do not support this property on the CLI.
- `appiumDeprecated`: If `true`, the property is considered "deprecated", and will be displayed as such to the user (e.g., in the `--help` output). Note the JSON Schema draft-2019-09 introduces a new keyword `deprecated` which we should use instead if upgrading to this metaschema. When doing so, `appiumDeprecated` should itself be marked as `deprecated`.
@@ -4,7 +4,7 @@ This document is a guide for those who are using Appium 1.x and wish to migrate
## Overview of Appium 2.0
Appium 2.0 is the most major new release of Appium in over 5 years. The changes in Appium 2.0 are *not* primarily related to changes in automation behaviors for specific platforms. Instead, Appium 2.0 reenvisions Appium as a *platform* where "drivers" (code projects that introduce support for automation of a given platform) and "plugins" (code projects that allow for overriding, altering, extending, or adding behaviors to Appium) can be easily created and shared.
Appium 2.0 is the most major new release of Appium in over 5 years. The changes in Appium 2.0 are _not_ primarily related to changes in automation behaviors for specific platforms. Instead, Appium 2.0 reenvisions Appium as a _platform_ where "drivers" (code projects that introduce support for automation of a given platform) and "plugins" (code projects that allow for overriding, altering, extending, or adding behaviors to Appium) can be easily created and shared.
At the same time, the Appium project is taking the opportunity to remove many old and deprecated bits of functionality.
@@ -14,7 +14,7 @@ Together these do introduce a few breaking changes to how Appium is installed, h
Have a look at the [Appium 2.0 release notes](https://github.com/appium/appium/releases/tag/v2.0.0-beta) for a more comprehensive list of changes. Here we call out the breaking changes and what you need to do do account for them.
#### Installing drivers during setup
### :bangbang: Installing drivers during setup
When you installed Appium 1.x, all available drivers would be installed at the same time as the main Appium server. This is no longer the case. Simply installing Appium 2.0 (e.g., by `npm install -g appium`), will install the Appium server only, but no drivers. To install drivers, you must instead use the new [Appium extension CLI](../drivers/driver-cli.md). For example, to install the latest versions of the XCUITest and UiAutomator2 drivers, after installing Appium you would run the following commands:
@@ -32,74 +32,116 @@ npm install -g appium --drivers=xcuitest,uiautomator2
This will install Appium and the two drivers for you in one go.
#### Driver updates
### :bangbang: Chromedriver installation flags
In Appium 1.x it was possible to customize the way Chromedriver was installed (as part of the UiAutomator2 driver for example), using the following command line flags:
* `--chromedriver-skip-install`
* `--chromedriver-version`
* `--chromedriver-cdnurl`
Because Appium 2.0 now installs drivers for you, and because these flags were implemented as NPM config flags, they will no longer work. Instead, use the following environment variables during driver installation:
* `APPIUM_SKIP_CHROMEDRIVER_INSTALL`
* `CHROMEDRIVER_VERSION`
* `CHROMEDRIVER_CDNURL`
For example:
```
APPIUM_SKIP_CHROMEDRIVER_INSTALL=1 appium driver install uiautomator2
```
### :bangbang: Driver-specific command line options
With Appium 1.x, command-line options specific to particular drivers were all hosted on the main Appium server. So, for example, `--chromedriver-executable` was a CLI parameter you could use with Appium to set the location of a specific Chromedriver version for use with, say, the UiAutomator2 driver.
With Appium 2.x, all driver- and platform-specific CLI params have been moved to the drivers themselves. To access them, you'll now need to prepend the argument with the extension type (either `driver` or `plugin`) and the name of the extension. For example, `--chromedriver-executable` becomes `--driver-uiautomator2-chromedriver-executable`.
### :bangbang: Driver updates
In the past, to get updates to your iOS or Android drivers, you'd simply wait for those updates to be rolled into a new release of Appium, and then update your Appium version. With Appium 2.x, the Appium server and the Appium drivers are versioned and released separately. This means that drivers can be on their own release cadence and that you can get driver updates as they happen, rather than waiting for a new Appium server release. The way to check for driver updates is with the CLI:
```
```bash
appium driver list --updates
```
If any updates are available, you can then run the `update` command for any given driver:
```
```bash
appium driver update xcuitest
```
To update the Appium server itself, you do the same thing as in the past: `npm install -g appium`. Now, installing new versions of the Appium server will leave your drivers intact, so the whole process will be much more quick.
#### Protocol changes
### :bangbang: Protocol changes
Appium's API is based on the [W3C WebDriver Protocol](https://www.w3.org/TR/webdriver/), and it has supported this protocol for years. Before the W3C WebDriver Protocol was designed as a web standard, several other protocols were used for both Selenium and Appium. These protocols were the "JSONWP" (JSON Wire Protocol) and "MSJONWP" (Mobile JSON Wire Protocol). The W3C Protocol differs from the (M)JSONWP protocols in a few small ways.
Up until Appium 2.0, Appium supported both protocols, so that older Selenium/Appium clients could still communicate with newer Appium servers. Moving forward, support for older protocols will be removed.
*Capabilities*
### :bangbang: _Capabilities_
One significant difference between old and new protocols is in the format of capabilities. Previously called "desired capabilities", and now called simply "capabilities", there is now a requirement for a so-called "vendor prefix" on any non-standard capabilities. The list of standard capabilities is given in the [WebDriver Protocol spec](https://www.w3.org/TR/webdriver/#capabilities), and includes a few commonly used capabilities such as `browserName` and `platformName`.
These standard capabilities continue to be used as-is. All other capabilities must include a "vendor prefix" in their name. A vendor prefix is a string followed by a colon, such as `appium:`. Most of Appium's capabilities go beyond the standard W3C capabilities and must therefore include vendor prefixes (we recommend that you use `appium:` unless directed otherwise by documentation). For example:
* `appium:app`
* `appium:noReset`
* `appium:deviceName`
- `appium:app`
- `appium:noReset`
- `appium:deviceName`
This requirement may or may not be a breaking change for your test suites when targeting Appium 2.0. If you're using an updated Appium client, the client will add the `appium:` prefix for you on all necessary capabilities. New versions of the Appium Inspector tool will also do this. Cloud-based Appium providers may also do this. So simply be aware that if you get any messages to the effect that your capabilities lack a vendor prefix, this is how you solve that problem.
On a related note, it will no longer be possible to start Appium sessions using WebDriver clients that don't support the W3C protocol (see below for a comment to this effect for the WD library).
*Removed Commands*
To make everyone's lives a bit easier, we've also introduced the option of wrapping up all Appium-related capabilities into one object capability, `appium:options`. You can bundle together anything that you would normally put an `appium:` prefix on into this one capability. Here's an example (in raw JSON) of how you might start an iOS session on the Safari browser using `appium:options`:
```json
{
"platformName": "iOS",
"browserName": "Safari",
"appium:options": {
"platformVersion": "14.4",
"deviceName": "iPhone 11",
"automationName": "XCUITest"
}
}
```
(Of course, each client will have a different way of creating structured capabilities like `appium:options` or other ones that you might have seen such as `goog:chromeOptions`). NB: capabilities that show up in `appium:options` will overwrite capabilities of the same name that show up at the top level of the object.
### :bangbang: _Removed Commands_
Commands which were a part of the old JSON Wire Protocol and not a part of the W3C Protocol are no longer available:
* TODO (these commands are being identified and removed and will be updated here when complete)
- TODO (these commands are being identified and removed and will be updated here when complete)
If you use a modern Appium or Selenium client, you should no longer have access to these anyway, so any breaking changes should appear on the client side first and foremost.
#### Image analysis features moved to plugin
### :bangbang: Image analysis features moved to plugin
One of the design goals for Appium 2.0 is to migrate non-core features into special extensions called [plugins](#TODO). This allows people to opt into features which require extra time to download or extra system setup. The various image-related features of Appium (image comparison, finding elements by image, etc...) have been moved into an officially supported plugin called [images](https://github.com/appium/appium-plugins/tree/master/packages/images).
If you use these image-related methods, to continue accessing them you will need to do two things.
1. Install the plugin: `appium plugin install images`
2. Ensure you start the Appium server with access to run the plugin by including it in the list of plugins designated on the command line, e.g., `appium --plugins=images`
2. Ensure you start the Appium server with access to run the plugin by including it in the list of plugins designated on the command line, e.g., `appium --use-plugins=images`
Image-related commands will also be removed on the client side of things, which means you will need to follow the instructions on the plugin README for installing client-side plugins to access these features.
#### Old drivers removed
### :bangbang: Old drivers removed
The old iOS and Android (UiAutomator 1) drivers and related tools (e.g., `authorize-ios`) have been removed. They haven't been relevant for many years anyway.
#### Internal packages renamed
### :warning: Internal packages renamed
Some Appium-internal NPM packages have been renamed (for example, `appium-base-driver` is now `@appium/base-driver`). This is not a breaking change for Appium users, only for people who have built software that directly incorporates Appium's code.
#### "WD" JavaScript client library no longer supported
### :warning: "WD" JavaScript client library no longer supported
For many years, some of Appium's authors maintained the [WD](https://github.com/admc/wd) client library. This library has been deprecated and has not been updated for use with the W3C WebDriver protocol. As such, if you're using this library you'll need to move to a more modern one. We recommend [WebdriverIO](https://webdriver.io).
#### Appium Inspector split out from Appium Desktop
### :warning: Appium Inspector split out from Appium Desktop
The inspecting portion of Appium Desktop has been moved to its own app, Appium Inspector: [github.com/appium/appium-inspector](https://github.com/appium/appium-inspector). It's fully compatible with Appium 2.0 servers. Simply download it and run it on its own. You no longer need the GUI Appium Desktop server to inspect apps. The Appium Desktop server will continue to be supported at its original site: [github.com/appium/appium-desktop](https://github.com/appium/appium-desktop). It will simply no longer bundle the Inspector with it.
@@ -109,21 +151,247 @@ You can also now use the Appium Inspector without downloading anything, by visit
Apart from the breaking changes mentioned above, in this section is a list of some of the major new features you may wish to take advantage of with Appium 2.0.
#### Plugins
### Plugins
*Server Plugins*
#### :tada: _Server Plugins_
TODO
*Client Plugins*
#### :tada: _Client Plugins_
TODO
#### Install drivers and plugins from anywhere
### :tada: Install drivers and plugins from anywhere
TODO
#### Driver and Plugin CLI args
### :tada: Configuration Files
Appium now supports _configuration files_ in addition to command-line arguments. In a nutshell, nearly all arguments which Appium 1.x required to be provided on the CLI are now able to be expressed via a configuration file. Configuration files may be in JSON, JS, or YAML format.
Please note that CLI arguments have _precedence_ over configuration files; if a value is set in a config file _and_ via CLI argument, the CLI argument is preferred.
#### Supported Config File Locations
Configuration files can be named anything, but the following filenames will be automatically discovered and loaded by Appium:
- `.appiumrc.json`
- `.appiumrc.yaml`
- `.appiumrc.yml`
- `.appiumrc.js`
- `.appiumrc.cjs`
- `appium.config.js`
- `appium.config.cjs`
- `.appiumrc` (which is considered to be JSON)
Further, the `appium` property in your project's `package.json` can contain the configuration.
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 (and avoid searching), use `appium --config-file /path/to/config/file`.
> Note: Configuration files in ESM format are not currently supported.
#### Configuration File Format
You might want to see examples:
- [Appium Configuration - JSON](../../../sample-code/appium.config.sample.json)
- [Appium Configuration - YAML](../../../sample-code/appium.config.sample.yaml)
- [Appium Configuration - JS](../../../sample-code/appium.config.sample.js)
Description of the format is available, as well:
- [Appium Configuration File JSON Schema](../../../packages/appium/lib/appium-config.schema.json)
- [TypeScript declarations for Appium Configuration](../../../packages/appium/types/appium-config.d.ts)
To describe in words, the config file will have a root `server` property, and all arguments are child properties. For certain properties which must be supplied as comma-delimited lists, JSON strings, and/or external filepaths, these instead will be of their "native" type. For example, `--use-plugins <value>` needs `<value>` to be comma-delimited string or path to a delimited file. However, the config file just wants an array, e.g.,:
```json
{
"server": {
"use-plugins": ["my-plugin", "some-other-plugin"]
}
}
```
For `driver`-and-`plugin`-specific configuration, these live under the `server.driver` and `server.plugin` properties, respectively. Each driver or plugin will have its own named property, and the values of any specific configuration it provides are under this. For example:
```json
{
"server": {
"driver": {
"xcuitest": {
"webkit-debug-proxy-port": 5400
}
}
}
}
```
> Note: The above configuration corresponds to the `--driver-xcuitest-webkid-debug-proxy-port` CLI argument.
All properties are case-sensitive and will be in kebab-case. For example, `callback-port` is allowed, but `callbackPort` is not.
### :tada: Driver and Plugin CLI args
TODO
#### For Extension Authors
To define CLI arguments (or configuration properties), your extension must provide a _schema_. In the `appium` property of your extension's `package.json`, add a `schema` property. This will either a) be a schema itself, or b) be a path to a schema.
The rules for these schemas:
- Schemas must conform to [JSON Schema Draft-07](https://ajv.js.org/json-schema.html#draft-07).
- Schemas must be in JSON or JS (CommonJS) format.
- Custom `$id` values are unsupported. To use `$ref`, provide a value relative to the schema root, e.g., `/properties/foo`.
- Known values of the `format` keyword are likely supported, but various other keywords may be unsupported. If you find a keyword that is unsupported which you need to use, please [ask for support](https://github.com/appium/appium/issues/new) or send a PR!
- The schema must be of type `object` (`{"type": "object"}`), containing the arguments in a `properties` keyword. Nested properties are unsupported.
Example:
```json
{
"type": "object",
"properties": {
"test-web-server-port": {
"type": "integer",
"minimum": 1,
"maximum": 65535,
"description": "The port to use for the test web server"
},
"test-web-server-host": {
"type": "string",
"description": "The host to use for the test web server",
"default": "sillyhost"
}
}
}
```
The above schema defines two properties which can be set via CLI argument or configuration file. If this extension is a _driver_ and its name is "horace", the CLI args would be `--driver-horace-test-web-server-port` and `--driver-horace-test-web-server-host`, respectively. Alternatively, a user could provide a configuration file containing:
```json
{
"server": {
"driver": {
"horace": {
"test-web-server-port": 1234,
"test-web-server-host": "localhorse"
}
}
}
}
```
## Special Notes for Cloud Providers
The rest of this document has applied to Appium generally, but some of the architectural changes in Appium 2.0 will constitute breaking changes for Appium-related service providers, whether a cloud-based Appium host or an internal service. At the end of the day, the maintainer of the Appium server is responsible for installing and making available the various Appium drivers and plugins that end users may wish to use.
With Appium 2.0, we enter a new era where end users may wish to target various independent versions of drivers and plugins. With Appium 1.x, this was never the case, since any given version of Appium would contain one and only one version of each driver. It is of course up to each service provider how they wish to implement the discovery, installation, and availability of any official or third party drivers or plugins. But the Appium team wants to make a recommendation in terms of the capabilities service providers support, for consistency across the industry. This is a recommendation only, and not a standard, but adopting it will help users to navigate the increased complexity that working with Appium 2.0 in a cloud environment may bring.
### Suggested capabilities
In addition to the standard `platformName`, `appium:deviceName`, `appium:automationName`, and `appium:platformVersion`, we recommend adopting the capability `$cloud:appiumOptions`, where the label `$cloud` is not meant to be interpreted literally but instead should be replaced by your vendor prefix (so for HeadSpin it would be `headspin`, Sauce Labs it would be `sauce`, and BrowserStack it would be `browserstack`, to name just a few examples). The `$cloud:appiumOptions` capability would itself be a JSON object, with the following internal keys:
| Capability | Used for | Example |
| ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
| `version` | Designating which version of the Appium server is used to host and manage drivers. If ommitted, behavior left up to the provider, but the recommendation would be to provide the latest official version. | `2.0.0` |
| `automationVersion` | Designating which version of the specified driver should be used. | `1.55.2` |
| `automation` | Designating a custom driver to use (see below for more info). This would override `appium:automationName` and `$cloud:automationVersion` | `{"name": "org/custom-driver", "source": "github", "package": "custom-driver"}` |
| `plugins` | Designating the list of plugins (and potentially versions of plugins) to be activated (see below for more info). | `["images", "universal-xml"]` |
### Basic example
Appium extensions (drivers and plugins) have a set of properties that specify where they can be installed from. Cloud providers are obviously under no obligation to provide support for arbitrarily specified extensions, seeing as these may represent untrusted code running in a managed environment. In the case where arbitrary extensions are not supported, the `appium:automationName`, `$cloud:automationVersion`, and `$cloud:appiumPlugins` capabilities should be sufficient. See the following JSON object representing capabilities for a session:
```json
{
"platformName": "iOS",
"appium:platformVersion": "14.4",
"appium:deviceName": "iPhone 11",
"appium:app": "Some-App.app.zip",
"appium:automationName": "XCUITest",
"$cloud:appiumOptions": {
"appiumVersion": "2.0.0",
"automationVersion": "3.52.0",
"plugins": ["images"]
}
}
```
This set of capabilities requests an Appium 2.0 server supporting the XCUITest driver at version `3.52.0`, and the `images` plugin active. This set is easy for a cloud provider to verify. The cloud provider can obviously do anything it wants in response to these capabilities, including downloading Appium and driver and plugin packages on the fly, or erroring out if the versions requested are not in a supported set, or if the plugin is not supported, etc...
### Basic example with `appium:options`
The previous example still looks a bit disorganized, so of course we also recommend that cloud providers support the `appium:options` capability as detailed above, which could turn the previous set of capabilities into the following:
```json
{
"platformName": "iOS",
"appium:options": {
"platformVersion": "14.4",
"deviceName": "iPhone 11",
"app": "Some-App.app.zip",
"automationName": "XCUITest"
},
"$cloud:appiumOptions": {
"appiumVersion": "2.0.0",
"automationVersion": "3.52.0",
"plugins": ["images"]
}
}
```
### Extension objects
Some service providers may wish to dynamically allow access to all of the features of the Appium 2.0 CLI, including downloading arbitrary drivers and plugins. To represent these extensions, we can define special JSON "extension objects", with the following keys:
- `name`: the name of the extension. This would be an NPM package name (if downloading from NPM), or a git or GitHub spec (if downloading from a git server or GitHub).
- `version`: the version of the extension, e.g., the NPM package version or Git SHA.
- (optional) `source`: a denotation of where the extension can be downloaded from. Recommended to support the following values: `appium`, `npm`, `git`, `github`. Here, `appium` means "Appium's own official list", and should be the default value if this key is not included.
- (optional) `package`: when downloading extensions from git or github, the NPM package name of the extension must also be provided. This is optional for non-git sources.
Since each session is handled by a single driver, the `$cloud:appiumOptions`/`$automation` capability could be used with an extension object value to denote this driver, for example:
```json
{
...,
"$cloud:appiumOptions": {
...,
"automation": {
"name": "git+https://some-git-host.com/custom-driver-project.git",
"version": "some-git-sha",
"source": "git",
"package": "driver-npm-package-name"
},
...
},
...
}
```
And since sessions can handle multiple plugins, each value in the list of `$cloud:appiumPlugins` could also be an extension object rather than a string, so that specific versions could be requested:
```json
{
...,
"$cloud:appiumOptions": {
...,
"plugins": [{
"name": "images",
"version": "1.1.0"
}, {
"name": "my-github-org/my-custom-plugin",
"version": "a83f2e",
"source": "github",
"package": "custom-plugin"
}],
...,
}
...
}
```
These serve as illustrative examples for the recommendations here. Of course it is up to the service providers to implement the handling of these capabilities at their front end / load balancer, to perform any error checking, or to actually run any of the `appium driver` or `appium plugin` CLI commands that support the end user's request. This section is merely a suggestion as to how service providers might design their user-facing capabilities API in a way which in principle supports all of the capabilities Appium itself would provide to the end user if they were running Appium on their own.
-7
View File
@@ -38,12 +38,6 @@ context = current_context
context = @driver.current_context
```
```php
# PHP
$context = $driver->context();
```
```csharp
// C#
string Context = driver.Context;
@@ -89,7 +83,6 @@ For information on contexts, see Appium's [hybrid automation docs](/docs/en/writ
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | [github.com](https://github.com/admc/wd/blob/master/doc/api.md) |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#current_context-instance_method) |
|[PHP](https://github.com/appium/php-client/releases/latest)| All | [github.com](https://github.com/appium/php-client/) |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| All | [github.com](https://github.com/appium/appium-dotnet-driver/) |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/context/get-context.yml)
+1 -8
View File
@@ -37,12 +37,6 @@ context = @driver.available_contexts
```
```php
# PHP
$contexts = $driver->contexts();
```
```csharp
// C#
List<string> AllContexts = new List<string>();
@@ -57,7 +51,7 @@ List<string> AllContexts = new List<string>();
## Description
Retrieve all the contexts available to be automated. This will include, at least, the native context. There can also be zero or more web view contexts. For information on the format of the context names, see the [get context documentation](/docs/en/commands/context/get-context.md).
[mobile command](/docs/en/commands/mobile-command.md) `mobile: getContexts` is available on iOS (XCUITest) and Android (UIAutomator2 and Espresso) to get more detailed contexts.
[mobile command](/docs/en/commands/mobile-command.md) `mobile: getContexts` is available on iOS (XCUITest) and Android (UIAutomator2 and Espresso) to get more detailed contexts.
For information on contexts, see Appium's [hybrid automation docs](/docs/en/writing-running-appium/web/hybrid.md).
@@ -88,7 +82,6 @@ For information on contexts, see Appium's [hybrid automation docs](/docs/en/writ
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | [github.com](https://github.com/admc/wd/blob/master/doc/api.md) |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#available_contexts-instance_method) |
|[PHP](https://github.com/appium/php-client/releases/latest)| All | [github.com](https://github.com/appium/php-client/) |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| All | [github.com](https://github.com/appium/appium-dotnet-driver/) |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/context/get-contexts.yml)
-10
View File
@@ -55,15 +55,6 @@ webview = @driver.available_contexts[1]
```
```php
# PHP
$contexts = $driver->contexts();
$driver->context($contexts[1]);
// ...
$driver->context('NATIVE_APP');
```
```csharp
// C#
// Switch to specific webview
@@ -118,7 +109,6 @@ For information on contexts, see Appium's [hybrid automation docs](/docs/en/writ
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | [github.com](https://github.com/admc/wd/blob/master/doc/api.md) |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#set_context-instance_method) |
|[PHP](https://github.com/appium/php-client/releases/latest)| All | [github.com](https://github.com/appium/php-client/) |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| All | [github.com](https://github.com/appium/appium-dotnet-driver/) |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/context/set-context.yml)
@@ -37,12 +37,6 @@ current_activity
```
```php
# PHP
$activity = $driver->currentActivity();
```
```csharp
// C#
string activity = driver.CurrentActivity;
@@ -77,7 +71,6 @@ string activity = driver.CurrentActivity;
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | [github.com](https://github.com/admc/wd/blob/master/lib/commands.js#L2519) |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#current_activity-instance_method) |
|[PHP](https://github.com/appium/php-client/releases/latest)| All | [github.com](https://github.com/appium/php-client/) |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| All | [github.com](https://github.com/appium/appium-dotnet-driver/blob/master/src/Appium.Net/Appium/Android/AndroidDriver.cs) |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/activity/current-activity.yml)
@@ -108,4 +101,4 @@ Name of the current [activity](https://developer.android.com/reference/android/a
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/activity/current-activity.yml)
## See Also
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L429)
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L430)
@@ -37,12 +37,6 @@ current_package
```
```php
# PHP
// TODO PHP sample
```
```csharp
// C#
string package = driver.CurrentPackage;
@@ -77,7 +71,6 @@ string package = driver.CurrentPackage;
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| None | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | [github.com](https://github.com/admc/wd/blob/master/lib/commands.js#L2526) |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#current_package-instance_method) |
|[PHP](https://github.com/appium/php-client/releases/latest)| All | [github.com](https://github.com/appium/php-client/) |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| All | [github.com](https://github.com/appium/appium-dotnet-driver/blob/master/src/Appium.Net/Appium/Android/AndroidDriver.cs) |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/activity/current-package.yml)
@@ -108,4 +101,4 @@ Name of the current [package](https://developer.android.com/reference/java/lang/
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/activity/current-package.yml)
## See Also
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L432)
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L433)
@@ -40,13 +40,6 @@ start_activity app_package: "com.example", app_activity: "ActivityName"
```
```php
# PHP
$driver->startActivity(array('appPackage' => 'com.example',
'appActivity' => 'ActivityName'));
```
```csharp
// C#
driver.StartActivity("com.example", "ActivityName");
@@ -81,7 +74,6 @@ driver.StartActivity("com.example", "ActivityName");
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | [github.com](https://github.com/admc/wd/blob/master/lib/commands.js#L2948) |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Android/Device#start_activity-instance_method) |
|[PHP](https://github.com/appium/php-client/releases/latest)| All | [github.com](https://github.com/appium/php-client/) |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| All | [github.com](https://github.com/appium/appium-dotnet-driver/blob/master/src/Appium.Net/Appium/Android/AndroidDriver.cs) |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/activity/start-activity.yml)
@@ -121,4 +113,4 @@ null
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/activity/start-activity.yml)
## See Also
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L525)
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L526)
+1 -8
View File
@@ -42,12 +42,6 @@ activate_app('io.appium.android.apis')
```
```php
# PHP
// Supports only `mobile: queryAppState` for iOS, XCUITest
```
```csharp
// C#
driver.activateApp('com.apple.Preferences');
@@ -88,7 +82,6 @@ iOS tests with XCUITest can also use the `mobile: activateApp` method. See detai
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | [github.com](https://github.com/admc/wd/blob/master/lib/commands.js) |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#activate_app-instance_method) |
|[PHP](https://github.com/appium/php-client/releases/latest)| All | [github.com](https://github.com/appium/php-client/) |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| All | [github.com](https://github.com/appium/appium-dotnet-driver/) |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/app/activate-app.yml)
@@ -121,4 +114,4 @@ null
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/app/activate-app.yml)
## See Also
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L445)
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L446)
+2 -9
View File
@@ -42,12 +42,6 @@ query_app_state('io.appium.android.apis') # `query_` prefix is also available
```
```php
# PHP
// Supports only `mobile: queryAppState` for iOS, XCUITest
```
```csharp
// C#
// Supports only `mobile: queryAppState` for iOS, XCUITest
@@ -87,7 +81,6 @@ iOS tests with XCUITest can also use the `mobile: queryAppState` method. See det
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | [github.com](https://github.com/admc/wd/blob/master/lib/commands.js) |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Base/Driver#app_state-instance_method) |
|[PHP](https://github.com/appium/php-client/releases/latest)| All | [github.com](https://github.com/appium/php-client/) |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| All | [github.com](https://github.com/appium/appium-dotnet-driver/) |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/app/app-state.yml)
@@ -96,7 +89,7 @@ iOS tests with XCUITest can also use the `mobile: queryAppState` method. See det
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/app/app-state.yml)
### Endpoint
`GET /session/:session_id/appium/device/app_state`
`POST /session/:session_id/appium/device/app_state`
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/app/app-state.yml)
### URL Parameters
@@ -120,4 +113,4 @@ Current the target app status. (Clients wrap the response properly) `0` is not i
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/app/app-state.yml)
## See Also
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L480)
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L481)
@@ -37,12 +37,6 @@ background_app(10)
```
```php
# PHP
$driver->backgroundApp(10);
```
```csharp
// C#
driver.BackgroundApp(10)
@@ -94,7 +88,6 @@ iOS tests with XCUITest can also use the `mobile: terminateApp` method to termin
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | [github.com](https://github.com/admc/wd/blob/master/lib/commands.js#L2841) |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#background_app-instance_method) |
|[PHP](https://github.com/appium/php-client/releases/latest)| All | [github.com](https://github.com/appium/php-client/) |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| All | [github.com](https://github.com/appium/appium-dotnet-driver/) |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/app/background-app.yml)
@@ -127,4 +120,4 @@ null
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/app/background-app.yml)
## See Also
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L556)
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L557)
+1 -8
View File
@@ -37,12 +37,6 @@ close_app
```
```php
# PHP
$driver->closeApp();
```
```csharp
// C#
driver.CloseApp();
@@ -77,7 +71,6 @@ driver.CloseApp();
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | [github.com](https://github.com/admc/wd/blob/master/lib/commands.js#L2798) |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#close_app-instance_method) |
|[PHP](https://github.com/appium/php-client/releases/latest)| All | [github.com](https://github.com/appium/php-client/) |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| All | [github.com](https://github.com/appium/appium-dotnet-driver/blob/master/src/Appium.Net/Appium/AppiumDriver.cs) |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/app/close-app.yml)
@@ -108,4 +101,4 @@ null
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/app/close-app.yml)
## See Also
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L550)
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L551)
@@ -37,12 +37,6 @@ end_coverage("Intent", "/path")
```
```php
# PHP
$driver->endTestCoverage('Intent', '/path');
```
```csharp
// C#
driver.EndTestCoverage("Intent", "/path");
@@ -77,7 +71,6 @@ driver.EndTestCoverage("Intent", "/path");
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | [github.com](https://github.com/admc/wd/blob/master/lib/commands.js#L2858) |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| None | [www.rubydoc.info](https://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Android/Device#end_coverage-instance_method) |
|[PHP](https://github.com/appium/php-client/releases/latest)| All | [github.com](https://github.com/appium/php-client/) |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| All | [github.com](https://github.com/appium/appium-dotnet-driver/blob/master/src/Appium.Net/Appium/Android/AndroidDriver.cs) |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/app/end-test-coverage.yml)
@@ -111,4 +104,4 @@ null
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/app/end-test-coverage.yml)
## See Also
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L559)
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L560)
@@ -37,12 +37,6 @@ app_strings("en")
```
```php
# PHP
$strings = $driver->appStrings();
```
```csharp
// C#
Dictionary<string, object> appStrings = driver.GetAppStringDictionary("end", "/path/to/file");
@@ -77,7 +71,6 @@ Dictionary<string, object> appStrings = driver.GetAppStringDictionary("end", "/p
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | [github.com](https://github.com/admc/wd/blob/master/lib/commands.js#L2916) |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#app_strings-instance_method) |
|[PHP](https://github.com/appium/php-client/releases/latest)| All | [github.com](https://github.com/appium/php-client/) |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| All | [github.com](https://github.com/appium/appium-dotnet-driver/blob/master/src/Appium.Net/Appium/AppiumDriver.cs) |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/app/get-app-strings.yml)
@@ -111,4 +104,4 @@ null
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/app/get-app-strings.yml)
## See Also
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L562)
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L563)
+1 -8
View File
@@ -37,12 +37,6 @@ install_app('/Users/johndoe/path/to/app.apk')
```
```php
# PHP
$driver->installApp('/Users/johndoe/path/to/app.apk');
```
```csharp
// C#
driver.InstallApp("/Users/johndoe/path/to/app.apk")
@@ -82,7 +76,6 @@ iOS tests with XCUITest can also use the `mobile: installApp` method. See detail
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | [github.com](https://github.com/admc/wd/blob/master/lib/commands.js#L2540) |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#install_app-instance_method) |
|[PHP](https://github.com/appium/php-client/releases/latest)| All | [github.com](https://github.com/appium/php-client/) |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| All | [github.com](https://github.com/appium/appium-dotnet-driver/blob/master/src/Appium.Net/Appium/AppiumDriver.cs) |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/app/install-app.yml)
@@ -115,4 +108,4 @@ null
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/app/install-app.yml)
## See Also
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L436)
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L437)
@@ -37,12 +37,6 @@ app_installed?('com.example.AppName')
```
```php
# PHP
$driver->isAppInstalled('com.example.AppName')
```
```csharp
// C#
driver.IsAppInstalled("com.example.AppName");
@@ -82,7 +76,6 @@ iOS tests with XCUITest can also use the `mobile: isAppInstalled` method. See de
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | [github.com](https://github.com/admc/wd/blob/master/lib/commands.js#L2586) |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#app_installed%3F-instance_method) |
|[PHP](https://github.com/appium/php-client/releases/latest)| All | [github.com](https://github.com/appium/php-client/) |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| All | [github.com](https://github.com/appium/appium-dotnet-driver/blob/master/src/Appium.Net/Appium/AppiumDriver.cs) |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/app/is-app-installed.yml)
@@ -115,4 +108,4 @@ Return true if installed, false if not (`boolean`)
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/app/is-app-installed.yml)
## See Also
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L472)
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L473)
+1 -8
View File
@@ -37,12 +37,6 @@ launch_app
```
```php
# PHP
$driver->launchApp();
```
```csharp
// C#
driver.LaunchApp();
@@ -83,7 +77,6 @@ iOS tests with XCUITest can also use the `mobile: launchApp` method. See detaile
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | [github.com](https://github.com/admc/wd/blob/master/lib/commands.js#L2798) |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#launch_app-instance_method) |
|[PHP](https://github.com/appium/php-client/releases/latest)| All | [github.com](https://github.com/appium/php-client/) |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| All | [github.com](https://github.com/appium/appium-dotnet-driver/blob/master/src/Appium.Net/Appium/AppiumDriver.cs) |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/app/launch-app.yml)
@@ -114,4 +107,4 @@ null
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/app/launch-app.yml)
## See Also
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L547)
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L548)
+1 -8
View File
@@ -37,12 +37,6 @@ remove_app('com.example.AppName')
```
```php
# PHP
$driver->removeApp('com.example.AppName');
```
```csharp
// C#
driver.RemoveApp("com.example.AppName");
@@ -82,7 +76,6 @@ iOS tests with XCUITest can also use the `mobile: removeApp` method. See detaile
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | [github.com](https://github.com/admc/wd/blob/master/lib/commands.js#L2563) |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#remove_app-instance_method) |
|[PHP](https://github.com/appium/php-client/releases/latest)| All | [github.com](https://github.com/appium/php-client/) |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| All | [github.com](https://github.com/appium/appium-dotnet-driver/blob/master/src/Appium.Net/Appium/AppiumDriver.cs) |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/app/remove-app.yml)
@@ -116,4 +109,4 @@ null
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/app/remove-app.yml)
## See Also
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L454)
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L455)
+1 -8
View File
@@ -37,12 +37,6 @@ reset
```
```php
# PHP
$driver->reset();
```
```csharp
// C#
driver.ResetApp();
@@ -77,7 +71,6 @@ driver.ResetApp();
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | [github.com](https://github.com/admc/wd/blob/master/lib/commands.js#L2827) |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#reset-instance_method) |
|[PHP](https://github.com/appium/php-client/releases/latest)| All | [github.com](https://github.com/appium/php-client/) |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| All | [github.com](https://github.com/appium/appium-dotnet-driver/blob/master/src/Appium.Net/Appium/AppiumDriver.cs) |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/app/reset-app.yml)
@@ -108,4 +101,4 @@ null
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/app/reset-app.yml)
## See Also
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L553)
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L554)
+1 -8
View File
@@ -42,12 +42,6 @@ terminate_app('io.appium.android.apis')
```
```php
# PHP
// Supports only `mobile: queryAppState` for iOS, XCUITest
```
```csharp
// C#
// Supports only `mobile: queryAppState` for iOS, XCUITest
@@ -87,7 +81,6 @@ iOS tests with XCUITest can also use the `mobile: terminateApp` method. See deta
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | [github.com](https://github.com/admc/wd/blob/master/lib/commands.js) |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Base/Driver#terminate_app-instance_method) |
|[PHP](https://github.com/appium/php-client/releases/latest)| All | [github.com](https://github.com/appium/php-client/) |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| All | [github.com](https://github.com/appium/appium-dotnet-driver/) |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/app/terminate-app.yml)
@@ -121,4 +114,4 @@ null
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/app/terminate-app.yml)
## See Also
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L463)
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L464)
@@ -37,12 +37,6 @@ finger_print 1
```
```php
# PHP
// PHP Code here
```
```csharp
// C#
// CSharp Code here
@@ -85,7 +79,6 @@ Touch ID by iOS is [here](http://appium.io/docs/en/commands/device/simulator/tou
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | [github.com](https://github.com/appium/appium-android-driver/blob/d16c7161d92ab6f6c9cec3f22218219ac3659716/lib/commands/actions.js#L260) |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/github/appium/ruby_lib_core/master/Appium/Core/Android/Device#finger_print-instance_method) |
|[PHP](https://github.com/appium/php-client/releases/latest)| None | |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| None | |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/authentication/finger-print.yml)
@@ -118,4 +111,4 @@ null
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/authentication/finger-print.yml)
## See Also
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L388)
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L389)
@@ -39,12 +39,6 @@ get_clipboard
```
```php
# PHP
// PHP Code here
```
```csharp
// C#
// CSharp Code here
@@ -56,13 +50,9 @@ get_clipboard
Get the content of the system clipboard
(For iOS real devices) Apple security preferences require the WebDriverAgentRunner application to be in [foreground](https://github.com/appium/WebDriverAgent/issues/330) in order to be able to receive the system clipboard content. Otherwise an empty string is always returned. Consider using [Activate App](/docs/en/commands/device/app/activate-app.md) and [Background App](/docs/en/commands/device/app/background-app.md) to change the foreground application.
Activate App command cannot launch the WebDriverAgent properly on some environments. It depends on XCTest framework by Apple. Then, you should launch the WebDriverAgent using its Springboard's application icon. Follow the example below.
(For iOS real devices) Apple security preferences require the WebDriverAgentRunner application to be in [foreground](https://github.com/appium/WebDriverAgent/issues/330) in order to be able to receive the system clipboard content. Otherwise an empty string is always returned. Consider using [Activate App](/docs/en/commands/device/app/activate-app.md) and [Background App](/docs/en/commands/device/app/background-app.md) to change the foreground application. Activate App command cannot launch the WebDriverAgent properly on some environments. It depends on XCTest framework by Apple. Then, you should launch the WebDriverAgent using its Springboard's application icon. Follow the example below.
1. Open springboard, `@driver.activate_app 'com.apple.springboard'`. 2. Find the WDA icon with `@driver.find_element :accessibility_id, 'WebDriverAgentRunner-Runner'` (It should be visible on the screen) and click it. 3. Call the get clipboard API. 4. Open the application under test with the [Activate App](/docs/en/commands/device/app/activate-app.md).
1. Open springboard, `@driver.activate_app 'com.apple.springboard'`.
2. Find the WDA icon with `@driver.find_element :accessibility_id, 'WebDriverAgentRunner-Runner'` (It should be visible on the screen) and click it.
3. Call the get clipboard API.
4. Open the application under test with the [Activate App](/docs/en/commands/device/app/activate-app.md).
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/clipboard/get-clipboard.yml)
## Support
@@ -91,7 +81,6 @@ Activate App command cannot launch the WebDriverAgent properly on some environme
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | [github.com](https://github.com/admc/wd/releases) |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [Android](https://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Android/Device#get_clipboard-instance_method) [iOS](https://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Ios/Device#get_clipboard-instance_method) |
|[PHP](https://github.com/appium/php-client/releases/latest)| None | [github.com](https://github.com/appium/php-client/releases/latest) |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| None | [github.com](https://github.com/appium/appium) |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/clipboard/get-clipboard.yml)
@@ -40,12 +40,6 @@ set_clipboard content: 'happy testing'
```
```php
# PHP
// PHP Code here
```
```csharp
// C#
// CSharp Code here
@@ -85,7 +79,6 @@ Set the content of the system clipboard
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | [github.com](https://github.com/admc/wd/releases) |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [iOS](https://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Ios/Device#set_clipboard-instance_method) [Android](https://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Android/Device#set_clipboard-instance_method) |
|[PHP](https://github.com/appium/php-client/releases/latest)| None | [github.com](https://github.com/appium/php-client/releases/latest) |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| None | [github.com](https://github.com/appium/appium) |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/clipboard/set-clipboard.yml)
+1 -6
View File
@@ -35,10 +35,6 @@ set_power_ac :on
```
```php
// Not supported
```
```csharp
// Not supported
```
@@ -77,7 +73,6 @@ To set the state of the battery charger to connected or not.
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| None | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| None | |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/github/appium/ruby_lib_core/master/Appium/Core/Android/Device/Emulator#set_power_ac-instance_method) |
|[PHP](https://github.com/appium/php-client/releases/latest)| None | |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| None | |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/emulator/power_ac.yml)
@@ -110,4 +105,4 @@ null
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/emulator/power_ac.yml)
## See Also
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L415)
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L416)
@@ -35,10 +35,6 @@ set_power_capacity 50
```
```php
// Not supported
```
```csharp
// Not supported
```
@@ -77,7 +73,6 @@ To set the battery percentage.
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| None | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| None | |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/github/appium/ruby_lib_core/master/Appium/Core/Android/Device/Emulator#set_power_capacity-instance_method) |
|[PHP](https://github.com/appium/php-client/releases/latest)| None | |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| None | |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/emulator/power_capacity.yml)
@@ -110,4 +105,4 @@ null
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/emulator/power_capacity.yml)
## See Also
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L412)
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L413)
+1 -8
View File
@@ -37,12 +37,6 @@ pull_file('/data/local/tmp/file.txt')
```
```php
# PHP
$data = $driver->pullFile('data/local/tmp/file.txt');
```
```csharp
// C#
byte[] fileBase64 = driver.PullFile("/path/to/device/foo.bar");
@@ -77,7 +71,6 @@ byte[] fileBase64 = driver.PullFile("/path/to/device/foo.bar");
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | [github.com](https://github.com/admc/wd/blob/master/lib/commands.js#L2665) |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#pull_file-instance_method) |
|[PHP](https://github.com/appium/php-client/releases/latest)| All | [github.com](https://github.com/appium/php-client/) |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| All | [github.com](https://github.com/appium/appium-dotnet-driver/blob/master/src/Appium.Net/Appium/AppiumDriver.cs) |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/files/pull-file.yml)
@@ -110,4 +103,4 @@ Contents of file in base64 (`string`)
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/files/pull-file.yml)
## See Also
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L504)
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L505)
+1 -8
View File
@@ -37,12 +37,6 @@ pull_folder('/data/local/tmp/file.txt')
```
```php
# PHP
$folderBase64 = $driver->pullFolder($path);
```
```csharp
// C#
byte[] folder = driver.PullFolder("/path/to/device");
@@ -77,7 +71,6 @@ byte[] folder = driver.PullFolder("/path/to/device");
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | [github.com](https://github.com/admc/wd/blob/master/lib/commands.js#L2688) |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#pull_folder-instance_method) |
|[PHP](https://github.com/appium/php-client/releases/latest)| All | [github.com](https://github.com/appium/php-client/) |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| All | [github.com](https://github.com/appium/appium-dotnet-driver/blob/master/src/Appium.Net/Appium/AppiumDriver.cs) |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/files/pull-folder.yml)
@@ -110,4 +103,4 @@ A string of Base64 encoded data, representing a zip archive of the contents of t
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/files/pull-folder.yml)
## See Also
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L507)
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L508)
+1 -8
View File
@@ -40,12 +40,6 @@ push_file('/data/local/tmp/foo.bar', File.read('path/to/file.png'))
```
```php
# PHP
$driver->pushFile('/data/local/tmp/foo.bar', 'QXJlIHlvdXIgYmVlcnMgb2theT8=');
```
```csharp
// C#
driver.PushFile("/data/local/tmp/foo.bar", new FileInfo("/Users/johndoe/files/foo.bar"))
@@ -80,7 +74,6 @@ driver.PushFile("/data/local/tmp/foo.bar", new FileInfo("/Users/johndoe/files/fo
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | [github.com](https://github.com/admc/wd/blob/master/lib/commands.js#L2640) |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#push_file-instance_method) |
|[PHP](https://github.com/appium/php-client/releases/latest)| All | [github.com](https://github.com/appium/php-client/) |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| All | [github.com](https://github.com/appium/appium-dotnet-driver/blob/master/src/Appium.Net/Appium/AppiumDriver.cs) |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/files/push-file.yml)
@@ -114,4 +107,4 @@ null
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/files/push-file.yml)
## See Also
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L501)
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L502)
@@ -37,12 +37,6 @@ device_locked?
```
```php
# PHP
// TODO PHP sample
```
```csharp
// C#
bool isLocked = driver.IsLocked(); // Supported by IOSDriver & AndroidDriver
@@ -77,7 +71,6 @@ bool isLocked = driver.IsLocked(); // Supported by IOSDriver & AndroidDriver
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | [github.com](https://github.com/admc/wd/blob/master/lib/commands.js#L2407) |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#device_locked%3F-instance_method) |
|[PHP](https://github.com/appium/php-client/releases/latest)| All | [github.com](https://github.com/appium/php-client/) |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| All | [github.com](https://github.com/appium/appium-dotnet-driver/blob/master/src/Appium.Net/Appium/Android/AndroidDriver.cs) |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/interactions/is-locked.yml)
@@ -108,4 +101,4 @@ True if the device is locked, false if not (`boolean`)
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/interactions/is-locked.yml)
## See Also
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L367)
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L368)
+1 -8
View File
@@ -39,12 +39,6 @@ lock(5) # lock 5 seconds
```
```php
# PHP
$driver->lock(5);
```
```csharp
// C#
driver.Lock(); // Supported by IOSDriver & AndroidDriver
@@ -79,7 +73,6 @@ driver.Lock(); // Supported by IOSDriver & AndroidDriver
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | [github.com](https://github.com/admc/wd/blob/master/lib/commands.js#L2363) |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#lock-instance_method) |
|[PHP](https://github.com/appium/php-client/releases/latest)| All | [github.com](https://github.com/appium/php-client/) |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| All | [github.com](https://github.com/appium/appium-dotnet-driver/blob/master/src/Appium.Net/Appium/Android/AndroidDriver.cs) |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/interactions/lock.yml)
@@ -112,4 +105,4 @@ null
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/interactions/lock.yml)
## See Also
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L361)
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L362)
@@ -30,12 +30,6 @@ driver.rotateDevice({x: 114, y: 198, duration: 5, radius: 3, rotation: 220, touc
# Not supported
```
```php
# PHP
// TODO PHP sample
```
```csharp
// C#
driver.Rotate(new Dictionary<string, int> { { "x", 114 }, { "y", 198 }, { "duration", 5 }, { "radius", 3 }, { "rotation", 220 }, { "touchCount", 2 } });
@@ -70,7 +64,6 @@ driver.Rotate(new Dictionary<string, int> { { "x", 114 }, { "y", 198 }, { "durat
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | [github.com](https://github.com/admc/wd/blob/master/lib/commands.js#L2470) |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | |
|[PHP](https://github.com/appium/php-client/releases/latest)| All | [github.com](https://github.com/appium/php-client/) |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| All | [github.com](https://github.com/appium/appium-dotnet-driver/blob/master/src/Appium.Net/Appium/AppiumDriver.cs) |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/interactions/rotate.yml)
@@ -108,4 +101,4 @@ null
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/interactions/rotate.yml)
## See Also
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L424)
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L425)
@@ -37,12 +37,6 @@ shake
```
```php
# PHP
$driver->shake();
```
```csharp
// C#
driver.ShakeDevice();
@@ -77,7 +71,6 @@ driver.ShakeDevice();
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | [github.com](https://github.com/admc/wd/blob/master/lib/commands.js#L2342) |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#shake-instance_method) |
|[PHP](https://github.com/appium/php-client/releases/latest)| All | [github.com](https://github.com/appium/php-client/) |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| All | [github.com](https://github.com/appium/appium-dotnet-driver/blob/master/src/Appium.Net/Appium/iOS/IOSDriver.cs) |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/interactions/shake.yml)
@@ -108,4 +101,4 @@ null
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/interactions/shake.yml)
## See Also
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L354)
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L355)
@@ -41,12 +41,6 @@ unlock
```
```php
# PHP
// TODO PHP sample
```
```csharp
// C#
driver.Unlock(); // Supported by IOSDriver & AndroidDriver
@@ -81,7 +75,6 @@ driver.Unlock(); // Supported by IOSDriver & AndroidDriver
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | [github.com](https://github.com/admc/wd/blob/master/lib/commands.js#L2386) |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#unlock-instance_method) |
|[PHP](https://github.com/appium/php-client/releases/latest)| All | [github.com](https://github.com/appium/php-client/) |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| All | [github.com](https://github.com/appium/appium-dotnet-driver/blob/master/src/Appium.Net/Appium/Android/AndroidDriver.cs) |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/interactions/unlock.yml)
@@ -112,4 +105,4 @@ null
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/interactions/unlock.yml)
## See Also
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L364)
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L365)
+1 -11
View File
@@ -37,15 +37,6 @@ hide_keyboard
```
```php
# PHP
$driver->hideKeyboard();
$driver->hideKeyboard(array(
'keyName' => 'Done'
));
```
```csharp
// C#
driver.HideKeyboard();
@@ -80,7 +71,6 @@ driver.HideKeyboard();
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | [github.com](https://github.com/admc/wd/blob/master/lib/commands.js#L2723) |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#hide_keyboard-instance_method) |
|[PHP](https://github.com/appium/php-client/releases/latest)| All | [github.com](https://github.com/appium/php-client/) |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| All | [github.com](https://github.com/appium/appium-dotnet-driver/blob/master/src/Appium.Net/Appium/AppiumDriver.cs) |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/keys/hide-keyboard.yml)
@@ -116,4 +106,4 @@ null
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/keys/hide-keyboard.yml)
## See Also
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L495)
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L496)
@@ -37,10 +37,6 @@ is_keyboard_shown
```
```php
// Not supported
```
```csharp
// Not supported
```
@@ -73,7 +69,6 @@ is_keyboard_shown
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| None | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | [github.com](https://github.com/admc/wd/blob/master/lib/commands.js#L2638) |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#is_keyboard_shown-instance_method) |
|[PHP](https://github.com/appium/php-client/releases/latest)| None | |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| None | |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/keys/is-keyboard-shown.yml)
@@ -104,4 +99,4 @@ True if the keyboard is shown. (`boolean`)
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/keys/is-keyboard-shown.yml)
## See Also
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L498)
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L499)
@@ -37,12 +37,6 @@ long_press_keycode(10)
```
```php
# PHP
// TODO PHP sample
```
```csharp
// C#
driver.LongPressKeyCode(WindowsKeyCode.Back);
@@ -81,7 +75,6 @@ See https://developer.android.com/reference/android/view/KeyEvent.html# for refe
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | [github.com](https://github.com/admc/wd/blob/master/lib/commands.js#L2478) |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#long_press_keycode-instance_method) |
|[PHP](https://github.com/appium/php-client/releases/latest)| All | [github.com](https://github.com/appium/php-client/) |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| All | [github.com](https://github.com/appium/appium-dotnet-driver/blob/master/src/Appium.Net/Appium/Windows/WindowsDriver.cs) |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/keys/long-press-keycode.yml)
@@ -116,4 +109,4 @@ null
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/keys/long-press-keycode.yml)
## See Also
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L385)
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L386)
@@ -37,12 +37,6 @@ press_keycode(10)
```
```php
# PHP
// TODO PHP sample
```
```csharp
// C#
driver.PressKeyCode(WindowsKeyCode.Windows);
@@ -81,7 +75,6 @@ See https://developer.android.com/reference/android/view/KeyEvent.html for refer
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | [github.com](https://github.com/admc/wd/blob/master/lib/commands.js#L2457) |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#press_keycode-instance_method) |
|[PHP](https://github.com/appium/php-client/releases/latest)| All | [github.com](https://github.com/appium/php-client/) |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| All | [github.com](https://github.com/appium/appium-dotnet-driver/blob/master/src/Appium.Net/Appium/Windows/WindowsDriver.cs) |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/keys/press-keycode.yml)
@@ -116,4 +109,4 @@ null
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/keys/press-keycode.yml)
## See Also
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L382)
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L383)
+1 -8
View File
@@ -37,12 +37,6 @@ gsm_call(phone_number: '5551234567', action: :call)
```
```php
# PHP
// TODO
```
```csharp
// C#
// TODO
@@ -77,7 +71,6 @@ gsm_call(phone_number: '5551234567', action: :call)
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | [github.com](https://github.com/admc/wd/blob/master/lib/commands.js#L3183) |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/github/appium/ruby_lib_core/master/Appium/Core/Android/Device/Emulator#gsm_call-instance_method) |
|[PHP](https://github.com/appium/php-client/releases/latest)| None | [github.com](https://github.com/appium/php-client/) |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| None | [github.com](https://github.com/appium/appium-dotnet-driver/) |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/network/gsm-call.yml)
@@ -111,4 +104,4 @@ null
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/network/gsm-call.yml)
## See Also
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L394)
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L395)
@@ -37,12 +37,6 @@ gsm_signal :good
```
```php
# PHP
// TODO
```
```csharp
// C#
// TODO
@@ -77,7 +71,6 @@ gsm_signal :good
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | [github.com](https://github.com/admc/wd/blob/master/lib/commands.js#L3221) |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/github/appium/ruby_lib_core/master/Appium/Core/Android/Device/Emulator#gsm_signal-instance_method) |
|[PHP](https://github.com/appium/php-client/releases/latest)| None | [github.com](https://github.com/appium/php-client/) |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| None | [github.com](https://github.com/appium/appium-dotnet-driver/) |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/network/gsm-signal.yml)
@@ -110,4 +103,4 @@ null
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/network/gsm-signal.yml)
## See Also
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L397)
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L398)
+1 -8
View File
@@ -37,12 +37,6 @@ gsm_voice :home
```
```php
# PHP
// TODO
```
```csharp
// C#
// TODO
@@ -77,7 +71,6 @@ gsm_voice :home
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | [github.com](https://github.com/admc/wd/blob/master/lib/commands.js#L3241) |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/github/appium/ruby_lib_core/master/Appium/Core/Android/Device/Emulator#gsm_voice-instance_method) |
|[PHP](https://github.com/appium/php-client/releases/latest)| None | [github.com](https://github.com/appium/php-client/) |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| None | [github.com](https://github.com/appium/appium-dotnet-driver/) |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/network/gsm-voice.yml)
@@ -110,4 +103,4 @@ null
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/network/gsm-voice.yml)
## See Also
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L409)
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L410)
@@ -37,10 +37,6 @@ set_network_speed :lte
```
```php
// Not supported
```
```csharp
// Not supported
```
@@ -73,7 +69,6 @@ set_network_speed :lte
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | [github.com](https://github.com/admc/wd/blob/master/lib/commands.js#L3411) |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/github/appium/ruby_lib_core/master/Appium/Core/Android/Device/Emulator#set_network_speed-instance_method) |
|[PHP](https://github.com/appium/php-client/releases/latest)| None | |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| None | |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/network/network-speed.yml)
@@ -106,4 +101,4 @@ null
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/network/network-speed.yml)
## See Also
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L418)
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L419)
+1 -8
View File
@@ -37,12 +37,6 @@ send_sms(phone_number: '555-123-4567', message: 'Hey lol')
```
```php
# PHP
// TODO
```
```csharp
// C#
// TODO
@@ -77,7 +71,6 @@ send_sms(phone_number: '555-123-4567', message: 'Hey lol')
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | [github.com](https://github.com/admc/wd/blob/master/lib/commands.js#L3183) |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/github/appium/ruby_lib_core/master/Appium/Core/Android/Device/Emulator#send_sms-instance_method) |
|[PHP](https://github.com/appium/php-client/releases/latest)| None | [github.com](https://github.com/appium/php-client/) |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| None | [github.com](https://github.com/appium/appium-dotnet-driver/) |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/network/send-sms.yml)
@@ -111,4 +104,4 @@ null
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/network/send-sms.yml)
## See Also
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L391)
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L392)
@@ -35,12 +35,6 @@ toggle_flight_mode
```
```php
# PHP
// TODO
```
```csharp
// C#
// TODO
@@ -75,7 +69,6 @@ toggle_flight_mode
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | [github.com](https://github.com/admc/wd/blob/master/lib/commands.js#L2712) |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#toggle_flight_mode-instance_method) |
|[PHP](https://github.com/appium/php-client/releases/latest)| All | [github.com](https://github.com/appium/php-client/) |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| All | [github.com](https://github.com/appium/appium-dotnet-driver/) |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/network/toggle-airplane-mode.yml)
@@ -106,4 +99,4 @@ null
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/network/toggle-airplane-mode.yml)
## See Also
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L510)
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L511)
@@ -35,12 +35,6 @@ toggle_data
```
```php
# PHP
// TODO
```
```csharp
// C#
// TODO
@@ -83,7 +77,6 @@ because it requires system or carrier privileged permission, and Android <= 21 d
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | [github.com](https://github.com/admc/wd/blob/master/lib/commands.js#L2771) |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/github/appium/ruby_lib_core/master/Appium/Core/Device#toggle_data-instance_method) |
|[PHP](https://github.com/appium/php-client/releases/latest)| All | [github.com](https://github.com/appium/php-client/) |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| All | [github.com](https://github.com/appium/appium-dotnet-driver/) |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/network/toggle-data.yml)
@@ -114,4 +107,4 @@ null
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/network/toggle-data.yml)
## See Also
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L513)
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L514)
@@ -37,12 +37,6 @@ toggle_location_services
```
```php
# PHP
// TODO
```
```csharp
// C#
// TODO
@@ -77,7 +71,6 @@ toggle_location_services
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | [github.com](https://github.com/admc/wd/blob/master/lib/commands.js#L2758) |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/github/appium/ruby_lib_core/master/Appium/Core/Device#toggle_location_services-instance_method) |
|[PHP](https://github.com/appium/php-client/releases/latest)| All | [github.com](https://github.com/appium/php-client/) |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| All | [github.com](https://github.com/appium/appium-dotnet-driver/) |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/network/toggle-location-services.yml)
@@ -108,4 +101,4 @@ null
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/network/toggle-location-services.yml)
## See Also
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L519)
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L520)
@@ -37,12 +37,6 @@ toggle_wifi
```
```php
# PHP
// TODO
```
```csharp
// C#
// TODO
@@ -83,7 +77,6 @@ Since Android Q, a method to change the WiFi service state has been restricted.
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | [github.com](https://github.com/admc/wd/blob/master/lib/commands.js#L2738) |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/github/appium/ruby_lib_core/master/Appium/Core/Device#toggle_wifi-instance_method) |
|[PHP](https://github.com/appium/php-client/releases/latest)| All | [github.com](https://github.com/appium/php-client/) |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| All | [github.com](https://github.com/appium/appium-dotnet-driver/) |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/network/toggle-wifi.yml)
@@ -114,4 +107,4 @@ null
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/network/toggle-wifi.yml)
## See Also
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L516)
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L517)
@@ -37,12 +37,6 @@ get_performance_data package_name: 'io.appium.android.apis', data_type: 'cpuinfo
```
```php
# PHP
// TODO PHP sample
```
```csharp
// C#
// Not supported
@@ -77,7 +71,6 @@ get_performance_data package_name: 'io.appium.android.apis', data_type: 'cpuinfo
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | [github.com](https://github.com/admc/wd/blob/master/lib/commands.js#L3412) |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Android/Device#get_performance_data-instance_method) |
|[PHP](https://github.com/appium/php-client/releases/latest)| None | [github.com](https://github.com/appium/php-client/) |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| None | [github.com](https://github.com/appium/appium-dotnet-driver/) |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/performance-data/get-performance-data.yml)
@@ -112,4 +105,4 @@ The information type of the system state which is supported to read as like cpu,
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/performance-data/get-performance-data.yml)
## See Also
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L379)
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L380)
@@ -37,12 +37,6 @@ get_performance_data_types
```
```php
# PHP
// TODO PHP sample
```
```csharp
// C#
// Not supported
@@ -77,7 +71,6 @@ get_performance_data_types
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | [github.com](https://github.com/admc/wd/blob/master/lib/commands.js#L3398) |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Android/Device#get_performance_data_types-instance_method) |
|[PHP](https://github.com/appium/php-client/releases/latest)| None | [github.com](https://github.com/appium/php-client/) |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| None | [github.com](https://github.com/appium/appium-dotnet-driver/) |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/performance-data/performance-data-types.yml)
@@ -108,4 +101,4 @@ The available performance data types (cpuinfo|batteryinfo|networkinfo|memoryinfo
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/performance-data/performance-data-types.yml)
## See Also
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L376)
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L377)
@@ -42,12 +42,6 @@ start_recording_screen video_type: 'h264', time_limit: '260' # iOS
```
```php
# PHP
// TODO PHP sample
```
```csharp
// C#
driver.StartRecordingScreen(
@@ -86,7 +80,6 @@ driver.StartRecordingScreen(
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | [github.com](https://github.com/admc/wd/blob/master/lib/commands.js#L3412) |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [Android](https://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Android/Device#start_recording_screen-instance_method) [iOS](https://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Ios/Xcuitest/Device#start_recording_screen-instance_method) |
|[PHP](https://github.com/appium/php-client/releases/latest)| None | [github.com](https://github.com/appium/php-client/) |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| None | [github.com](https://github.com/appium/appium-dotnet-driver/) |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/recording-screen/start-recording-screen.yml)
@@ -116,7 +109,7 @@ driver.StartRecordingScreen(
| options.method | `string` | The http multipart upload method name. The 'PUT' one is used by default. |
| options.forceRestart | `boolean` | Whether to try to catch and upload/return the currently running screen recording (`false`, the default setting on server) or ignore the result of it and start a new recording immediately (`true`). |
| options.timeLimit | `string` | Recording time. 180 seconds is by default. |
| options.videoType | `string` | (iOS Only) The format of the screen capture to be recorded. Available formats are the output of `ffmpeg -codecs` such as `libx264` and `mpeg4`. Defaults to `mpeg4`. |
| options.videoType | `string` | (iOS Only) The format of the screen capture to be recorded. Available formats are the output of `ffmpeg -codecs` such as `libx264` and `mpeg4`. Defaults to `mjpeg`. |
| options.videoQuality | `string` | (iOS Only) The video encoding quality (low, medium, high, photo - defaults to medium). |
| options.videoFps | `string` | (iOS Only) The Frames Per Second rate of the recorded video. Change this value if the resulting video is too slow or too fast. Defaults to 10. This can decrease the resulting file size. |
| options.videoScale | `string` | (iOS Only) The scaling value to apply. Read https://trac.ffmpeg.org/wiki/Scaling for possible values. Example value of 720p scaling is '1280:720'. This can decrease/increase the resulting file size. No scale is applied by default. |
@@ -132,4 +125,4 @@ null
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/recording-screen/start-recording-screen.yml)
## See Also
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L370)
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L371)
@@ -40,12 +40,6 @@ stop_recording_screen remote_path: 'https://example.com', user: 'example', pass:
```
```php
# PHP
// TODO PHP sample
```
```csharp
// C#
driver.StopRecordingScreen();
@@ -80,7 +74,6 @@ driver.StopRecordingScreen();
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | [github.com](https://github.com/admc/wd/blob/master/lib/commands.js#L3398) |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#stop_recording_screen-instance_method) |
|[PHP](https://github.com/appium/php-client/releases/latest)| None | [github.com](https://github.com/appium/php-client/) |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| None | [github.com](https://github.com/appium/appium-dotnet-driver/blob/master/src/Appium.Net/Appium/AppiumDriver.cs) |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/recording-screen/stop-recording-screen.yml)
@@ -114,4 +107,4 @@ Base64 encoded string. If remote_path is set, the response is empty string. (`st
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/recording-screen/stop-recording-screen.yml)
## See Also
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L373)
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L374)
@@ -37,12 +37,6 @@ toggle_touch_id_enrollment
```
```php
# PHP
// TODO PHP sample
```
```csharp
// C#
// TODO C# sample
@@ -85,7 +79,6 @@ This call will only work if the Appium process or its parent application (e.g.,
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | [github.com](https://github.com/admc/wd/blob/master/lib/commands.js#L3150) |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Ios/Device#toggle_touch_id_enrollment-instance_method) |
|[PHP](https://github.com/appium/php-client/releases/latest)| All | [github.com](https://github.com/appium/php-client/) |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| All | [github.com](https://github.com/appium/appium-dotnet-driver/) |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/simulator/toggle-touch-id-enrollment.yml)
@@ -118,4 +111,4 @@ null
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/simulator/toggle-touch-id-enrollment.yml)
## See Also
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L544)
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L545)
@@ -43,12 +43,6 @@ touch_id(true)
```
```php
# PHP
// TODO PHP sample
```
```csharp
// C#
driver.PerformTouchID(false); // Simulates a failed touch
@@ -97,7 +91,6 @@ Finger Print by Android is [here](http://appium.io/docs/en/commands/device/authe
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | [github.com](https://github.com/admc/wd/blob/master/lib/commands.js#L3133) |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Ios/Device#touch_id-instance_method) |
|[PHP](https://github.com/appium/php-client/releases/latest)| All | [github.com](https://github.com/appium/php-client/) |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| All | [github.com](https://github.com/appium/appium-dotnet-driver/blob/master/src/Appium.Net/Appium/iOS/IOSDriver.cs) |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/simulator/touch-id.yml)
@@ -130,5 +123,5 @@ null
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/simulator/touch-id.yml)
## See Also
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L541)
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L542)
* [Appium Docs](https://github.com/appium/appium-xcuitest-driver/blob/master/docs/touch-id.md)
@@ -35,10 +35,6 @@ get_device_density
```
```php
// Not supported
```
```csharp
// Not supported
```
@@ -71,7 +67,6 @@ get_device_density
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| None | |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Android/Device#get_display_density-instance_method) |
|[PHP](https://github.com/appium/php-client/releases/latest)| None | |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| None | |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/system/display-density.yml)
@@ -102,4 +97,4 @@ The device density(dpi) of the Android device (`number`)
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/system/display-density.yml)
## See Also
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L538)
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L539)
@@ -37,12 +37,6 @@ open_notifications();
```
```php
# PHP
$driver->openNotifications();
```
```csharp
// C#
// TODO
@@ -77,7 +71,6 @@ $driver->openNotifications();
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | [github.com](https://github.com/admc/wd/blob/master/lib/commands.js#L3004) |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#open_notifications-instance_method) |
|[PHP](https://github.com/appium/php-client/releases/latest)| All | [github.com](https://github.com/appium/php-client/) |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| All | [github.com](https://github.com/appium/appium-dotnet-driver/) |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/system/open-notifications.yml)
@@ -108,4 +101,4 @@ null
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/system/open-notifications.yml)
## See Also
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L522)
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L523)
@@ -35,12 +35,6 @@ get_system_bars
```
```php
# PHP
// TODO
```
```csharp
// C#
// TODO
@@ -75,7 +69,6 @@ get_system_bars
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| None | |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#get_system_bars-instance_method) |
|[PHP](https://github.com/appium/php-client/releases/latest)| None | [github.com](https://github.com/appium/php-client/) |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| None | [github.com](https://github.com/appium/appium-dotnet-driver/) |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/system/system-bars.yml)
@@ -106,4 +99,4 @@ Information about visibility and bounds of status and navigation bar (`array<obj
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/system/system-bars.yml)
## See Also
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L535)
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L536)
@@ -40,12 +40,6 @@ device_time
```
```php
# PHP
$time = $driver->getDeviceTime();
```
```csharp
// C#
string result = driver.DeviceTime;
@@ -80,7 +74,6 @@ string result = driver.DeviceTime;
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | [github.com](https://github.com/admc/wd/blob/master/lib/commands.js#L3119) |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#device_time-instance_method) |
|[PHP](https://github.com/appium/php-client/releases/latest)| All | [github.com](https://github.com/appium/php-client/) |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| All | [github.com](https://github.com/appium/appium-dotnet-driver/) |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/system/system-time.yml)
@@ -111,4 +104,4 @@ Time on the device (`string`)
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/system/system-time.yml)
## See Also
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L357)
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L358)
@@ -39,12 +39,6 @@ find_element(:accessibility_id, "SomeAccessibilityID").clear
```
```php
# PHP
// TODO PHP sample
```
```csharp
// C#
var element = driver.FindElementByAccessibilityId("SomeAccessibilityID");
@@ -80,7 +74,6 @@ element.Clear();
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | [github.com](https://github.com/admc/wd/blob/master/lib/commands.js#L1780) |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/gems/selenium-webdriver/Selenium/WebDriver/Element:clear) |
|[PHP](https://github.com/appium/php-client/releases/latest)| All | [github.com](https://github.com/appium/php-client/) |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| All | [github.com](https://github.com/SeleniumHQ/selenium/blob/master/dotnet/src/webdriver/Remote/RemoteWebElement.cs) |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/element/actions/clear.yml)
@@ -40,12 +40,6 @@ find_element(:accessibility_id, 'SomeId').click
```
```php
# PHP
$driver->byAccessibilityId('SomeId')->click();
```
```csharp
// C#
MobileElement el = driver.FindElement(MobileByAccessibilityID("Some ID");
@@ -91,7 +85,6 @@ Not all drivers automatically scroll the element into view and may need to be sc
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | [github.com](https://github.com/admc/wd/blob/master/lib/commands.js#L1672) |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/gems/selenium-webdriver/Selenium/WebDriver/Element#click-instance_method) |
|[PHP](https://github.com/appium/php-client/releases/latest)| All | [github.com](https://github.com/appium/php-client/) |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| All | [github.com](https://github.com/appium/appium-dotnet-driver/) |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/element/actions/click.yml)
@@ -39,13 +39,6 @@ find_element(:accessibility_id, "SomeAccessibilityID").send_keys("Hello World!")
```
```php
# PHP
$el = $this->byAccessibilityId('SomeAccessibilityID');
$el->setText('Hello world!');
```
```csharp
// C#
MobileElement el = driver.FindElement(MobileByAccessibilityID("Some ID");
@@ -91,7 +84,6 @@ Any UTF-8 character may be specified, however, if the server does not support na
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | [github.com](https://github.com/admc/wd/blob/master/lib/commands.js#L1700) |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/gems/selenium-webdriver/Selenium/WebDriver/Element#send_keys-instance_method) |
|[PHP](https://github.com/appium/php-client/releases/latest)| All | [github.com](https://github.com/appium/php-client/) |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| All | [github.com](https://github.com/appium/appium-dotnet-driver/) |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/element/actions/send-keys.yml)
@@ -39,13 +39,6 @@ find_element(:accessibility_id, 'SomeAccessibilityID').attribute("content-desc")
```
```php
# PHP
$el = $this->byAccessibilityId('SomeAccessibilityID');
$name = $el->attribute('name');
```
```csharp
// C#
var element = driver.FindElementByAccessibilityId("SomeAccessibilityID");
@@ -81,7 +74,6 @@ string tagName = element.GetAttribute("content-desc");
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | [github.com](https://github.com/admc/wd/blob/master/lib/commands.js#L1350) |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/gems/selenium-webdriver/Selenium%2FWebDriver%2FElement:attribute) |
|[PHP](https://github.com/appium/php-client/releases/latest)| All | [github.com](https://github.com/appium/php-client/) |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| All | [github.com](https://github.com/appium/appium-dotnet-driver/blob/master/src/Appium.Net/Appium/AppiumWebElement.cs) |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/element/attributes/attribute.yml)
@@ -39,12 +39,6 @@ find_element(:id, 'SomeId').css_value
```
```php
# PHP
// TODO PHP sample
```
```csharp
// C#
var element = driver.FindElementById("SomeId");
@@ -87,7 +81,6 @@ This command only applies to webview contexts
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | [github.com](https://github.com/admc/wd/blob/master/lib/commands.js#L1447) |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/gems/selenium-webdriver/Selenium/WebDriver/Element:css_value) |
|[PHP](https://github.com/appium/php-client/releases/latest)| All | [github.com](https://github.com/appium/php-client/) |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| All | [github.com](https://github.com/appium/appium-dotnet-driver/blob/master/src/Appium.Net/Appium/AppiumWebElement.cs) |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/element/attributes/css-property.yml)
@@ -39,13 +39,6 @@ find_element(:accessibility_id, "SomeAccessibilityID").displayed?
```
```php
# PHP
$el = $this->byAccessibilityId('SomeAccessibilityID');
$isDisplayed = $el->displayed();
```
```csharp
// C#
var element = driver.FindElementByAccessibilityId("SomeAccessibilityID");
@@ -81,7 +74,6 @@ bool isDisplayed = element.Displayed;
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | [github.com](https://github.com/admc/wd/blob/master/lib/commands.js#L1370) |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/gems/selenium-webdriver/Selenium%2FWebDriver%2FElement:displayed%3F) |
|[PHP](https://github.com/appium/php-client/releases/latest)| All | [github.com](https://github.com/appium/php-client/) |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| All | [github.com](https://github.com/appium/appium-dotnet-driver/blob/master/src/Appium.Net/Appium/AppiumWebElement.cs) |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/element/attributes/displayed.yml)
@@ -39,12 +39,6 @@ find_element(:accessibility_id, "SomeAccessibilityID").enabled?
```
```php
# PHP
// TODO PHP sample
```
```csharp
// C#
var element = driver.FindElementByAccessibilityId("SomeAccessibilityID");
@@ -80,7 +74,6 @@ bool isEnabled = element.Enabled;
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | [github.com](https://github.com/admc/wd/blob/master/lib/commands.js#L1386) |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/gems/selenium-webdriver/Selenium/WebDriver/Element#enabled%3F-instance_method) |
|[PHP](https://github.com/appium/php-client/releases/latest)| All | [github.com](https://github.com/appium/php-client/) |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| All | [github.com](https://github.com/appium/appium-dotnet-driver/blob/master/src/Appium.Net/Appium/AppiumWebElement.cs) |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/element/attributes/enabled.yml)
@@ -33,10 +33,6 @@ let location = await element.getLocationInView();
# Not supported
```
```php
// Not supported
```
```csharp
// Not supported
```
@@ -69,7 +65,6 @@ let location = await element.getLocationInView();
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | [github.com](https://github.com/admc/wd/blob/master/lib/commands.js#L2189) |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | |
|[PHP](https://github.com/appium/php-client/releases/latest)| All | |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| All | |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/element/attributes/location-in-view.yml)
@@ -39,13 +39,6 @@ find_element(:accessibility_id, 'SomeAccessibilityID').location
```
```php
# PHP
$el = $this->byAccessibilityId('SomeAccessibilityID');
$location = $el->location();
```
```csharp
// C#
var element = driver.FindElementByAccessibilityId("SomeAccessibilityID");
@@ -85,7 +78,6 @@ The point (0, 0) refers to the upper-left corner of the page. The element's coor
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | [github.com](https://github.com/admc/wd/blob/master/lib/commands.js#L2175) |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/gems/selenium-webdriver/Selenium/WebDriver/Element:location) |
|[PHP](https://github.com/appium/php-client/releases/latest)| All | [github.com](https://github.com/appium/php-client/) |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| All | [github.com](https://github.com/appium/appium-dotnet-driver/blob/master/src/Appium.Net/Appium/AppiumWebElement.cs) |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/element/attributes/location.yml)
@@ -39,12 +39,6 @@ find_element(:accessibility_id, 'SomeAccessibilityID').tag_name
```
```php
# PHP
// TODO PHP sample
```
```csharp
// C#
var element = driver.FindElementByAccessibilityId("SomeAccessibilityID");
@@ -80,7 +74,6 @@ string tagName = element.TagName;
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | [github.com](https://github.com/admc/wd/blob/master/lib/commands.js#L1336) |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/gems/selenium-webdriver/Selenium/WebDriver/Element#tag_name-instance_method) |
|[PHP](https://github.com/appium/php-client/releases/latest)| All | [github.com](https://github.com/appium/php-client/) |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| All | [github.com](https://github.com/appium/appium-dotnet-driver/blob/master/src/Appium.Net/Appium/AppiumWebElement.cs) |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/element/attributes/name.yml)
@@ -35,12 +35,6 @@ driver.getPageIndex()
# Not supported
```
```php
# PHP
// TODO PHP sample
```
```csharp
// C#
// TODO C# sample
@@ -75,7 +69,6 @@ driver.getPageIndex()
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | [github.com](https://github.com/admc/wd/blob/master/lib/commands.js#L1336) |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/gems/selenium-webdriver/Selenium/WebDriver/Element#tag_name-instance_method) |
|[PHP](https://github.com/appium/php-client/releases/latest)| All | [github.com](https://github.com/appium/php-client/) |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| All | [github.com](https://github.com/appium/appium-dotnet-driver/) |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/element/attributes/page-index.yml)
@@ -107,4 +100,4 @@ The tag name of the element (`string`)
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/element/attributes/page-index.yml)
## See Also
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L338)
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L339)
@@ -43,12 +43,6 @@ element.rect
```
```php
# PHP
// TODO PHP sample
```
```csharp
// C#
var element = driver.FindElementByAccessibilityId("SomeAccessibilityID");
@@ -84,7 +78,6 @@ Rectangle rect = element.Rect;
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/gems/selenium-webdriver/Selenium/WebDriver/Element#rect-instance_method) |
|[PHP](https://github.com/appium/php-client/releases/latest)| All | [github.com](https://github.com/appium/php-client/) |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| All | [github.com](https://github.com/appium/appium-dotnet-driver/blob/master/src/Appium.Net/Appium/AppiumWebElement.cs) |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/element/attributes/rect.yml)
@@ -40,12 +40,6 @@ element = @driver.find_element :accessibility_id, "SomeAccessibilityID"
```
```php
# PHP
// TODO PHP sample
```
```csharp
// C#
// TODO C# sample
@@ -85,7 +79,6 @@ Replace the value to element directly.
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | [github.com](https://github.com/admc/wd/blob/master/lib/commands.js#L1832) |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#replace_value-instance_method) |
|[PHP](https://github.com/appium/php-client/releases/latest)| All | [github.com](https://github.com/appium/php-client/) |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| All | [github.com](https://github.com/appium/appium-dotnet-driver/) |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/element/attributes/replace-value.yml)
@@ -120,4 +113,4 @@ null
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/element/attributes/replace-value.yml)
## See Also
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L576)
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L577)
@@ -39,12 +39,6 @@ find_element(:accessibility_id, "SomeAccessibilityID").selected?
```
```php
# PHP
// TODO PHP sample
```
```csharp
// C#
var element = driver.FindElementByAccessibilityId("SomeAccessibilityID");
@@ -80,7 +74,6 @@ bool isSelected = element.Selected;
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | [github.com](https://github.com/admc/wd/blob/master/lib/commands.js#L1402) |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/gems/selenium-webdriver/Selenium/WebDriver/Element#selected%3F-instance_method) |
|[PHP](https://github.com/appium/php-client/releases/latest)| All | [github.com](https://github.com/appium/php-client/) |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| All | [github.com](https://github.com/appium/appium-dotnet-driver/blob/master/src/Appium.Net/Appium/AppiumWebElement.cs) |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/element/attributes/selected.yml)
@@ -39,13 +39,6 @@ find_element(:accessibility_id, 'SomeAccessibilityID').size
```
```php
# PHP
$el = $this->byAccessibilityId('SomeAccessibilityID');
$size = $el->size();
```
```csharp
// C#
var element = driver.FindElementByAccessibilityId("SomeAccessibilityID");
@@ -85,7 +78,6 @@ The size will be returned as an object with width and height properties.
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | [github.com](https://github.com/admc/wd/blob/master/lib/commands.js#L2203) |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/gems/selenium-webdriver/Selenium/WebDriver/Element:size) |
|[PHP](https://github.com/appium/php-client/releases/latest)| All | [github.com](https://github.com/appium/php-client/) |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| All | [github.com](https://github.com/appium/appium-dotnet-driver/blob/master/src/Appium.Net/Appium/AppiumWebElement.cs) |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/element/attributes/size.yml)
@@ -42,13 +42,6 @@ element.text
```
```php
# PHP
$el = $this->byAccessibilityId('SomeAccessibilityID');
$text = $el->text();
```
```csharp
// C#
var element = driver.FindElementByClassName("SomeClassName");
@@ -89,7 +82,6 @@ Returns the visible text for the element.
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | [github.com](https://github.com/admc/wd/blob/master/lib/commands.js#L1832) |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/gems/selenium-webdriver/Selenium/WebDriver/Element#text-instance_method) |
|[PHP](https://github.com/appium/php-client/releases/latest)| All | [github.com](https://github.com/appium/php-client/) |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| All | [github.com](https://github.com/appium/appium-dotnet-driver/blob/master/src/Appium.Net/Appium/AppiumWebElement.cs) |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/element/attributes/text.yml)
-7
View File
@@ -39,12 +39,6 @@ find_element(:accessibility_id, 'SomeAccessibilityID')
```
```php
# PHP
$el = $this->byAccessibilityId('SomeAccessibilityID');
```
```csharp
// C#
AndroidElement elementOne = driver.FindElementByAccessibilityID("Some ID");
@@ -85,7 +79,6 @@ Get the first element that matches a [locator strategy](/docs/en/commands/elemen
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | [github.com](https://github.com/admc/wd/blob/master/lib/commands.js#L745) |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/gems/selenium-webdriver/Selenium/WebDriver/SearchContext:find_element) |
|[PHP](https://github.com/appium/php-client/releases/latest)| All | [github.com](https://github.com/appium/php-client/) |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| All | [github.com](https://github.com/appium/appium-dotnet-driver/) |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/element/find-element.yml)
@@ -39,12 +39,6 @@ find_elements(:accessibility_id, "~SomeAccessibilityID")
```
```php
# PHP
$els = $this->elements($this->using('accessibility id')->value('SomeAccessibilityID'));
```
```csharp
// C#
IEnumerable<AppiumWebElement> elementsOne = driver.FindElementsByAccessibilityId("SomeAccessibilityID");
@@ -99,7 +93,6 @@ Get a list of elements that match the [locator selector](/docs/en/writing-runnin
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | [github.com](https://github.com/admc/wd/blob/master/lib/commands.js#L798) |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/gems/selenium-webdriver/Selenium/WebDriver/SearchContext:find_elements) |
|[PHP](https://github.com/appium/php-client/releases/latest)| All | [github.com](https://github.com/appium/php-client/) |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| All | [github.com](https://github.com/appium/appium-dotnet-driver/blob/master/src/Appium.Net/Appium/AppiumWebElement.cs) |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/element/find-elements.yml)
+1 -8
View File
@@ -37,12 +37,6 @@ switch_to.active_element
```
```php
# PHP
// TODO PHP example
```
```csharp
// C#
IWebElement currentElement = driver.SwitchTo().ActiveElement();
@@ -77,7 +71,6 @@ IWebElement currentElement = driver.SwitchTo().ActiveElement();
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | [github.com](https://github.com/admc/wd/blob/master/lib/commands.js#L1934) |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/gems/selenium-webdriver/0.0.28/Selenium/WebDriver/TargetLocator#active_element-instance_method) |
|[PHP](https://github.com/appium/php-client/releases/latest)| All | [github.com](https://github.com/appium/php-client/) |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| All | [github.com](https://github.com/SeleniumHQ/selenium/blob/master/dotnet/src/webdriver/Remote/RemoteTargetLocator.cs) |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/element/other/active.yml)
@@ -86,7 +79,7 @@ IWebElement currentElement = driver.SwitchTo().ActiveElement();
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/element/other/active.yml)
### Endpoint
`POST /session/:session_id/element/active`
`'GET'(W3C), 'POST'(JSONWP) /session/:session_id/element/active`
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/element/other/active.yml)
### URL Parameters
@@ -48,12 +48,6 @@ element1 == element2
```
```php
# PHP
// TODO PHP sample
```
```csharp
// C#
var elementOne = driver.FindElementByClassName("SomeClassName");
@@ -90,7 +84,6 @@ bool isEqual = elementOne.Equals(elementTwo);
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | [github.com](https://github.com/admc/wd/blob/master/lib/commands.js#L1463) |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/gems/selenium-webdriver/0.0.28/Selenium/WebDriver/Element#==-instance_method) |
|[PHP](https://github.com/appium/php-client/releases/latest)| All | [github.com](https://github.com/appium/php-client/) |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| All | [github.com](https://github.com/SeleniumHQ/selenium/blob/master/dotnet/src/webdriver/Remote/RemoteWebElement.cs) |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/element/other/equals-element.yml)
-7
View File
@@ -43,12 +43,6 @@ element.submit element
```
```php
# PHP
// TODO PHP sample
```
```csharp
// C#
var element = driver.FindElementByClassName("SomeClassName");
@@ -89,7 +83,6 @@ The submit command may also be applied to any element that is a descendant of a
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | [github.com](https://github.com/admc/wd/blob/master/lib/commands.js#L1741) |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/gems/selenium-webdriver/0.0.28/Selenium/WebDriver/Element#submit-instance_method) |
|[PHP](https://github.com/appium/php-client/releases/latest)| All | [github.com](https://github.com/appium/php-client/) |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| All | [github.com](https://github.com/SeleniumHQ/selenium/blob/master/dotnet/src/webdriver/Remote/RemoteWebElement.cs) |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/element/other/submit.yml)
-7
View File
@@ -39,12 +39,6 @@ await driver.status();
```
```php
# PHP
// PHP Code here
```
```csharp
// C#
driver.FindElementById("elementId").Click();
@@ -82,7 +76,6 @@ An indepth description of what this command does
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| None | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| None | [github.com](https://github.com/admc/wd/releases) |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [github.com](https://github.com/appium/ruby_lib/releases/latest) |
|[PHP](https://github.com/appium/php-client/releases/latest)| None | [github.com](https://github.com/appium/php-client/releases/latest) |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| None | [github.com](https://github.com/appium/appium) |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/example.yml)
-7
View File
@@ -146,12 +146,6 @@ f2.create_pointer_up(:left)
```
```php
# PHP
// TODO
```
```csharp
// C#
var inputDevice = new PointerInputDevice(PointerKind.Touch);
@@ -204,7 +198,6 @@ is the 0-indexed action, the second 'tick' is the 1-indexed action, etc.... All
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/gems/selenium-webdriver/Selenium/WebDriver/W3CActionBuilder) |
|[PHP](https://github.com/appium/php-client/releases/latest)| All | [github.com](https://github.com/jupeter/selenium-php-webdriver/blob/master/Webdriver/Common/ActionChains.php) |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| All | [github.com](https://github.com/appium/appium-dotnet-driver/) |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/interactions/actions.yml)
@@ -45,12 +45,6 @@ action.move_to(element).click_and_hold.perform
```
```php
# PHP
// TODO PHP sample
```
```csharp
// C#
Actions action = new Actions(driver);
@@ -93,7 +87,6 @@ Note that the next mouse-related command that should follow is buttonup . Any ot
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | [github.com](https://github.com/admc/wd/blob/master/lib/commands.js#L1625) |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/gems/selenium-webdriver/Selenium/WebDriver/ActionBuilder:click_and_hold) |
|[PHP](https://github.com/appium/php-client/releases/latest)| All | [github.com](https://github.com/appium/php-client/) |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| All | [github.com](https://github.com/SeleniumHQ/selenium/blob/master/dotnet/src/webdriver/Interactions/Actions.cs) |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/interactions/mouse/button-down.yml)
@@ -53,12 +53,6 @@ action.click_and_hold(el).move_to(el, 10, 10).release.perform
```
```php
# PHP
// TODO PHP sample
```
```csharp
// C#
Actions action = new Actions(driver);
@@ -103,7 +97,6 @@ Must be called once for every buttondown command issued. See the note in click a
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | [github.com](https://github.com/admc/wd/blob/master/lib/commands.js#L1645) |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/gems/selenium-webdriver/Selenium/WebDriver/ActionBuilder:release) |
|[PHP](https://github.com/appium/php-client/releases/latest)| All | [github.com](https://github.com/appium/php-client/) |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| All | [github.com](https://github.com/SeleniumHQ/selenium/blob/master/dotnet/src/webdriver/Interactions/Actions.cs) |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/interactions/mouse/button-up.yml)
@@ -44,12 +44,6 @@ action.move_to(element).click.perform
```
```php
# PHP
// TODO PHP sample
```
```csharp
// C#
Actions action = new Actions(driver);
@@ -87,7 +81,6 @@ action.Perform();
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | [github.com](https://github.com/admc/wd/blob/master/lib/commands.js#L1665) |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/gems/selenium-webdriver/Selenium/WebDriver/Mouse:click) |
|[PHP](https://github.com/appium/php-client/releases/latest)| All | [github.com](https://github.com/appium/php-client/) |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| All | [github.com](https://github.com/appium/appium-dotnet-driver/) |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/interactions/mouse/click.yml)
@@ -44,12 +44,6 @@ action.move_to(element).double_click.perform
```
```php
# PHP
// TODO PHP sample
```
```csharp
// C#
Actions action = new Actions(driver);
@@ -87,7 +81,6 @@ action.Perform();
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | [github.com](https://github.com/admc/wd/blob/master/lib/commands.js#L1686) |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/gems/selenium-webdriver/Selenium/WebDriver/ActionBuilder:double_click) |
|[PHP](https://github.com/appium/php-client/releases/latest)| All | [github.com](https://github.com/appium/php-client/) |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| All | [github.com](https://github.com/SeleniumHQ/selenium/blob/master/dotnet/src/webdriver/Interactions/Actions.cs) |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/interactions/mouse/doubleclick.yml)
@@ -43,12 +43,6 @@ mouse.move_to(element, 5, 5)
```
```php
# PHP
// TODO PHP sample
```
```csharp
// C#
Actions action = new Actions(driver);
@@ -90,7 +84,6 @@ If no element is specified, the move is relative to the current mouse cursor. If
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | [github.com](https://github.com/admc/wd/blob/master/lib/commands.js#L1600) |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/gems/selenium-webdriver/Selenium/WebDriver/Mouse:move_to) |
|[PHP](https://github.com/appium/php-client/releases/latest)| All | [github.com](https://github.com/appium/php-client/) |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| All | [github.com](https://github.com/appium/appium-dotnet-driver/) |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/interactions/mouse/moveto.yml)
@@ -48,12 +48,6 @@ touch_action.double_tap(element).perform
```
```php
# PHP
// TODO PHP sample
```
```csharp
// C#
TouchActions action = new TouchActions(driver);
@@ -90,7 +84,6 @@ action.Perform();
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | [github.com](https://github.com/admc/wd/blob/master/lib/commands.js#L425) |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/gems/selenium-webdriver/Selenium%2FWebDriver%2FTouchActionBuilder:double_tap) |
|[PHP](https://github.com/appium/php-client/releases/latest)| All | [github.com](https://github.com/appium/php-client/) |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| All | [github.com](https://github.com/SeleniumHQ/selenium/blob/master/dotnet/src/webdriver/Interactions/TouchActions.cs) |
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/interactions/touch/double-tap.yml)

Some files were not shown because too many files have changed in this diff Show More