Compare commits

...
Author SHA1 Message Date
Jonathan Lipps bd6e3ac0b0 chore: publish
- appium@2.2.1
 - @appium/base-driver@9.4.1
 - @appium/base-plugin@2.2.22
 - @appium/doctor@2.0.27
 - @appium/docutils@0.4.11
 - @appium/driver-test-support@0.4.16
 - @appium/execute-driver-plugin@3.0.19
 - @appium/fake-driver@5.2.10
 - @appium/fake-plugin@3.1.26
 - @appium/images-plugin@2.1.6
 - @appium/opencv@2.1.5
 - @appium/plugin-test-support@0.3.23
 - @appium/schema@0.4.1
 - @appium/support@4.1.8
 - @appium/test-support@3.0.26
 - @appium/types@0.14.1
 - @appium/universal-xml-plugin@1.0.14
2023-10-19 10:05:33 -07:00
Mykola Mokhnach de39013ae5 fix(appium): Make sure type definitions are always in sync across modules (#19323) 2023-10-19 17:22:38 +02:00
renovate[bot] 408885a5b2 fix(doctor): update dependency appium-adb to v11 (#19321)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-19 12:52:57 +02:00
renovate[bot] aaa7668ae6 fix(test-support): update dependency sinon to v16.1.3 2023-10-19 09:20:24 +00:00
renovate[bot] a306ce741a fix(support): update definitelytyped 2023-10-18 21:08:27 +00:00
Jonathan Lipps 475198e36b chore: publish
- appium@2.2.0
 - @appium/base-driver@9.4.0
 - @appium/base-plugin@2.2.21
 - @appium/doctor@2.0.26
 - @appium/docutils@0.4.10
 - @appium/driver-test-support@0.4.15
 - @appium/eslint-config-appium@8.0.5
 - @appium/eslint-config-appium-ts@0.3.2
 - @appium/execute-driver-plugin@3.0.18
 - @appium/fake-driver@5.2.9
 - @appium/fake-plugin@3.1.25
 - @appium/images-plugin@2.1.5
 - @appium/opencv@2.1.4
 - @appium/plugin-test-support@0.3.22
 - @appium/schema@0.4.0
 - @appium/support@4.1.7
 - @appium/test-support@3.0.25
 - @appium/tsconfig@0.3.2
 - @appium/types@0.14.0
 - @appium/universal-xml-plugin@1.0.13
2023-10-18 13:35:18 -07:00
Jonathan Lipps 821b4c4ef4 chore: downgrade conventional-changelog-conventionalcommits for lerna compatibility reasons 2023-10-18 13:33:48 -07:00
Jonathan Lipps e6da6b8dbc chore: remove erroneous extra level in lerna config 2023-10-18 13:24:10 -07:00
renovate[bot] ef3165f572 chore(deps): update dependency lerna to v7.4.1 2023-10-18 15:30:51 +00:00
renovate[bot] a3fbbda5fb chore(deps): update dependency lint-staged to v15 (#19303)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-17 16:07:35 +02:00
renovate[bot] 33156712b1 fix(doctor): update dependency appium-adb to v10 (#19308)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-17 16:07:14 +02:00
renovate[bot] 0d8ea1bbbb chore(docutils): update dependency mkdocs-material-extensions to v1.3 2023-10-17 09:37:53 +00:00
renovate[bot] 1a12f54fd8 chore(deps): update eslint-related packages to v6.8.0 2023-10-17 06:21:01 +00:00
Mykola Mokhnach 98f21f1ebc docs(doctor): Update the link to applesimutils (#19305) 2023-10-17 07:33:05 +02:00
renovate[bot] 932da4544e chore(deps): update commitlint monorepo to v17.8.0 2023-10-15 16:52:35 +00:00
renovate[bot] caf600bffd fix(docutils): update dependency yaml to v2.3.3 2023-10-14 16:16:26 +00:00
renovate[bot] d884f086b3 chore(docutils): update dependency mkdocs-material to v9.4.6 2023-10-14 13:54:03 +00:00
renovate[bot] ca3e5d90e4 fix(support): update dependency teen_process to v2.0.50 2023-10-14 10:42:43 +00:00
renovate[bot] 6afaa0f9bc chore(deps): update definitelytyped 2023-10-13 10:02:42 +00:00
renovate[bot] 6e21ea79d4 chore(deps): update dependency midnight-smoker to v7.0.4 2023-10-12 10:16:31 +00:00
renovate[bot] 96b0a44629 fix(types): update definitelytyped 2023-10-11 15:13:06 +00:00
renovate[bot] eebc651f31 fix(support): update dependency teen_process to v2.0.48 2023-10-11 13:53:40 +00:00
renovate[bot] 4a9aedd32d chore(deps): update dependency lerna to v7.3.1 2023-10-11 10:36:41 +00:00
renovate[bot] f52a23c686 fix(execute-driver-plugin): update dependency webdriverio to v8.17.0 (#19277)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-10 21:32:32 +02:00
renovate[bot] d2a9a99418 fix(opencv): update definitelytyped 2023-10-10 16:29:41 +00:00
renovate[bot] 2b59c135d7 chore(docutils): update dependency mkdocs-material to v9.4.5 2023-10-10 12:31:42 +00:00
renovate[bot] 73746879ef chore(deps): update eslint-related packages to v6.7.5 2023-10-10 09:05:47 +00:00
renovate[bot] 0220a9f8e9 fix(doctor): update dependency appium-adb to v9.14.12 2023-10-09 11:13:38 +00:00
renovate[bot] f697cda9af fix(appium): update dependency winston to v3.11.0 2023-10-08 10:13:47 +00:00
renovate[bot] ea731bf117 fix(support): update dependency teen_process to v2.0.45 2023-10-07 19:33:17 +00:00
renovate[bot] 20a10b3297 chore(deps): update dependency eslint to v8.51.0 2023-10-07 15:57:30 +00:00
renovate[bot] 8c7225d4e9 fix(execute-driver-plugin): update dependency webdriverio to v8.16.22 2023-10-07 13:12:31 +00:00
renovate[bot] fa332502c5 chore(deps): update definitelytyped 2023-10-07 09:59:13 +00:00
renovate[bot] 126daeca4e fix(test-support): update dependency sinon to v16.1.0 2023-10-06 15:20:50 +00:00
renovate[bot] e2a670e1c4 fix(support): update dependency teen_process to v2.0.42 2023-10-06 14:19:45 +00:00
renovate[bot] 51c3ebeaba chore(docutils): update dependency mkdocs-material to v9.4.4 2023-10-06 10:00:38 +00:00
renovate[bot] 1a34396339 fix(support): update dependency teen_process to v2.0.41 2023-10-05 09:13:22 +00:00
renovate[bot] 11926d4d39 fix(execute-driver-plugin): update dependency webdriverio to v8.16.20 2023-10-04 09:25:33 +00:00
renovate[bot] 2837bcdeb1 fix(support): update dependency teen_process to v2.0.40 2023-10-03 17:18:56 +00:00
renovate[bot] c013d78572 fix(universal-xml-plugin): update dependency fast-xml-parser to v4.3.2 2023-10-03 15:09:05 +00:00
renovate[bot] 45a9c52ece chore(deps): update eslint-related packages to v6.7.4 2023-10-03 12:55:28 +00:00
renovate[bot] 64ff478786 chore(deps): update definitelytyped 2023-10-03 10:44:56 +00:00
renovate[bot] a7a4a29100 chore(docutils): update dependency mkdocs-material to v9.4.3 2023-10-02 12:36:49 +00:00
renovate[bot] 5d172a58bd fix(execute-driver-plugin): update dependency webdriverio to v8.16.18 2023-10-02 10:42:09 +00:00
renovate[bot] 009bbee47a chore(deps): update dependency eslint-plugin-mocha to v10.2.0 2023-10-01 13:03:23 +00:00
renovate[bot] a32dc11101 fix(support): update dependency teen_process to v2.0.38 2023-10-01 09:35:03 +00:00
renovate[bot] f3614adbde fix(execute-driver-plugin): update dependency webdriverio to v8.16.17 2023-09-30 16:12:47 +00:00
renovate[bot] 49c2f31885 chore(deps): update dependency @commitlint/cli to v17.7.2 2023-09-30 13:12:01 +00:00
renovate[bot] 1c808e9261 chore(deps): update definitelytyped 2023-09-30 09:43:53 +00:00
renovate[bot] 6d894bef6f fix(support): update dependency teen_process to v2.0.37 2023-09-28 21:22:30 +00:00
renovate[bot] 7a06ec5041 fix(driver-test-support): update dependency chai to v4.3.10 2023-09-28 18:23:27 +00:00
renovate[bot] 2d7eed7d81 chore(deps): update dependency @types/node to v18.18.0 2023-09-28 15:01:01 +00:00
renovate[bot] 5e095893ee fix(base-driver): update definitelytyped 2023-09-28 09:04:20 +00:00
Michael 7445db2279 test(universal-xml-plugin): fix getPageSource typo (#19219) 2023-09-27 19:00:29 -07:00
renovate[bot] c28fcefa72 fix(support): update dependency teen_process to v2.0.34 (#19218)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-27 11:59:00 +02:00
renovate[bot] d336b51578 fix(support): update dependency glob to v10 (#19185)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-27 11:58:46 +02:00
renovate[bot] c6af787011 chore(deps): update dependency rimraf to v5.0.5 (#19216)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-27 11:58:26 +02:00
renovate[bot] 3df047d128 fix(support): update dependency axios to v1.5.1 (#19217)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-27 11:58:13 +02:00
Mykola Mokhnach 805f69de35 fix(appium): Fix creation of logging prefixes (#19212) 2023-09-27 11:57:57 +02:00
renovate[bot] c0b6a5afe3 chore(deps): update dependency midnight-smoker to v7.0.3 2023-09-27 09:18:25 +00:00
renovate[bot] 3b44c7d8f5 fix(support): update definitelytyped 2023-09-26 22:11:10 +00:00
renovate[bot] 2281e11028 fix(execute-driver-plugin): update dependency webdriverio to v8.16.15 2023-09-26 18:29:44 +00:00
renovate[bot] 5770cc0d3e chore(deps): update eslint-related packages to v6.7.3 2023-09-26 15:12:59 +00:00
renovate[bot] 5ad76bdb2b chore(deps): update dependency rimraf to v5.0.4 2023-09-26 11:22:31 +00:00
renovate[bot] 7cdb1429a1 fix(support): update dependency teen_process to v2.0.30 2023-09-25 17:09:00 +00:00
renovate[bot] 15a128d4dd chore(docutils): update dependency mkdocs-material to v9.4.2 2023-09-25 13:34:41 +00:00
renovate[bot] 52fb78411b chore(deps): update dependency @types/yargs to v17.0.25 2023-09-25 10:54:36 +00:00
renovate[bot] 05faca8045 chore(deps): update dependency eslint to v8.50.0 2023-09-24 18:47:44 +00:00
renovate[bot] a662b7d90e fix(universal-xml-plugin): update dependency fast-xml-parser to v4.3.1 2023-09-24 17:04:12 +00:00
renovate[bot] 26a6c62512 fix(support): update dependency @types/pluralize to v0.0.31 2023-09-24 13:27:56 +00:00
renovate[bot] 03b2aa6b6e fix(support): update dependency teen_process to v2.0.27 2023-09-24 10:17:14 +00:00
renovate[bot] 595d460ac8 fix(support): update definitelytyped 2023-09-24 00:27:11 +00:00
renovate[bot] 34603c8852 chore(docutils): update dependency mkdocs-material to v9.4.1 2023-09-23 16:30:00 +00:00
renovate[bot] 57daa4114a chore(deps): update dependency eslint-import-resolver-typescript to v3.6.1 2023-09-23 13:01:48 +00:00
renovate[bot] 2d3c1d797d chore(workflows): update actions/checkout digest to 8ade135 2023-09-23 09:28:02 +00:00
renovate[bot] 78f33aee09 chore(docutils): update dependency mkdocs-material to v9.4.0 2023-09-22 12:25:00 +00:00
renovate[bot] 34d978e850 fix(execute-driver-plugin): update dependency webdriverio to v8.16.12 2023-09-22 09:06:20 +00:00
renovate[bot] 8c9cce09c8 fix(universal-xml-plugin): update dependency fast-xml-parser to v4.3.0 2023-09-21 15:54:11 +00:00
renovate[bot] 331171dd8c fix(base-driver): update dependency http-status-codes to v2.3.0 2023-09-21 12:06:33 +00:00
renovate[bot] 19954c4b13 chore(docutils): update dependency mkdocs-material-extensions to v1.2 2023-09-21 09:37:30 +00:00
renovate[bot] bc72c6676a fix(support): update dependency teen_process to v2.0.24 2023-09-20 21:41:59 +00:00
renovate[bot] cef37d3ee3 fix(execute-driver-plugin): update dependency webdriverio to v8.16.11 2023-09-20 19:01:57 +00:00
renovate[bot] d3c7bfeb3a chore(deps): update dependency @types/node to v18.17.18 2023-09-20 15:29:46 +00:00
renovate[bot] 91e34d7153 chore(deps): update dependency ws to v8.14.2 2023-09-20 14:00:02 +00:00
Chris Sawer 1d8d2b0e1a docs: Use load_capabilities to fix for Appium-Python-Client 3.0.0 (#19177) 2023-09-20 12:28:32 +02:00
renovate[bot] 23cba266f2 chore(support): update dependency sharp to v0.32.6 2023-09-19 19:56:24 +00:00
renovate[bot] 3f807e5585 chore(docutils): update dependency mkdocs-material to v9.3.2 2023-09-19 16:06:45 +00:00
renovate[bot] 5862a73fe5 chore(docutils): update dependency mkdocs to v1.5.3 2023-09-19 14:56:44 +00:00
renovate[bot] 8e5704625d chore(deps): update eslint-related packages to v6.7.2 2023-09-19 11:27:11 +00:00
renovate[bot] 1b0459edd6 fix(support): update dependency teen_process to v2.0.23 2023-09-16 19:56:31 +00:00
renovate[bot] b6a76ce91e fix(support): update definitelytyped 2023-09-16 13:25:08 +00:00
renovate[bot] 48be0f83b0 fix(execute-driver-plugin): update dependency webdriverio to v8.16.10 2023-09-16 10:40:39 +00:00
Mykola Mokhnach de02ed87fc fix: Use pathToRegexp to match websocket endpoints (#19162) 2023-09-15 19:09:10 +02:00
renovate[bot] 8dcdab323a chore(workflows): update actions/checkout action to v4 (#19121)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-15 17:03:30 +02:00
renovate[bot] 49b3434c2b fix(test-support): update dependency sinon to v16 (#19161)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-15 17:03:15 +02:00
renovate[bot] 2ef40febdc fix(support): update dependency teen_process to v2.0.19 2023-09-15 13:38:11 +00:00
renovate[bot] 396f671f99 chore(deps): update dependency @types/node to v18.17.16 2023-09-15 11:08:22 +00:00
renovate[bot] c63a37b905 chore(deps): update dependency lerna to v7.3.0 2023-09-14 21:49:47 +00:00
renovate[bot] 3e7360021d fix(support): update definitelytyped 2023-09-14 20:28:49 +00:00
renovate[bot] c81e99fd80 fix(doctor): update dependency appium-adb to v9.14.11 2023-09-14 15:27:04 +00:00
renovate[bot] 4b09c323d9 fix(execute-driver-plugin): update dependency webdriverio to v8.16.7 2023-09-14 09:50:07 +00:00
renovate[bot] d2f19aab93 fix(support): update dependency @types/teen_process to v2.0.1 2023-09-13 08:27:44 +00:00
renovate[bot] 73aa01786d fix(support): update dependency uuid to v9.0.1 2023-09-12 17:47:34 +00:00
renovate[bot] 809b2daea5 fix(doctor): update dependency appium-adb to v9.14.10 2023-09-12 14:16:14 +00:00
renovate[bot] ff404a09b7 chore(docutils): update dependency mkdocs-material to v9.3.1 2023-09-12 10:18:41 +00:00
renovate[bot] 5b063e4488 chore(deps): update eslint-related packages to v6.7.0 2023-09-12 06:06:21 +00:00
renovate[bot] 3fc87ac669 chore(deps): update dependency eslint to v8.49.0 2023-09-11 15:19:32 +00:00
renovate[bot] ffeebc74b7 fix(support): update dependency teen_process to v2.0.18 2023-09-11 12:12:22 +00:00
renovate[bot] a0c4b84fb7 fix(support): update dependency teen_process to v2.0.13 2023-09-10 12:58:41 +00:00
renovate[bot] 7625218c22 fix(execute-driver-plugin): update dependency webdriverio to v8.16.6 2023-09-10 10:23:24 +00:00
renovate[bot] 8de343d37d chore(deps): update dependency ws to v8.14.1 2023-09-09 20:24:51 +00:00
renovate[bot] 49f16a0949 chore(deps): update dependency conventional-changelog-conventionalcommits to v7.0.2 2023-09-09 15:03:13 +00:00
renovate[bot] 31408cc70a chore(deps): update dependency midnight-smoker to v7.0.2 2023-09-09 14:25:00 +00:00
renovate[bot] ee4dea6928 chore(deps): update dependency @types/node to v18.17.15 2023-09-09 10:00:48 +00:00
renovate[bot] 862225c1d8 fix(execute-driver-plugin): update dependency webdriverio to v8.16.5 2023-09-08 11:33:03 +00:00
Mykola Mokhnach 5926919177 feat(base-driver): Add server support of TLS and SPDY protocols (#19105) 2023-09-08 08:02:56 +02:00
renovate[bot] c87596bb64 chore(deps): update dependency ws to v8.14.0 2023-09-07 11:29:08 +00:00
renovate[bot] 84fefd214c fix(driver-test-support): update dependency @types/lodash to v4.14.198 2023-09-06 11:10:18 +00:00
renovate[bot] 5ec3199259 chore(deps): update eslint-related packages to v6.6.0 2023-09-05 21:45:38 +00:00
renovate[bot] fea8f8537d fix(execute-driver-plugin): update dependency webdriverio to v8.16.4 2023-09-05 18:31:45 +00:00
renovate[bot] 4916bde811 chore(docutils): update dependency mkdocs-material to v9.2.8 2023-09-05 12:45:43 +00:00
renovate[bot] 2714ed0b69 chore(deps): update definitelytyped 2023-09-05 10:30:08 +00:00
renovate[bot] 263bb43086 fix(support): update dependency archiver to v6.0.1 (#19111)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-04 13:03:40 +02:00
renovate[bot] d1a4932409 fix(execute-driver-plugin): update dependency webdriverio to v8.16.3 2023-09-04 09:08:53 +00:00
renovate[bot] 2d3c5cd0b7 fix(execute-driver-plugin): update dependency webdriverio to v8.16.2 2023-09-03 17:05:47 +00:00
renovate[bot] a303378231 chore(docutils): update dependency mkdocs-material to v9.2.7 2023-09-03 12:55:56 +00:00
renovate[bot] 8d9ab88939 chore(deps): update dependency @types/node to v18.17.14 2023-09-03 11:06:57 +00:00
renovate[bot] 207700bc82 fix(execute-driver-plugin): update dependency webdriverio to v8.16.0 2023-09-02 18:27:49 +00:00
renovate[bot] 4950772846 chore(deps): update dependency tsd to v0.29.0 2023-09-02 17:23:57 +00:00
renovate[bot] d311efebfb chore(docutils): update dependency mkdocs-material to v9.2.6 2023-09-02 12:47:02 +00:00
renovate[bot] 3882ca9e92 chore(deps): update dependency @types/node to v18.17.13 2023-09-02 10:44:44 +00:00
Mykola Mokhnach e51d260395 tests: Remove forceful npm update 2023-09-02 08:45:24 +02:00
renovate[bot] 3ec80856e7 chore(deps): update dependency midnight-smoker to v7 (#19091)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-31 12:17:32 -07:00
renovate[bot]andJonathan Lipps 65b3787912 fix(tsconfig): update dependency @tsconfig/node14 to v14 (#19082)
* fix(tsconfig): update dependency @tsconfig/node14 to v14

* chore(execute-driver-plugin): use old node module resolution for wdio import

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jonathan Lipps <jlipps@gmail.com>
2023-08-31 12:17:08 -07:00
Mykola Mokhnach 7722767d80 chore(base-driver): Tune the log message for non-recognised capabilities (#19098) 2023-08-31 20:46:14 +02:00
renovate[bot] 6f51456da9 fix(support): update dependency which to v4 (#19095)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-31 19:21:27 +02:00
renovate[bot] 14631177cd chore(deps): update dependency conventional-changelog-conventionalcommits to v7 (#19074)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-31 12:25:15 +02:00
renovate[bot] faca49690a fix(support): update dependency glob to v10 (#19094)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-31 12:23:29 +02:00
renovate[bot] 81b077fdc9 fix(support): update definitelytyped 2023-08-31 09:53:13 +00:00
renovate[bot] 5a922ea716 chore(deps): update dependency lerna to v7.2.0 2023-08-30 20:17:42 +00:00
renovate[bot] c5d6df7a00 fix(support): update dependency teen_process to v2.0.12 2023-08-30 16:44:34 +00:00
renovate[bot] 545576a740 fix(execute-driver-plugin): update dependency webdriverio to v8.15.10 2023-08-30 12:09:02 +00:00
renovate[bot] 1377c0290f chore(deps): update dependency prettier to v3.0.3 2023-08-30 10:19:46 +00:00
renovate[bot] 737e5e9c38 chore(deps): update eslint-related packages to v6.5.0 2023-08-29 19:12:32 +00:00
renovate[bot] a0f59d0594 fix(support): update dependency @types/semver to v7.5.1 2023-08-29 17:22:42 +00:00
renovate[bot] 1a3d408e23 fix(docutils): update dependency yaml to v2.3.2 2023-08-29 14:46:19 +00:00
renovate[bot] 8819d3ef92 chore(deps): update dependency json-schema-to-typescript to v13.1.1 2023-08-29 09:28:49 +00:00
renovate[bot] 9f700bfdf9 fix(doctor): update dependency appium-adb to v9.14.9 2023-08-29 07:12:38 +00:00
renovate[bot] bc1b56a3c1 fix(support): update dependency teen_process to v2.0.10 2023-08-28 15:58:48 +00:00
renovate[bot] de68a1f388 chore(docutils): update dependency mkdocs-material to v9.2.5 2023-08-28 12:37:47 +00:00
renovate[bot] 66fb651a18 chore(deps): update dependency @types/node to v18.17.12 2023-08-28 10:38:57 +00:00
renovate[bot] 08913cddde fix(support): update dependency axios to v1.5.0 2023-08-27 18:56:03 +00:00
renovate[bot] b0b68334c5 chore(deps): update dependency json-schema-to-typescript to v13.1.0 2023-08-27 16:06:29 +00:00
renovate[bot] 427bc8eb0c fix(execute-driver-plugin): update dependency webdriverio to v8.15.9 2023-08-27 12:50:55 +00:00
renovate[bot] 7cc0c47679 chore(docutils): update dependency mkdocs-material to v9.2.4 2023-08-27 10:45:22 +00:00
renovate[bot] fe7ed5d91f chore(deps): update dependency eslint to v8.48.0 2023-08-26 17:14:37 +00:00
renovate[bot] 6c7f3ef670 fix(support): update dependency teen_process to v2.0.9 2023-08-26 12:21:18 +00:00
renovate[bot] b510fad303 fix(execute-driver-plugin): update dependency webdriverio to v8.15.8 2023-08-26 10:35:46 +00:00
renovate[bot] 89595c3915 chore(deps): update dependency midnight-smoker to v6 (#19046)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-25 13:56:28 -07:00
renovate[bot]andMykola Mokhnach 827ec98a8a chore(eslint-config-appium-ts): update eslint-related packages (major) (#19048)
* chore(eslint-config-appium-ts): update eslint-related packages

* chore(eslint-config-appium-ts): update eslint-related packages

* Tune the config

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Mykola Mokhnach <mokhnach@gmail.com>
2023-08-25 19:07:15 +02:00
renovate[bot]andMykola Mokhnach 641da6ddd5 chore(deps): update dependency lerna to v7 (#19019)
* chore(deps): update dependency lerna to v7

* update lerna config

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Mykola Mokhnach <mokhnach@gmail.com>
2023-08-25 18:33:44 +02:00
renovate[bot] d85b2161b5 fix(driver-test-support): update dependency chai to v4.3.8 (#19059)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-25 16:31:29 +02:00
renovate[bot] f8039a70ca fix(doctor): update dependency appium-adb to v9.14.7 (#19058)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-25 16:31:11 +02:00
renovate[bot] ae59d0b218 chore(deps): update dependency @types/node to v18.17.11 2023-08-25 12:51:42 +00:00
renovate[bot] 8599c2a0b3 chore(workflows): update actions/checkout digest to f43a0e5 2023-08-25 11:14:46 +00:00
renovate[bot] 72a806bec7 fix(images-plugin): update dependency lru-cache to v10 (#19050) 2023-08-25 10:42:28 +02:00
renovate[bot] a3245dcf2b fix(support): update dependency archiver to v6 (#19051)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-24 14:57:01 +02:00
renovate[bot] 73b092ba11 chore(deps): update dependency prettier to v3 (#19047)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-24 14:56:31 +02:00
renovate[bot] f1d1b7d6a0 chore(deps): update dependency @types/node to v18.17.9 2023-08-24 06:15:40 +00:00
renovate[bot] d21b9e6a90 chore(deps): update dependency lint-staged to v14 (#19029)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-24 07:37:54 +02:00
renovate[bot] 0830fd8257 fix(execute-driver-plugin): update dependency webdriverio to v8.15.6 2023-08-23 18:18:04 +00:00
Jonathan Lipps a01a91d737 chore: publish
- appium@2.1.3
 - @appium/base-driver@9.3.20
 - @appium/base-plugin@2.2.20
 - @appium/docutils@0.4.9
 - @appium/fake-plugin@3.1.24
2023-08-23 10:47:19 -07:00
renovate[bot] 210b468a92 chore(deps): update dependency midnight-smoker to v5 (#19042)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-23 19:23:28 +02:00
Mykola Mokhnach 315a5e6cc7 fix(base-driver): Avoid RangeError while caching the response data (#19043) 2023-08-23 19:20:55 +02:00
Kazuaki Matsuo 4851721295 chore: use the same typescript version in docutils (#19036) 2023-08-23 14:30:21 +02:00
hijack-x abcf0d451f fix(base-driver): fix the LRUCache.dispose callback param order (#19037) 2023-08-23 14:12:24 +02:00
renovate[bot] 5aae2190bf chore(docutils): update dependency mkdocs-material to v9.2.3 2023-08-23 11:40:34 +00:00
renovate[bot] eabcbfbff7 chore(deps): update definitelytyped 2023-08-23 07:30:40 +00:00
Jonathan Lipps 524447ee05 chore: publish
- appium@2.1.2
 - @appium/base-driver@9.3.19
 - @appium/base-plugin@2.2.19
 - @appium/doctor@2.0.25
 - @appium/docutils@0.4.8
 - @appium/driver-test-support@0.4.14
 - @appium/execute-driver-plugin@3.0.17
 - @appium/fake-plugin@3.1.23
 - @appium/plugin-test-support@0.3.21
 - @appium/support@4.1.6
 - @appium/test-support@3.0.24
 - @appium/tsconfig@0.3.1
 - @appium/types@0.13.4
 - @appium/universal-xml-plugin@1.0.12
2023-08-22 11:55:13 -07:00
Jonathan Lipps b2560b5c1d fix(universal-xml-plugin): actually export plugin using correct CJS syntax (#19032) 2023-08-22 11:27:31 -07:00
renovate[bot]andJonathan Lipps b608db91a8 fix(execute-driver-plugin): update dependency webdriverio to v8 (#18095)
* fix(execute-driver-plugin): update dependency webdriverio to v8

* fix(execute-driver-plugin): upgrade wdio usage to v8

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jonathan Lipps <jlipps@gmail.com>
2023-08-22 11:26:47 -07:00
renovate[bot] b900c60dac chore(docutils): update dependency mkdocs-material to v9.2.2 2023-08-22 15:16:24 +00:00
renovate[bot] 7e47adf59d chore(deps): update dependency @types/node to v18.17.7 2023-08-22 14:42:21 +00:00
renovate[bot] 4e4eaad6b6 fix(execute-driver-plugin): update dependency webdriverio to v7.32.4 2023-08-22 09:32:19 +00:00
renovate[bot] bc8cd52693 chore(deps): update eslint-related packages 2023-08-21 20:04:37 +00:00
Jonathan Lipps 820428b769 chore: publish
- appium@2.1.1
 - @appium/base-driver@9.3.18
 - @appium/base-plugin@2.2.18
 - @appium/doctor@2.0.24
 - @appium/docutils@0.4.7
 - @appium/driver-test-support@0.4.13
 - @appium/fake-driver@5.2.8
 - @appium/fake-plugin@3.1.22
 - @appium/images-plugin@2.1.4
 - @appium/opencv@2.1.3
 - @appium/support@4.1.5
 - @appium/test-support@3.0.23
 - @appium/universal-xml-plugin@1.0.11
2023-08-21 09:54:56 -07:00
renovate[bot] 034a51b686 chore(deps): update dependency lint-staged to v13.3.0 (#19017)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-21 14:40:32 +02:00
renovate[bot] f2cff24685 fix(universal-xml-plugin): update dependency xpath to v0.0.33 (#18952) 2023-08-21 14:40:14 +02:00
Mykola Mokhnach 53bfc68eee fix(base-driver): Fix possible NPE while cleaning up the state listener (#19020) 2023-08-21 13:56:55 +02:00
renovate[bot] dce45bdf83 chore(deps): update commitlint monorepo 2023-08-21 09:51:28 +00:00
renovate[bot] e73e47de18 fix(support): update dependency archiver to v5.3.2 2023-08-20 18:58:21 +00:00
renovate[bot] a080b72920 fix(driver-test-support): update dependency @types/lodash to v4.14.197 2023-08-20 16:55:18 +00:00
renovate[bot] c8e9059711 chore(support): update dependency sharp to v0.32.5 2023-08-20 12:38:08 +00:00
renovate[bot] d5f3a288c2 fix(doctor): update dependency appium-adb to v9.14.5 2023-08-20 09:37:10 +00:00
renovate[bot] 998e2586a7 chore(deps): update dependency conventional-changelog-conventionalcommits to v6 (#18963)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-19 18:10:15 +02:00
renovate[bot]andMykola Mokhnach 78a22b2a1c chore(deps): update dependency @types/node to v18.17.6 (#18953)
* chore(deps): update dependency @types/node to v18.17.6

* Add ignore

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Mykola Mokhnach <mokhnach@gmail.com>
2023-08-19 18:09:57 +02:00
renovate[bot] a5876c8f26 chore(deps): update dependency eslint-plugin-import to v2.28.1 2023-08-19 13:28:47 +00:00
renovate[bot] 4ef0c49b24 chore(workflows): update actions/setup-node digest to 5e21ff4 2023-08-19 09:04:55 +00:00
renovate[bot] c18b43f2bd chore(deps): update dependency cpy-cli to v5 (#18964)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-19 08:56:39 +02:00
Mykola Mokhnach 2f69e6db2a chore(base-driver): Improve bad parameters error message (#19002) 2023-08-19 08:27:31 +02:00
Mykola Mokhnach ed8e83c76c fix(base-driver): Respect basic auth credentials if provided (#19000) 2023-08-18 18:46:03 +02:00
Jonathan Lipps d6204b6902 chore: publish
- appium@2.1.0
 - @appium/base-driver@9.3.17
 - @appium/base-plugin@2.2.17
 - @appium/doctor@2.0.23
 - @appium/docutils@0.4.6
 - @appium/driver-test-support@0.4.12
 - @appium/execute-driver-plugin@3.0.16
 - @appium/fake-driver@5.2.7
 - @appium/fake-plugin@3.1.21
 - @appium/images-plugin@2.1.3
 - @appium/opencv@2.1.2
 - @appium/plugin-test-support@0.3.20
 - @appium/support@4.1.4
 - @appium/test-support@3.0.22
 - @appium/typedoc-plugin-appium@0.6.6
 - @appium/types@0.13.3
 - @appium/universal-xml-plugin@1.0.10
2023-08-17 13:50:09 -07:00
Jonathan Lipps f0a01aea48 ci: rename publish doc ci script 2023-08-17 13:36:16 -07:00
Jonathan Lipps b64092dc8c ci: add npm install step to publish doc workflow 2023-08-17 13:34:45 -07:00
Jonathan Lipps 6082cb1164 docs(appium): add environment variable docs (#18994) 2023-08-17 11:11:36 -07:00
Jonathan Lipps b88ac49577 test(appium): add test to prove umbrella commands don't circumvent driver command timeouts (#18914) 2023-08-16 14:13:23 -07:00
Jonathan Lipps c933732089 fix(universal-xml-plugin): actually export plugin (#18985) 2023-08-15 08:59:02 +02:00
Dor Blayzer b71340a4ba chore(ci): fix bug report template typo (#18974) 2023-08-10 12:47:26 -07:00
Mykola Mokhnach 5a2611137b fix(appium): Update the GET /status response to be in sync with the standard (#18972) 2023-08-10 20:25:06 +02:00
Mykola Mokhnach aaf58c3de6 feat(base-driver): Make it possible to provide settings as a map in session capabilities (#18970) 2023-08-10 09:29:25 +02:00
renovate[bot] fb34ab9172 fix(types): update dependency type-fest to v3.13.1 2023-08-08 10:18:42 +00:00
renovate[bot] a21ae6ab2b fix(test-support): update dependency sinon to v15.2.0 2023-08-07 15:55:31 +00:00
renovate[bot] 1358937db2 fix(test-support): update dependency @colors/colors to v1.6.0 2023-08-07 13:38:59 +00:00
renovate[bot] f9ba31383a fix(support): update dependency plist to v3.1.0 2023-08-07 10:11:45 +00:00
renovate[bot] b85a92a912 fix(appium): update dependency winston to v3.10.0 2023-08-06 19:29:48 +00:00
renovate[bot] 544aeec149 chore(docutils): update dependency mkdocs-material to v9.1.21 2023-08-06 13:33:44 +00:00
renovate[bot] 97c5d9268a chore(docutils): update dependency mkdocs to v1.5.2 2023-08-06 09:18:53 +00:00
renovate[bot] 3e1eda0193 chore(deps): update eslint-related packages 2023-08-05 13:15:56 +00:00
renovate[bot] a9e86aabc6 fix(doctor): update dependency appium-adb to v9.14.4 (#18844) 2023-08-04 15:15:48 +02:00
renovate[bot] a888e26331 fix(typedoc-plugin-appium): update dependency handlebars to v4.7.8 (#18947)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-04 15:02:12 +02:00
renovate[bot] 12147d518f fix(universal-xml-plugin): update dependency @xmldom/xmldom to v0.8.10 (#18949)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-04 15:01:54 +02:00
renovate[bot] 03ddcdfcaf fix(support): update dependency semver to v7.5.4 2023-08-04 10:07:40 +00:00
fc01fb958a fix(universal-xml-plugin): update dependency fast-xml-parser to v4 (#16781)
* fix(universal-xml-plugin): update dependency fast-xml-parser to v4

* Update typing

* Add more typing

* moar

* chore(universal-xml-plugin): update fast-xml-parser api use

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Mykola Mokhnach <mokhnach@gmail.com>
Co-authored-by: Jonathan Lipps <jlipps@gmail.com>
2023-08-03 13:04:52 -07:00
renovate[bot] 9a5c9ae55c fix(execute-driver-plugin): update dependency webdriverio to v7.32.3 2023-08-03 14:25:10 +00:00
Mykola Mokhnach 2e187804b2 ci: Add needs section 2023-08-03 09:43:36 +02:00
Mykola Mokhnach 6c4189b400 ci: Select Node.js versions dynamically 2023-08-03 09:42:43 +02:00
Mykola Mokhnach 95a34185d1 ci: Disable Windows 2023-08-03 09:39:29 +02:00
renovate[bot] a8cc551210 fix(doctor): update dependency inquirer to v8.2.6 (#18940)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-03 09:32:33 +02:00
renovate[bot] 9ad0dfc3c8 chore(deps): update dependency @types/sinon to v10.0.16 (#18937)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-03 08:56:27 +02:00
renovate[bot] 5f39ae1857 chore(support): update dependency sharp to v0.32.4 (#18918)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-02 22:34:53 +02:00
renovate[bot] aaf31a577c fix(support): update dependency glob to v10 (#18490) 2023-08-02 22:34:34 +02:00
Mykola Mokhnach 97d8f0df44 fix(appium): Fix the plural form 2023-08-01 09:26:29 +02:00
Mykola Mokhnach de5b55ae90 fix(base-driver): Tune responses caching logic (#18922) 2023-08-01 08:09:13 +02:00
Dor Blayzer 5d32946a44 docs(appium): Remove roadmap section (#18929) 2023-07-31 14:21:46 -07:00
Bipin Kumar Chaurasia 93b6a470cd docs(appium): add correct doc path for images comparison and settings (#18916) 2023-07-31 14:14:24 -07:00
Bipin Kumar Chaurasia ead861077a docs(appium): add correct doc path for redirecting potentially insecure features with security.md file (#18911) 2023-07-27 12:50:43 -07:00
renovate[bot] 8ef51855e3 chore(docutils): update dependency mkdocs-material to v9.1.19 2023-07-26 09:31:12 +00:00
renovate[bot] c320e8a1a6 fix(driver-test-support): update definitelytyped 2023-07-26 03:05:58 +00:00
Dor Blayzer f548a8bfed docs(appium): Add update command to appium server (#18903)
* Update README.md

Add update command to appium server

* Review fix
2023-07-25 11:25:36 -07:00
renovate[bot] 0ffafd034b chore(deps): update commitlint monorepo to v17.6.7 2023-07-25 07:25:44 +00:00
renovate[bot] 39e6b234c4 chore(workflows): update actions/setup-node digest to e33196f 2023-07-24 21:13:58 +00:00
Jonathan Lipps ec57ff4c2a chore: publish
- appium@2.0.1
 - @appium/base-driver@9.3.16
 - @appium/base-plugin@2.2.16
 - @appium/doctor@2.0.22
 - @appium/docutils@0.4.5
 - @appium/driver-test-support@0.4.11
 - @appium/execute-driver-plugin@3.0.15
 - @appium/fake-plugin@3.1.20
 - @appium/plugin-test-support@0.3.19
 - @appium/support@4.1.3
 - @appium/test-support@3.0.21
2023-07-24 11:13:17 -07:00
Jonathan Lipps 803660ca29 test(appium): add explicit check in new command timeout test that session list is empty 2023-07-24 10:54:26 -07:00
Jonathan Lipps 41836a4a7b fix(appium): ensure plugin commands reset newCommandTimeout 2023-07-24 10:54:26 -07:00
Mykola Mokhnach ff62e208d9 chore(appium): Improve the error message in case of invalid session capabilities (#18877) 2023-07-15 11:57:38 +02:00
Kazuaki Matsuo 6e752b03de docs(appium): Remove @next (#18876) 2023-07-14 12:27:59 -07:00
Mykola Mokhnach 75650a6b74 fix(base-driver): Use proper cached headers for app download (#18874) 2023-07-14 19:59:12 +02:00
renovate[bot] e5b569c3a0 fix(test-support): update dependency sinon to v15.1.2 2023-07-11 11:34:38 +00:00
renovate[bot] b9151a573b fix(execute-driver-plugin): update dependency webdriverio to v7.32.0 2023-07-11 07:50:54 +00:00
Kazuaki Matsuo 43aedc21e8 ci: add publish-doc.yml (#18857) 2023-07-10 22:24:15 -07:00
Mykola Mokhnach cccd602dc7 docs(appium): Add notes about the server install (#18858) 2023-07-10 10:10:47 +02:00
Jonathan Lipps f1760727bd chore: remove roadmap document (#18856)
Appium 2 is out. Where we're going there are no roads
2023-07-07 14:13:47 -07:00
Christian Bromann 5e479eadbe docs(appium): update JS quickstart example (#18852) 2023-07-06 22:32:14 -07:00
Edgars Eglītis 7cd52db673 docs(appium): update Appium Desktop part in migration guide (#18846) 2023-07-06 12:34:57 -07:00
Mykola Mokhnach 8241e748c7 docs(appium): Update the install guide (#18850) 2023-07-06 19:55:41 +02:00
renovate[bot] 151c19c1c3 fix(support): update dependency teen_process to v2.0.4 2023-07-05 20:22:38 +00:00
Jonathan Lipps 87214fd757 chore(appium): publish appium 2 2023-07-05 08:46:11 -07:00
Jonathan Lipps 3fa73a1d1a chore(appium): remove rc tag from appium 2 2023-07-05 08:39:07 -07:00
Jonathan Lipps 1ab323b525 chore(appium): promote appium npm tag to latest 2023-07-05 08:37:43 -07:00
renovate[bot] b8e1f38455 chore(docutils): update dependency mkdocs-material to v9.1.18 2023-07-05 10:47:29 +00:00
renovate[bot] 02896d0513 chore(deps): update eslint-related packages 2023-07-05 01:54:13 +00:00
Christopher Hiller 8a6a4ba7e7 chore: publish
- appium@2.0.0-rc.5
 - @appium/base-driver@9.3.15
 - @appium/base-plugin@2.2.15
 - @appium/doctor@2.0.21
 - @appium/docutils@0.4.4
 - @appium/driver-test-support@0.4.10
 - @appium/eslint-config-appium@8.0.4
 - @appium/fake-driver@5.2.6
 - @appium/fake-plugin@3.1.19
 - @appium/plugin-test-support@0.3.18
 - @appium/schema@0.3.1
 - @appium/support@4.1.2
 - @appium/test-support@3.0.20
 - @appium/types@0.13.2
2023-07-03 13:18:58 -07:00
Christopher Hiller 52b646c65b chore(typedoc-plugin-appium): update snapshots 2023-07-03 13:10:51 -07:00
Christopher Hiller 2b351705d4 fix(base-driver): pass thru all type args to ExternalDriver
- `core` module is now TS
- `constants` module is now TS
- export missing `W3C_ELEMENT_KEY`
- `JWProxy.command` returns `Promise<unknown>`.  deal with it
- updated some type tests
2023-07-03 13:10:51 -07:00
Christopher Hiller c13333bb97 fix(appium): type fixes for ts v5 2023-07-03 13:10:51 -07:00
Christopher Hiller 62f4244753 fix(types): update some more types to reflect reality
- added a `Protocol` type for some string constants
- `proxyRouteIsAvoided` optionally accepts a `body` arg
- `Core<C>.driverForSession` does not actually return something using type `C`.
- `ExternalDriver` passes thru all type args to `Driver`. this should be non-breaking
- `StringRecord` is more appropriate type for default driver settings
- `Constraints` should be readonly
2023-07-03 13:10:51 -07:00
Christopher Hiller 26eb766a79 chore(base-driver): actually run type tests 2023-07-03 13:10:51 -07:00
Christopher Hiller 679865ed2f fix(eslint-config-appium): remove prototype assignment warning 2023-07-03 13:10:51 -07:00
Christopher Hiller f1d768c62c chore: upgrade typescript
we need to stay at v5.0.x for now
2023-07-03 13:10:51 -07:00
Christopher Hiller d6cca5175c fix(types): separate the type of opts from initialOpts
A thing we know about the `opts` object passed in to a driver constructor is that it does _not_ contain caps.  This value is retained in `this.initialOpts`.  Upon session creation, it _does_ contain caps.

This adds a new type, `InitialOpts`, which is the first parameter to a driver.  In the future, it may accept a type argument, as currently any extension-specific options (defined via schema in `package.json`) are not typed.

Because `DriverOpts` is a superset of `InitialOpts`, this should not be a breaking change.
2023-07-03 13:10:51 -07:00
Christopher Hiller 3d614d6d41 fix(base-driver): allow subclass to define shape of settings object
The mixin approach prevented subclasses of BaseDriver from narrowing the type of `this.settings`.  Now, that's possible.

Also:
- removed an unused type argument from BD constructor
- and did some typedef aliasing
- remove unneeded type assertion from log mixin
2023-07-03 13:10:51 -07:00
Christopher Hiller ee9b2a30de fix(types): ensure return type of deleteSession can always be void
a type aliased to `void` is not the same as returning `void`, apparently.  this might be fixed in newer TS versions
2023-07-03 13:10:51 -07:00
Christopher Hiller e30ad0e88c chore(appium,types): remove some useless type arguments 2023-07-03 13:10:51 -07:00
Christopher Hiller 01061b2919 fix(types,base-driver): remove deviceName from base constraints
This cap was conflicting with constraints defined in subclasses.  Currently, it isn't possible to cleanly "override" constraints.  Given `deviceName` is not used anywhere within base-driver's source, this seems like a decent workaround for now.
2023-07-03 13:10:51 -07:00
Christopher Hiller 24e7aeca7d fix(types): fix signature of updateSettings 2023-07-03 13:10:51 -07:00
renovate[bot] ed1856d720 fix(support): update dependency semver to v7.5.3 2023-07-01 16:31:57 +00:00
renovate[bot] 757fbaaf42 chore(deps): update dependency @types/node to v18.16.19 2023-07-01 12:54:42 +00:00
renovate[bot] fdd2ac098d fix(doctor): update dependency appium-adb to v9.11.7 2023-07-01 10:44:15 +00:00
renovate[bot] 3906f7d1ca chore(docutils): update dependency mkdocs-material to v9.1.17 2023-06-30 22:01:32 +00:00
Christopher Hiller f09fbb64dc fix(appium): restrict address to ipv6/hostname (#18824)
This resolves #18716.

For whatever reason, `json-schema-to-typescript` needed `"type": "string"` in there.  See https://github.com/bcherny/json-schema-to-typescript/issues/528 for further discussion
2023-06-30 13:33:34 -07:00
Mykola Mokhnach 97fe159276 chore(appium): Improve the error message on config load error (#18829) 2023-06-30 20:35:17 +02:00
renovate[bot] cb145875c0 chore(deps): update commitlint monorepo to v17.6.6 2023-06-30 17:38:50 +00:00
renovate[bot] d75338f1c8 chore(deps): update eslint-related packages to v5.59.11 2023-06-30 13:19:49 +00:00
renovate[bot] 67e7140216 chore(deps): update dependency lint-staged to v13.2.3 2023-06-30 11:39:58 +00:00
Christopher Hiller 81256f8f90 chore(types): fix clean command 2023-06-29 17:09:25 -07:00
Christopher Hiller 0bbb25dfb4 chore(base-driver,driver-test-support): do not run basedriver e2e tests in parallel
also: rewrote event timings tests due to it being unclear which assertion actually failed. one assertion per test.
2023-06-29 17:09:25 -07:00
renovate[bot] 5263366744 chore(deps): update dependency json-schema-to-typescript to v13.0.2 2023-06-29 20:56:36 +00:00
Christopher Hiller 4ab2780978 chore: run eslint --fix on ts files before commit 2023-06-29 13:14:37 -07:00
135 changed files with 13988 additions and 9673 deletions
+1 -1
View File
@@ -80,7 +80,7 @@ body:
placeholder: 'https://gist.github.com/...'
- type: textarea
attributes:
label: Futher Information
label: Further Information
description: |
Links? References? Anything that will give us more context about the issue you are encountering!
+17 -15
View File
@@ -42,34 +42,36 @@ permissions:
contents: read
jobs:
prepare_matrix:
runs-on: ubuntu-latest
outputs:
versions: ${{ steps.generate-matrix.outputs.versions }}
steps:
- name: Select 3 most recent LTS versions of Node.js
id: generate-matrix
run: echo "versions=$(curl -s https://endoflife.date/api/nodejs.json | jq -c '[[.[] | select(.lts != false)][:3] | .[].cycle | tonumber]')" >> "$GITHUB_OUTPUT"
test:
needs:
- prepare_matrix
name: Tests
strategy:
matrix:
node-version: [16.x, 18.x, 20.x]
node-version: ${{ fromJSON(needs.prepare_matrix.outputs.versions) }}
os:
- ubuntu-latest
- windows-latest
# TODO: Windows is not stable and slow to run
# - windows-latest
# TODO: Enable below envs after all tests have been verified green
# - macos-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install latest npm (win)
if: ${{ matrix.os == 'windows-latest' }}
# for some reason there's a bug in upgrading npm on win, have to install a specific version first
# https://github.com/actions/setup-node/issues/623
run: |
npm install -g npm@8.3.1
npm install -g npm@latest
- name: Install latest npm (non-win)
if: ${{ matrix.os != 'windows-latest' }}
run: npm install -g npm
- name: Install dependencies
uses: bahmutov/npm-install@1a235c31658a322a3b024444759650ee6345c26d # tag=v1
with:
@@ -82,7 +84,7 @@ jobs:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
- name: Install dependencies
uses: bahmutov/npm-install@1a235c31658a322a3b024444759650ee6345c26d # tag=v1
with:
+1 -1
View File
@@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
- name: Cleanup
run: |
+3 -3
View File
@@ -18,15 +18,15 @@ jobs:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3
with:
node-version: ${{ matrix.node-version }}
- name: Install Appium
run: |
if [[ "$GITHUB_REF_TYPE" == tag ]]; then
npm i -g $GITHUB_REF_NAME
npm i --location=global $GITHUB_REF_NAME
else
npm i -g appium@next
npm i --location=global appium
fi
shell: bash
- name: Install drivers and plugins
+1 -1
View File
@@ -35,7 +35,7 @@ jobs:
name: Docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
- name: Install dependencies (Node.js)
uses: bahmutov/npm-install@1a235c31658a322a3b024444759650ee6345c26d # tag=v1
with:
+1 -1
View File
@@ -11,7 +11,7 @@ jobs:
name: Run FOSSA Analysis
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
with:
ref: master
- name: Install dependencies
+38
View File
@@ -0,0 +1,38 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
name: Publish docs
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
- run: |
git config user.name github-actions
git config user.email github-actions@github.com
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies (Node.js)
uses: bahmutov/npm-install@1a235c31658a322a3b024444759650ee6345c26d # tag=v1
with:
useRollingCache: true
install-command: npm ci
- name: Install dependencies (Python)
run: pip install -r packages/docutils/requirements.txt
- name: Publish docs
run: |
cd packages/appium
npm run publish:docs
+1 -1
View File
@@ -19,7 +19,7 @@ jobs:
name: Check Renovate Configs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
- name: Validate Renovate Config
uses: rinchsan/renovate-config-validator@1ea1e8514f6a33fdd71c40b0a5fa3512b9e7b936 # tag=v0
with:
+1 -2
View File
@@ -1,6 +1,5 @@
module.exports = {
'*.js': ['eslint --fix', 'prettier --write'],
'*.ts': ['prettier --write'],
'*.(js|ts)': ['eslint --fix', 'prettier --write'],
'appium-config-schema.js': () => [
'npm run --workspace=./packages/schema build',
'git add -A packages/schema/lib/appium-config.schema.json',
+12 -12
View File
@@ -16,18 +16,16 @@ See the full list of
[officially-supported](https://appium.io/docs/en/latest/ecosystem/#drivers) and
[third-party](https://appium.io/docs/en/latest/ecosystem/#other-drivers) drivers for more details.
:bangbang: Major documentation revision in progress
:bangbang: The current Appium 2.0 documentation can be found [here](https://appium.io/docs/en/latest/).
:bangbang: Appium core team does not maintain Appium 1.x anymore since the 1st of January 2022. All recent versions of officially supported platform drivers are not compatible to Appium 1.x anymore, and require Appium 2 to run. [Please read the migration guide from 1.x to 2.0](https://appium.io/docs/en/latest/guides/migrating-1-to-2/) to manage the Appium server.
:bangbang: Appium core team does not maintain Appium 1.x anymore since the 1st of January 2022. All recent versions of officially supported platform drivers are not compatible to Appium 1.x, and require Appium 2 to run. [Please read the migration guide from 1.x to 2.0](https://appium.io/docs/en/latest/guides/migrating-1-to-2/) to manage the Appium server.
Appium is in the final stages of a major revision (to version 2.0). As such, the documentation
found around the web may not be correct. The current Appium 2.0 documentation is very much in
progress. Currently, it can be found [here](https://appium.io/docs/en/latest/).
:bangbang: If you still use the deprecated Appium Desktop containing the built-in server then you won't be able to upgrade to Appium 2. Consider switching to [Appium Inspector](https://github.com/appium/appium-inspector) instead.
### Requirements
- macOS, Linux or Windows operating system
- Node.js 14+
- Node.js 16+. Any relevant [LTS release](https://nodejs.dev/en/about/releases/) should work just fine.
- NPM (Node Package Manager) 8+
These are only server requirements. Each driver might have its own requirements. Consider checking the corresponding driver tutorial for more details.
@@ -37,10 +35,16 @@ These are only server requirements. Each driver might have its own requirements.
To install Appium 2 server using Node Package Manager (npm) run the following command:
```bash
npm install -g appium@next
npm i --location=global appium
```
:bangbang: Running `npm install -g appium` would still install Appium 1 because version 2 is in its late beta stage.
To update Appium 2 server using Node Package Manager (npm) run the following command:
```bash
npm install --location=global appium@latest
```
:bangbang: Make sure Appium 1 is fully uninstalled before upgrading it to Appium 2 (`npm uninstall --location=global appium`). Unexpected errors might appear if this has not been done.
### Drivers
@@ -190,10 +194,6 @@ Repo](https://github.com/appium/appium/tree/master/packages/appium/docs) as well
Please take a look at our [contribution documentation](CONTRIBUTING.md)
for instructions on how to build, test, and run Appium from the source.
### Roadmap
Interested in where Appium is heading in the future? Check out the [Roadmap](ROADMAP.md)
### Project History, Credits & Inspiration
* [History](https://appium.io/docs/en/latest/intro/history/)
-59
View File
@@ -1,59 +0,0 @@
Appium Roadmap
---------------
This document is designed to be a living record of the current and projected
priorities for the Appium project. It is, of course, always subject to change
and exists solely to give the community an idea of where we're going. The
roadmap is set by the Appium core team. If you have feature suggestions for
Appium, please submit a [GitHub issue](https://github.com/appium/appium/issues)
and, if of sufficient size and approved by the team, it will be added here. If
you have concerns about the roadmap, you can e-mail the Appium devs at
`appium-developers@googlegroups.com` or raise a GitHub issue. Note that
bugfixes and miscellaneous features are not considered "roadmap projects", and
will be addressed in the due course of normal Appium development. This page
exists to outline large-scale future plans for Appium.
## Current Roadmap Projects
| Project | Description | ETD | Projected Appium Release |
|---------|-------------|-----|--------------------------|
|[Appium CI + Metrics Improvements](https://github.com/appium/appium/issues/7168)|We have CI servers running via Cloudbees that we don't understand and which break. Let's document and own them so they work reliably. Also, let's implement gathering various metrics about driver performance so we can track this over time and ensure we're not releasing a driver which has decreased in performance or reliability.|Q2 2017|N/A|
## Upcoming Projects (in rough order of priority)
| Project | Description |
|---------|-------------|
|[Appium Client Library Updates](https://github.com/appium/appium/issues/7170)|It's been too long since we ensured that Appium's client libraries were up to date with the server|
|[Test App Overhaul](https://github.com/appium/appium/issues/7172)|Our current test applications (the ones used to test Appium's iOS and Android support) are not ideal. We use too many of them and the ones we use have a random hodgepodge of app SDK features, sometimes not enough to sufficiently test automation support. It'd be great to find a way to ensure our test app(s) have all the features we need to test, and keep in sync with our requirements.|
|[iOS Test Startup Time Improvement](https://github.com/appium/appium/issues/7173)|iOS startup times have gotten progressively longer with each iOS release. In part this is Apple's fault and there's not anything we can do about it. But we should investigate and see if we can be more efficient in how we start, especially given that we can now focus on XCUITest and leave Instruments behind|
|[Appium Dearchitecture](https://github.com/appium/appium/issues/7174)|OK, we went a bit overboard in Appium 1.5 by exploding Appium into 40+ repos and NPM packages. Let's think a little more critically about it and consolidate into the minimal number of repos/packages that make sense for our code and community patterns.|
|[Appium 2.0](https://github.com/appium/appium/issues/7175)|Appium, rather than bundling all the separate drivers by default, becomes a driver management interface (in addition to continuing to play the role of automation frontend server). Appium gets a set of CLI tools for users to pick and choose which drivers and versions of drivers they want to use via Appium|
## Projects Under Consideration (unplanned and unprioritized)
| Project | Description |
|---------|-------------|
|Windows Phone Support|There has been some work done on automating Windows Phone apps. We could take this all the way to integration with Appium in the form of a WindowsDriver.|
|Apple Watch support|Appium should support Apple Watch apps via the Watch simulator|
|Unity3d backend POC|This is a research project to determine whether we can add some kind of support for 3d game automation, probably based on the Unity3d game development platform.|
## Completed Roadmap Projects
| Project | Description | Completed | Appium Release | Notes |
|---------|-------------|-----------|----------------|-------|
|[Sample Code Overhaul](https://github.com/appium/appium/issues/7171)|Our sample code repo has grown tangled and broken. Let's make a new one with minimal examples which are the same across every language, and actually maintain the repo so as not to let it become overgrown.|
|[Onboarding Overhaul](https://github.com/appium/appium/issues/7169)|Have a new site built with MkDocs that documents all of the Selenium and Appium commands with code samples|1/2018|n/a|appium.io|
|[New Appium GUIs](https://github.com/appium/appium/issues/7167)|The current Appium GUIs (Appium.app and Appium.exe) have a number of issues. They aren't maintained by the core Appium team. They're written in Objective-C and C# respectively: two languages, and specifically, two languages other than Appium's core language. Because of this they lag behind the Appium server and are often broken. However, users love them primarily because of the Inspector feature (the thing that lets them graphically navigate their app), so we have to field a ton of complaints about these projects. There's an opportunity to start over. With [Electron](http://electron.atom.io/), we'd be able to take the new version of Appium we're working on and embed it directly inside a Node-based GUI app written using the languages and technologies the core team is experienced with. We'd have one codebase and could distribute the app on Mac, Windows, and Linux. The GUIs would become an official part of Appium's release cycle so they wouldn't be broken.|3/2017|N/A|[Appium Desktop website](https://github.com/appium/appium-desktop)|
|[Android 7.1.1 Support](https://github.com/appium/appium/issues/7165)|Google has released Android 7.1.1 (API Level 25). Ensure it works with UiAutomator 1/2|2/2017|1.6.4||
|[Android 7.0 Support](https://github.com/appium/appium/issues/7156)|Support Android 7 (Nougat)|11/2016|1.6.3||
|[iOS 10.2 Support](https://github.com/appium/appium/issues/7166)|Support iOS 10.2|11/2016|1.6.1||
|[iOS 10.1 Support](https://github.com/appium/appium/issues/7105)|Support iOS 10.1|11/2016|1.6.1||
|UiAutomator2 integration|Google has released [UiAutomator 2](http://developer.android.com/reference/android/support/test/uiautomator/package-summary.html), and it promises to fix some issues and limitations with the previous UiAutomator support. We will build this inside of Selendroid since it requires an instrumentation context.|10/2016?|1.6.0|
|XCUITest integration / iOS 10 support|Instruments + UIAutomation has been working well for many Appium users, but requires crazy workarounds to deal with bugs which remain unfixed on the Apple side. Also, UIAutomation has been removed in favor of XCUITest for iOS 10+. This new backend would exist alongside the UIAutomation backend.|10/2016|1.6.0||
|iOS 9.3 support|Appium should support iOS 9.3 / Xcode 7.3|3/2016|1.5.1||
|[Architecture Overhaul](https://github.com/appium/appium/issues/5169)|Appium's architecture has grown unwieldy enough that adding new features and preventing regressions has become difficult. A rearchitecture is in order to solve these issues as well as migrate the codebase to a form of JS much easier to work in and understand.|2/2015|1.5.0||
|iOS 9.2 support|Appium should support iOS 9.2 / Xcode 7.2|11/2015|1.4.14||
|iOS 9.1 support|Appium should support iOS 9.1 / Xcode 7.1|10/2015|1.4.12||
|iOS 9.0 support|Appium should support iOS 9.0 / Xcode 7.0|10/2015|1.4.11||
|iOS 8.4 support|Appium should support iOS 8.4 / Xcode 6.2|5/2015|1.4.0||
|Appium CI|Appium has unique needs for Continuous Integration because of the highly specialized environments required (iOS simulators, Xcode, Android emulators, the Android SDK, etc...). We therefore need to create a custom CI solution (perhaps sitting underneath Cloudbees or some other OSS-friendly CI server) that can be used for all Appium projects which need integration tests.|5/2015|_N/A_|Usage instructions at [appium/appium-ci](https://github.com/appium/appium-ci)|
+1 -4
View File
@@ -14,13 +14,10 @@
"version": {
"conventionalCommits": true,
"createRelease": "github",
"version": {
"allowBranch": "master"
}
"allowBranch": "master"
}
},
"ignoreChanges": ["**/test/**", "**/*.md"],
"useNx": false,
"useWorkspaces": true,
"version": "independent"
}
+11351 -8667
View File
File diff suppressed because it is too large Load Diff
+38 -38
View File
@@ -84,69 +84,69 @@
"singleQuote": true
},
"devDependencies": {
"@colors/colors": "1.5.0",
"@commitlint/cli": "17.6.5",
"@commitlint/config-conventional": "17.6.5",
"@tsconfig/node14": "1.0.3",
"@types/chai": "4.3.5",
"@types/chai-as-promised": "7.1.5",
"@types/diff": "5.0.3",
"@types/mocha": "10.0.1",
"@types/node": "18.16.18",
"@types/semver": "7.5.0",
"@types/sinon": "10.0.15",
"@types/sinon-chai": "3.2.9",
"@types/source-map-support": "0.5.6",
"@types/teen_process": "2.0.0",
"@types/ws": "8.5.5",
"@types/yargs": "17.0.24",
"@typescript-eslint/eslint-plugin": "5.59.8",
"@typescript-eslint/parser": "5.59.8",
"@colors/colors": "1.6.0",
"@commitlint/cli": "17.8.0",
"@commitlint/config-conventional": "17.8.0",
"@tsconfig/node14": "14.1.0",
"@types/chai": "4.3.9",
"@types/chai-as-promised": "7.1.7",
"@types/diff": "5.0.7",
"@types/mocha": "10.0.3",
"@types/node": "18.18.6",
"@types/semver": "7.5.4",
"@types/sinon": "10.0.20",
"@types/sinon-chai": "3.2.11",
"@types/source-map-support": "0.5.9",
"@types/teen_process": "2.0.1",
"@types/ws": "8.5.8",
"@types/yargs": "17.0.29",
"@typescript-eslint/eslint-plugin": "6.8.0",
"@typescript-eslint/parser": "6.8.0",
"asyncbox": "2.9.4",
"chai": "4.3.7",
"chai": "4.3.10",
"chai-as-promised": "7.1.1",
"chai-webdriverio-async": "2.7.0",
"conventional-changelog-conventionalcommits": "5.0.0",
"cpy-cli": "4.2.0",
"eslint": "8.42.0",
"eslint-config-prettier": "8.8.0",
"conventional-changelog-conventionalcommits": "6.1.0",
"cpy-cli": "5.0.0",
"eslint": "8.51.0",
"eslint-config-prettier": "9.0.0",
"eslint-find-rules": "4.1.0",
"eslint-import-resolver-typescript": "3.5.5",
"eslint-plugin-import": "2.27.5",
"eslint-plugin-mocha": "10.1.0",
"eslint-import-resolver-typescript": "3.6.1",
"eslint-plugin-import": "2.28.1",
"eslint-plugin-mocha": "10.2.0",
"eslint-plugin-promise": "6.1.1",
"fancy-log": "2.0.0",
"finalhandler": "1.2.0",
"get-port": "5.1.1",
"handlebars": "4.7.7",
"handlebars": "4.7.8",
"husky": "8.0.3",
"json-schema-to-typescript": "13.0.1",
"lerna": "6.6.2",
"lint-staged": "13.2.2",
"json-schema-to-typescript": "13.1.1",
"lerna": "7.4.1",
"lint-staged": "15.0.1",
"log-symbols": "4.1.0",
"midnight-smoker": "2.0.4",
"midnight-smoker": "7.0.4",
"mjpeg-consumer": "2.0.0",
"mjpeg-server": "0.3.1",
"mocha": "10.2.0",
"mocha-chai-jest-snapshot": "1.1.4",
"npm-run-all": "4.1.5",
"prettier": "2.8.8",
"prettier": "3.0.3",
"rewiremock": "3.14.5",
"rimraf": "5.0.1",
"rimraf": "5.0.5",
"serve-static": "1.15.0",
"sinon": "15.1.0",
"sinon": "16.1.3",
"sinon-chai": "3.7.0",
"sync-monorepo-packages": "1.0.2",
"through2": "4.0.2",
"ts-node": "10.9.1",
"tsd": "0.28.1",
"tsd": "0.29.0",
"typedoc": "0.23.28",
"typedoc-plugin-markdown": "3.14.0",
"typedoc-plugin-resolve-crossmodule-references": "0.3.3",
"typescript": "4.9.5",
"typescript": "5.0.4",
"validate.js": "0.13.1",
"webdriverio": "7.31.1",
"ws": "8.13.0",
"webdriverio": "8.17.0",
"ws": "8.14.2",
"yaml-js": "0.3.1"
},
"engines": {
+120
View File
@@ -3,6 +3,126 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [2.2.1](https://github.com/appium/appium/compare/appium@2.2.0...appium@2.2.1) (2023-10-19)
### Bug Fixes
* **appium:** Make sure type definitions are always in sync across modules ([#19323](https://github.com/appium/appium/issues/19323)) ([de39013](https://github.com/appium/appium/commit/de39013ae501d4fc11988435737efb862cc1d820))
* **support:** update definitelytyped ([a306ce7](https://github.com/appium/appium/commit/a306ce741a806d21bc44f3b979803b8af5da99aa))
## [2.2.0](https://github.com/appium/appium/compare/appium@2.1.3...appium@2.2.0) (2023-10-18)
### Features
* **base-driver:** Add server support of TLS and SPDY protocols ([#19105](https://github.com/appium/appium/issues/19105)) ([5926919](https://github.com/appium/appium/commit/5926919177e3df675723c80d800f933fdbda5824))
### Bug Fixes
* **appium:** Fix creation of logging prefixes ([#19212](https://github.com/appium/appium/issues/19212)) ([805f69d](https://github.com/appium/appium/commit/805f69de354ebf0b1e8ffeb64c85833b5d533b4c))
* **appium:** update dependency winston to v3.11.0 ([f697cda](https://github.com/appium/appium/commit/f697cda9af2b61344b55b5af0f2bfc1fd034334b))
* **docutils:** update dependency yaml to v2.3.2 ([1a3d408](https://github.com/appium/appium/commit/1a3d408e239e4a9a7070923a90aca70df1dda908))
* **docutils:** update dependency yaml to v2.3.3 ([caf600b](https://github.com/appium/appium/commit/caf600bffd5f25971d0270e9990b2640a671e366))
* **images-plugin:** update dependency lru-cache to v10 ([#19050](https://github.com/appium/appium/issues/19050)) ([72a806b](https://github.com/appium/appium/commit/72a806bec7c3a80747192d24dfd9d8286a751810))
* **opencv:** update definitelytyped ([d2a9a99](https://github.com/appium/appium/commit/d2a9a99418af9ce9b569bb9b98ee396faab932bb))
* **support:** update definitelytyped ([3b44c7d](https://github.com/appium/appium/commit/3b44c7d8f5b89f9357dfe6bb56b54799bbe0a921))
* **support:** update definitelytyped ([595d460](https://github.com/appium/appium/commit/595d460ac8dc41d310f9e4f653acbad3c7fd50b9))
* **support:** update definitelytyped ([b6a76ce](https://github.com/appium/appium/commit/b6a76ce91e2765c22f84e389b93f780e0b4490c0))
* **support:** update definitelytyped ([3e73600](https://github.com/appium/appium/commit/3e7360021dba0f8e8967094476fe92646ba5e35b))
* **support:** update dependency @types/semver to v7.5.1 ([a0f59d0](https://github.com/appium/appium/commit/a0f59d05945e627602407d1d42e7a3a58861b11f))
* **support:** update dependency @types/teen_process to v2.0.1 ([d2f19aa](https://github.com/appium/appium/commit/d2f19aab935cc6ec00a51f042b5f02674a772198))
* **support:** update dependency axios to v1.5.0 ([08913cd](https://github.com/appium/appium/commit/08913cddde295f616f0fb376cc2cb71a9409a253))
* **support:** update dependency axios to v1.5.1 ([#19217](https://github.com/appium/appium/issues/19217)) ([3df047d](https://github.com/appium/appium/commit/3df047d128d5d032826c8f5fb605b019078b717d))
* **support:** update dependency teen_process to v2.0.10 ([bc1b56a](https://github.com/appium/appium/commit/bc1b56a3c162ed8686d3d7956c30eb1f7682b1a7))
* **support:** update dependency teen_process to v2.0.12 ([c5d6df7](https://github.com/appium/appium/commit/c5d6df7a000d64e8591a56ce5ef65baa2071a36b))
* **support:** update dependency teen_process to v2.0.13 ([a0c4b84](https://github.com/appium/appium/commit/a0c4b84fb7d3977b7a4ca0a07fadd49ee355791a))
* **support:** update dependency teen_process to v2.0.18 ([ffeebc7](https://github.com/appium/appium/commit/ffeebc74b72e5eadf658325e67708ae6ed5b8346))
* **support:** update dependency teen_process to v2.0.19 ([2ef40fe](https://github.com/appium/appium/commit/2ef40febdc717f54ea618ecfe1058b858fe2daf9))
* **support:** update dependency teen_process to v2.0.23 ([1b0459e](https://github.com/appium/appium/commit/1b0459edd656514d8706aab8e21cd4d40de2ec5d))
* **support:** update dependency teen_process to v2.0.24 ([bc72c66](https://github.com/appium/appium/commit/bc72c6676a5412b60e74bb143a223738ce059977))
* **support:** update dependency teen_process to v2.0.27 ([03b2aa6](https://github.com/appium/appium/commit/03b2aa6b6e45fa0ea24c4691b039255bc4399733))
* **support:** update dependency teen_process to v2.0.30 ([7cdb142](https://github.com/appium/appium/commit/7cdb1429a1104ad3699547f2a2dd9b237135891a))
* **support:** update dependency teen_process to v2.0.34 ([#19218](https://github.com/appium/appium/issues/19218)) ([c28fcef](https://github.com/appium/appium/commit/c28fcefa725fbce5a0464e57946051e3cb023d85))
* **support:** update dependency teen_process to v2.0.37 ([6d894be](https://github.com/appium/appium/commit/6d894bef6f377ebfdffdeb1adde7a72624844414))
* **support:** update dependency teen_process to v2.0.38 ([a32dc11](https://github.com/appium/appium/commit/a32dc1110125d0f1fac9c66c17f1309145a634c7))
* **support:** update dependency teen_process to v2.0.40 ([2837bcd](https://github.com/appium/appium/commit/2837bcdeb19532fe973a2902db5c8d730252d962))
* **support:** update dependency teen_process to v2.0.41 ([1a34396](https://github.com/appium/appium/commit/1a34396339f71d40353d323feaf78afcf2269fc9))
* **support:** update dependency teen_process to v2.0.42 ([e2a670e](https://github.com/appium/appium/commit/e2a670e1c4a0f061b0bfb08a6b534d9deb7bdd9c))
* **support:** update dependency teen_process to v2.0.45 ([ea731bf](https://github.com/appium/appium/commit/ea731bf117d680496fce453ac42cfee7f05ada60))
* **support:** update dependency teen_process to v2.0.48 ([eebc651](https://github.com/appium/appium/commit/eebc651f31c282baa7e77a6384d3ee8efc0072d6))
* **support:** update dependency teen_process to v2.0.50 ([ca3e5d9](https://github.com/appium/appium/commit/ca3e5d90e4c51fc1dda32154e1d77e65cb44fb54))
* **support:** update dependency teen_process to v2.0.9 ([6c7f3ef](https://github.com/appium/appium/commit/6c7f3ef670d441bdc4b693948a19dcbdc54e4764))
## [2.1.3](https://github.com/appium/appium/compare/appium@2.1.2...appium@2.1.3) (2023-08-23)
**Note:** Version bump only for package appium
## [2.1.2](https://github.com/appium/appium/compare/appium@2.1.1...appium@2.1.2) (2023-08-22)
**Note:** Version bump only for package appium
## [2.1.1](https://github.com/appium/appium/compare/appium@2.1.0...appium@2.1.1) (2023-08-21)
**Note:** Version bump only for package appium
## [2.1.0](https://github.com/appium/appium/compare/appium@2.0.1...appium@2.1.0) (2023-08-17)
### Features
* **base-driver:** Make it possible to provide settings as a map in session capabilities ([#18970](https://github.com/appium/appium/issues/18970)) ([aaf58c3](https://github.com/appium/appium/commit/aaf58c3de66fee2eb10225d05e156e7416a4ac79))
### Bug Fixes
* **appium:** Fix the plural form ([97d8f0d](https://github.com/appium/appium/commit/97d8f0df44d915b346a6ecd0d052369dd80a9569))
* **appium:** update dependency winston to v3.10.0 ([b85a92a](https://github.com/appium/appium/commit/b85a92a912b3d2854e8102b41119fc780e1a6cc2))
* **appium:** Update the GET /status response to be in sync with the standard ([#18972](https://github.com/appium/appium/issues/18972)) ([5a26111](https://github.com/appium/appium/commit/5a2611137b2a7428bb2e593fc945e21874c4cdae))
* **support:** update dependency glob to v10 ([#18490](https://github.com/appium/appium/issues/18490)) ([aaf31a5](https://github.com/appium/appium/commit/aaf31a577cb0b9cbe22646dcd888dc393a03aa11))
* **support:** update dependency semver to v7.5.4 ([03ddcdf](https://github.com/appium/appium/commit/03ddcdfcafbccf6698868a272e499cbdac41d791))
* **types:** update dependency type-fest to v3.13.1 ([fb34ab9](https://github.com/appium/appium/commit/fb34ab917216121d2b554677a12f07a03393d218))
## [2.0.1](https://github.com/appium/appium/compare/appium@2.0.0...appium@2.0.1) (2023-07-24)
### Bug Fixes
* **appium:** ensure plugin commands reset newCommandTimeout ([41836a4](https://github.com/appium/appium/commit/41836a4a7bfb0d7602839c081a4e3c4792e869df))
* **support:** update dependency teen_process to v2.0.4 ([151c19c](https://github.com/appium/appium/commit/151c19c1c3b4c9b94aba10033c2d863f567d849b))
## [2.0.0-rc.5](https://github.com/appium/appium/compare/appium@2.0.0-rc.4...appium@2.0.0-rc.5) (2023-07-03)
### Bug Fixes
* **appium:** restrict address to ipv6/hostname ([#18824](https://github.com/appium/appium/issues/18824)) ([f09fbb6](https://github.com/appium/appium/commit/f09fbb64dce0e179a007f3a0ae9800e61fbe90eb)), closes [#18716](https://github.com/appium/appium/issues/18716)
* **appium:** type fixes for ts v5 ([c13333b](https://github.com/appium/appium/commit/c13333bb979ee3409e6a62a5800c629781553b42))
* **support:** update dependency semver to v7.5.3 ([ed1856d](https://github.com/appium/appium/commit/ed1856d720c442842d5c3fe5f6caeccb8229b5f1))
## [2.0.0-rc.4](https://github.com/appium/appium/compare/appium@2.0.0-rc.3...appium@2.0.0-rc.4) (2023-06-29)
**Note:** Version bump only for package appium
+12 -12
View File
@@ -16,18 +16,16 @@ See the full list of
[officially-supported](https://appium.io/docs/en/latest/ecosystem/#drivers) and
[third-party](https://appium.io/docs/en/latest/ecosystem/#other-drivers) drivers for more details.
:bangbang: Major documentation revision in progress
:bangbang: The current Appium 2.0 documentation can be found [here](https://appium.io/docs/en/latest/).
:bangbang: Appium core team does not maintain Appium 1.x anymore since the 1st of January 2022. All recent versions of officially supported platform drivers are not compatible to Appium 1.x anymore, and require Appium 2 to run. [Please read the migration guide from 1.x to 2.0](https://appium.io/docs/en/latest/guides/migrating-1-to-2/) to manage the Appium server.
:bangbang: Appium core team does not maintain Appium 1.x anymore since the 1st of January 2022. All recent versions of officially supported platform drivers are not compatible to Appium 1.x, and require Appium 2 to run. [Please read the migration guide from 1.x to 2.0](https://appium.io/docs/en/latest/guides/migrating-1-to-2/) to manage the Appium server.
Appium is in the final stages of a major revision (to version 2.0). As such, the documentation
found around the web may not be correct. The current Appium 2.0 documentation is very much in
progress. Currently, it can be found [here](https://appium.io/docs/en/latest/).
:bangbang: If you still use the deprecated Appium Desktop containing the built-in server then you won't be able to upgrade to Appium 2. Consider switching to [Appium Inspector](https://github.com/appium/appium-inspector) instead.
### Requirements
- macOS, Linux or Windows operating system
- Node.js 14+
- Node.js 16+. Any relevant [LTS release](https://nodejs.dev/en/about/releases/) should work just fine.
- NPM (Node Package Manager) 8+
These are only server requirements. Each driver might have its own requirements. Consider checking the corresponding driver tutorial for more details.
@@ -37,10 +35,16 @@ These are only server requirements. Each driver might have its own requirements.
To install Appium 2 server using Node Package Manager (npm) run the following command:
```bash
npm install -g appium@next
npm i --location=global appium
```
:bangbang: Running `npm install -g appium` would still install Appium 1 because version 2 is in its late beta stage.
To update Appium 2 server using Node Package Manager (npm) run the following command:
```bash
npm install --location=global appium@latest
```
:bangbang: Make sure Appium 1 is fully uninstalled before upgrading it to Appium 2 (`npm uninstall --location=global appium`). Unexpected errors might appear if this has not been done.
### Drivers
@@ -190,10 +194,6 @@ Repo](https://github.com/appium/appium/tree/master/packages/appium/docs) as well
Please take a look at our [contribution documentation](CONTRIBUTING.md)
for instructions on how to build, test, and run Appium from the source.
### Roadmap
Interested in where Appium is heading in the future? Check out the [Roadmap](ROADMAP.md)
### Project History, Credits & Inspiration
* [History](https://appium.io/docs/en/latest/intro/history/)
+18
View File
@@ -0,0 +1,18 @@
---
title: Server Environment Variables
---
The primary way of configuring the Appium server is via [CLI Args](./args.md). However, some more
advanced features are toggled or configured via environment variables. To set environment
variables, refer to the documentation for your operating system and terminal. These are the
environment variables that the Appium server understands:
|Variable&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|Description|
|--------|-----------|
|`APPIUM_HOME`|By default, Appium creates a directory called `.appium` in the home directory for your system user. You can adjust the directory with this variable, as detailed in the [Managing Extensions](../guides/managing-exts.md) guide.|
|`APPIUM_TMP_DIR`|By default, Appium uses a random temporary directory for many of its operations. If you wish to use a specific directory, you may do so by including an absolute path as the value of this variable. The behaviour is equivalent to using the `--tmp` CLI arg.|
|`APPIUM_PREFER_SYSTEM_UNZIP`|Set to `0` or `false` to request that Appium not use the `unzip` binary included on your system for unzipping downloaded apps or other artifacts. Instead it will use a JS-based unzip library. This could help on some systems with non-existent or non-standard `unzip` commands. Note that if unzipping fails using the system library, the fallback library will be attempted in any case, so setting this env var merely saves time in the event you know the system unzip will fail.|
|`APPIUM_HOST`|Same as the `--address` CLI arg|
|`APPIUM_PORT`|Same as the `--port` CLI arg|
|`APPIUM_RELOAD_EXTENSIONS`|Set to `1` to cause Appium to re-require extensions when new sessions are created. This is mostly useful for [building extensions](../ecosystem/build-drivers.md)|
|`APPIUM_OMIT_PEER_DEPS`|Adds `--omit=peer` to all the NPM commands run internally by Appium. Mostly an internal feature.|
@@ -152,6 +152,16 @@ your driver locally:
appium driver install --source=local /path/to/your/driver/dev/dir
```
### Refreshing your driver during development
When the Appium server starts, it loads your driver into memory. Changes to your driver code will
not take effect until the next time the Appium server starts. Simply starting a new session is not
sufficient to cause your driver's code to be reloaded.
However, you can set the `APPIUM_RELOAD_EXTENSIONS` environment variable to `1` to request that
Appium clear its module cache and reload extensions whenever a new session is requested. This may
obviate the need to restart the server when you make code changes to your driver.
## Standard driver implementation ideas
These are things you will probably find yourself wanting to do when creating a driver.
@@ -141,7 +141,9 @@ Appium's start server methods to handle starting and stopping the Appium server
Of course, you can always install it locally as described above as well.
Anytime you make changes to your plugin code, you'll need to restart the Appium server to make sure
it picks up the latest code.
it picks up the latest code. As with drivers, you can set the `APPIUM_RELOAD_EXTENSIONS`
environment variable if you wish Appium to try to re-require your plugin module when a new session
starts.
## Standard plugin implementation ideas
@@ -31,7 +31,7 @@ You can also set server arguments as [Config file](./config.md) properties.
### :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@next`), will install the Appium server only, but no drivers. To install drivers, you must instead use the new [Appium extension CLI](../cli/extensions.md). For example, to install the latest versions of the XCUITest and UiAutomator2 drivers, after installing Appium you would run the following commands:
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 --location=global appium`), will install the Appium server only, but no drivers. To install drivers, you must instead use the new [Appium extension CLI](../cli/extensions.md). For example, to install the latest versions of the XCUITest and UiAutomator2 drivers, after installing Appium you would run the following commands:
```bash
appium driver install uiautomator2 # installs the latest driver version
@@ -42,10 +42,10 @@ At this point, your drivers are installed and ready. There's a lot more you can
If you're running in a CI environment or want to install Appium along with some drivers all in one step, you can do so using some special flags during install, for example:
```bash
npm install --global appium --drivers=xcuitest,uiautomator2
npm install --location=global appium --drivers=xcuitest,uiautomator2
```
This will install Appium and the two drivers for you in one go. Please uninstall any existing Appium 1.x npm packages (with `npm uninstall -g appium`) if you get an installation or startup error.
This will install Appium and the two drivers for you in one go. Please uninstall any existing Appium 1.x npm packages (with `npm uninstall --location=global appium`) if you get an installation or startup error.
### :bangbang: Drivers installation path
@@ -122,7 +122,7 @@ appium driver update xcuitest
(For a complete description of the update command, check out the [Extension
CLI](../cli/extensions.md) doc)
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.
To update the Appium server itself, you do the same thing as in the past: `npm install --location=global appium`. Now, installing new versions of the Appium server will leave your drivers intact, so the whole process will be much more quick.
If you would like to update to a specific version, not the latest, please uninstall the driver and install the desired version using the `install` subcommand instead of `update`.
@@ -225,11 +225,11 @@ Some Appium-internal NPM packages have been renamed (for example, `appium-base-d
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).
### :warning: Appium Inspector split out from Appium Desktop
### :warning: Appium Desktop replaced with Appium Inspector
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. Note that Appium Desktop 1.21 and lower versions depend on the deprecated [WD](https://github.com/admc/wd) client, and are not compatible with Appium 2.0. There is currently no Appium 2.0 support for Appium Desktop planned, now that the Inspector is a standalone app.
The inspector functionality of Appium Desktop has been moved to its own app: [Appium Inspector](https://github.com/appium/appium-inspector). It's fully compatible with standalone Appium 2.0 servers, but also works with later versions of Appium 1.x servers. Appium Desktop itself has been deprecated and is not compatible with Appium 2.0.
You can also now use the Appium Inspector without downloading anything, by visiting the [web version of Appium Inspector](https://inspector.appiumpro.com). Note that to test against local servers, you'll need to start the server with `--allow-cors` so that the browser-based version of Appium Inspector can access your Appium server to start sessions.
In addition to the app, Appium Inspector also has a browser version, accessible at https://inspector.appiumpro.com. Note that in order to use the browser version with a local Appium server, you'll need to first start the server with the `--allow-cors` flag.
## Major New Features
@@ -41,6 +41,18 @@ would construct a set of capabilities that includes the following in its JSON re
}
```
Also, since base-driver version 9.4.0, there is a possibility to provide multiple settings
in a single `appium:settings` capability value:
```json
{
"appium:settings": {
"ignoreUnimportantViews": true,
"allowInvisibleElements": true
}
}
```
Of course, initializing a setting via capabilities doesn't prevent you from changing it later on
via the Settings API. To learn more about how to use the Settings API in the context of your
specific client library, visit the documentation for that library.
+29
View File
@@ -0,0 +1,29 @@
---
title: Starting the Server with SSL/TLS/SPDY support
---
## Command Line Arguments
Since version 2.2 of the server there is a possibility to start it with SSL/TLS support. In order to enable secure connections to the server you need to provide the following command line arguments:
```bashs
appium server --ssl-cert-path=/path/to/cert.pem --ssl-key-path=/path/to/key.pem
```
Both arguments must be provided and should contain paths to a valid [X509 PEM](https://www.ssl.com/guide/pem-der-crt-and-cer-x-509-encodings-and-conversions/) certificate and its corresponding private key.
After the server is started use the `https` protocol and a client supporting SSL/TLS or [SPDY](https://en.wikipedia.org/wiki/SPDY) to communicate to it.
### Supported Features
Once a secure server socket is established it supports the following protocols: `['h2', 'spdy/3.1', 'spdy/3', 'spdy/2', 'http/1.1', 'http/1.0']`. See [the SPDY node module documentation](https://www.npmjs.com/package/spdy) to get more details about its features. All insecure client connections will be rejected by the server.
### Self-Signed Certificates
Use the following command in order to generate a self-signed certificate/key pair:
```bash
openssl req -nodes -new -x509 -keyout key.pem -out cert.pem -subj "/C=US/ST=State/L=City/O=company/OU=Com/CN=www.testserver.local"
```
Feel free to change the value of `-subj` in the command above with your matching details. The server should work just fine with a self-signed certificate, although you need to take care about a proper client setup, e.g. make sure it does not reject unauthorized certificates.
@@ -5,14 +5,9 @@ title: Install Appium
Installing Appium is as easy as running a single NPM command:
```bash
npm i -g appium@next
npm i --location=global appium
```
!!! note
Currently, you must use `appium@next` instead of just `appium`. Once Appium 2.0 has been
officially published, you can simply use `appium`.
This command installs Appium globally on your system so that you can access it from the command
line simply by running the `appium` command. Go ahead and run it now:
@@ -78,10 +78,10 @@ You can also set server arguments as [Config file](./config.md) properties.
### :bangbang: ドライバーのインストール
<!---
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@next`), will install the Appium server only, but no drivers. To install drivers, you must instead use the new [Appium extension CLI](../cli/extensions.md). For example, to install the latest versions of the XCUITest and UiAutomator2 drivers, after installing Appium you would run the following commands:
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 --location=global appium`), will install the Appium server only, but no drivers. To install drivers, you must instead use the new [Appium extension CLI](../cli/extensions.md). For example, to install the latest versions of the XCUITest and UiAutomator2 drivers, after installing Appium you would run the following commands:
--->
Appium 1.xをインストールしたとき、全ての入手可能なドライバーは主となるAppiumサーバーと合わせてインストールされていました。Appium 2.0ではそうではありません。Appium 2.0のインストール(例えば `npm install -g appium@next`)は単にAppiumサーバーのみをインストールし、ドライバーはインストールしません。ドライバーをインストールするためには新しい[Appium拡張コマンドラインインタフェース(Appium extension CLI)](../cli/extensions.md)を使わなければいけません。例えば、最新のXCUITestとUiAutomator2ドライバーをインストールする場合、Appiumをインストールしたのちに次のコマンドを実行する必要があります。
Appium 1.xをインストールしたとき、全ての入手可能なドライバーは主となるAppiumサーバーと合わせてインストールされていました。Appium 2.0ではそうではありません。Appium 2.0のインストール(例えば `npm install --location=global appium`)は単にAppiumサーバーのみをインストールし、ドライバーはインストールしません。ドライバーをインストールするためには新しい[Appium拡張コマンドラインインタフェース(Appium extension CLI)](../cli/extensions.md)を使わなければいけません。例えば、最新のXCUITestとUiAutomator2ドライバーをインストールする場合、Appiumをインストールしたのちに次のコマンドを実行する必要があります。
```bash
appium driver install uiautomator2 # installs the latest driver version
@@ -95,14 +95,14 @@ At this point, your drivers are installed and ready. There's a lot more you can
これにより、ドライバーはインストールされ、利用可能になります。このCLIはいろいろな機能を提供しているので、CLIのドキュメントを確認してみてください。もしCI上であったり、いくつかのドライバーをAppiumと一緒にインストールしたい場合、以下のようなフラグを利用することで実現可能です。
```bash
npm install --global appium --drivers=xcuitest,uiautomator2
npm install --location=global appium --drivers=xcuitest,uiautomator2
```
<!---
This will install Appium and the two drivers for you in one go. Please uninstall any existing Appium 1.x npm packages (with `npm uninstall -g appium`) if you get an installation or startup error.
This will install Appium and the two drivers for you in one go. Please uninstall any existing Appium 1.x npm packages (with `npm uninstall --location=global appium`) if you get an installation or startup error.
--->
これはAppiumと2つのドライバーを一つのコマンドでインストールします。もしセットアップで何らかの問題が発生した場合、既存のAppium 1.xを`npm uninstall -g appium`で削除してみてください。
これはAppiumと2つのドライバーを一つのコマンドでインストールします。もしセットアップで何らかの問題が発生した場合、既存のAppium 1.xを`npm uninstall --location=global appium`で削除してみてください。
### :bangbang: Drivers installation path
@@ -166,7 +166,7 @@ appium driver update xcuitest
(For a complete description of the update command, check out the [Extension
CLI](../cli/extensions.md) doc)
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.
To update the Appium server itself, you do the same thing as in the past: `npm install --location=global appium`. Now, installing new versions of the Appium server will leave your drivers intact, so the whole process will be much more quick.
If you would like to update to a specific version, not the latest, please uninstall the driver and install the desired version using the `install` subcommand instead of `update`.
+1
View File
@@ -28,6 +28,7 @@ nav:
- CLI Reference:
- cli/index.md
- cli/args.md
- cli/env-vars.md
- cli/extensions.md
- Guides:
- guides/migrating-1-to-2.md
+56 -2
View File
@@ -13,7 +13,7 @@ import {
promoteAppiumOptionsForObject,
} from '@appium/base-driver';
import AsyncLock from 'async-lock';
import {parseCapsForInnerDriver, pullSettings} from './utils';
import {parseCapsForInnerDriver, pullSettings, makeNonW3cCapsError} from './utils';
import {util, node, logger} from '@appium/support';
import {getDefaultsForExtension} from './schema';
import {DRIVER_TYPE} from './constants';
@@ -114,6 +114,7 @@ class AppiumDriver extends DriverCore {
this.sessionPlugins = {};
this.sessionlessPlugins = [];
this.desiredCapConstraints = desiredCapabilityConstraints;
this._isShuttingDown = false;
// allow this to happen in the background, so no `await`
(async () => {
@@ -155,15 +156,36 @@ class AppiumDriver extends DriverCore {
// eslint-disable-next-line require-await
async getStatus() {
// https://www.w3.org/TR/webdriver/#dfn-status
const statusObj = this._isShuttingDown
? {
ready: false,
message: 'The server is shutting down',
} : {
ready: true,
message: 'The server is ready to accept new connections',
};
return {
...statusObj,
build: _.clone(getBuildInfo()),
};
}
/**
* @param {string|null} reason An optional shutdown reason
*/
async shutdown(reason = null) {
this._isShuttingDown = true;
await this.deleteAllSessions({
force: true,
reason,
});
}
async getSessions() {
return _.toPairs(this.sessions).map(([id, driver]) => ({
id,
capabilities: /** @type {import('@appium/types').DriverCaps} */ (driver.caps),
capabilities: /** @type {import('@appium/types').DriverCaps<any>} */ (driver.caps),
}));
}
@@ -231,6 +253,12 @@ class AppiumDriver extends DriverCore {
jsonwpCaps = _.cloneDeep(jsonwpCaps);
const jwpSettings = {...defaultSettings, ...pullSettings(jsonwpCaps)};
w3cCapabilities = _.cloneDeep(w3cCapabilities);
if (
!_.isPlainObject(w3cCapabilities) ||
!(_.isArray(w3cCapabilities?.firstMatch) || _.isPlainObject(w3cCapabilities?.alwaysMatch))
) {
throw makeNonW3cCapsError();
}
// It is possible that the client only provides caps using JSONWP standard,
// although firstMatch/alwaysMatch properties are still present.
// In such case we assume the client understands W3C protocol and merge the given
@@ -634,6 +662,16 @@ class AppiumDriver extends DriverCore {
// get any plugins which are registered as handling this command
const plugins = this.pluginsToHandleCmd(cmd, sessionId);
// if any plugins are going to handle this command, we can't guarantee that the default
// driver's executeCommand method will be called, which means we can't guarantee that the
// newCommandTimeout will be cleared. So we do it here as well.
if (plugins.length && dstSession) {
this.log.debug(
'Clearing new command timeout pre-emptively since plugin(s) will handle this command'
);
await dstSession.clearNewCommandTimeout();
}
// now we define a 'cmdHandledBy' object which will keep track of which plugins have handled this
// command. we care about this because (a) multiple plugins can handle the same command, and
// (b) there's no guarantee that a plugin will actually call the next() method which runs the
@@ -699,6 +737,22 @@ class AppiumDriver extends DriverCore {
// handling the command and which didn't
this.logPluginHandlerReport(plugins, {cmd, cmdHandledBy});
// if we had plugins, and if they did not ultimately call the default handler, this means our
// new command timeout was not restarted by the default handler's executeCommand call, so
// restart it here using the same logic as in BaseDriver's executeCommand
if (
dstSession &&
!cmdHandledBy.default &&
dstSession.isCommandsQueueEnabled &&
cmd !== DELETE_SESSION_COMMAND
) {
this.log.debug(
'Restarting new command timeout via umbrella driver since plugin did not ' +
'allow default handler to execute'
);
await dstSession.startNewCommandTimeout();
}
// And finally, if the command was createSession, we want to migrate any plugins which were
// previously sessionless to use the new sessionId, so that plugins can share state between
// their createSession method and other instance methods
+10 -2
View File
@@ -9,7 +9,11 @@ import {getSchema, validate} from './schema/schema';
* @type {import('lilconfig').LoaderSync}
*/
function yamlLoader(filepath, content) {
return yaml.parse(content);
try {
return yaml.parse(content);
} catch (e) {
throw new Error(`The YAML config at '${filepath}' cannot be loaded. Original error: ${e.message}`);
}
}
/**
@@ -27,7 +31,11 @@ const rawConfig = new Map();
*/
function jsonLoader(filepath, content) {
rawConfig.set(filepath, content);
return JSON.parse(content);
try {
return JSON.parse(content);
} catch (e) {
throw new Error(`The JSON config at '${filepath}' cannot be loaded. Original error: ${e.message}`);
}
}
/**
+16 -19
View File
@@ -3,7 +3,6 @@
*/
import B from 'bluebird';
import glob from 'glob';
import {env, fs} from '@appium/support';
import _ from 'lodash';
import path from 'path';
@@ -212,23 +211,13 @@ export class Manifest {
];
// add dependencies to the queue
await new B((resolve, reject) => {
glob(
'node_modules/{*,@*/*}/package.json',
{cwd: this.#appiumHome, silent: true, absolute: true},
// eslint-disable-next-line promise/prefer-await-to-callbacks
(err) => {
if (err) {
reject(err);
}
resolve();
}
)
.on('error', reject)
.on('match', (filepath) => {
queue.push(onMatch(filepath));
});
const filepaths = await fs.glob('node_modules/{*,@*/*}/package.json', {
cwd: this.#appiumHome,
absolute: true,
});
for (const filepath of filepaths) {
queue.push(onMatch(filepath));
}
// wait for everything to finish
await B.all(queue);
@@ -284,7 +273,11 @@ export class Manifest {
...internal,
};
if (!_.isEqual(value, this.#data.drivers[pkgJson.appium.driverName])) {
this.setExtension(DRIVER_TYPE, pkgJson.appium.driverName, value);
this.setExtension(
/** @type {ExtType} */ (DRIVER_TYPE),
pkgJson.appium.driverName,
/** @type {ExtManifest<ExtType>} */ (value)
);
return true;
}
return false;
@@ -294,7 +287,11 @@ export class Manifest {
...internal,
};
if (!_.isEqual(value, this.#data.plugins[pkgJson.appium.pluginName])) {
this.setExtension(PLUGIN_TYPE, pkgJson.appium.pluginName, value);
this.setExtension(
/** @type {ExtType} */ (PLUGIN_TYPE),
pkgJson.appium.pluginName,
/** @type {ExtManifest<ExtType>} */ (value)
);
return true;
}
return false;
+2 -1
View File
@@ -1,5 +1,6 @@
import {logger} from '@appium/support';
let log = logger.getLogger('Appium');
export const APPIUM_LOGGER_NAME = 'Appium';
let log = logger.getLogger(APPIUM_LOGGER_NAME);
export default log;
+17 -28
View File
@@ -1,6 +1,7 @@
import npmlog from 'npmlog';
import {createLogger, format, transports} from 'winston';
import {fs, logger} from '@appium/support';
import { APPIUM_LOGGER_NAME } from './logger';
import _ from 'lodash';
// set up distributed logging before everything else
@@ -64,8 +65,7 @@ const stripColorFormat = format(function stripColor(info) {
function createConsoleTransport(args, logLvl) {
return new transports.Console({
// `name` is unsupported per winston's type declarations
// @ts-expect-error
// @ts-expect-error The 'name' property should exist
name: 'console',
handleExceptions: true,
exitOnError: false,
@@ -73,14 +73,6 @@ function createConsoleTransport(args, logLvl) {
level: logLvl,
stderrLevels: ['error'],
format: format.combine(
format(function adjustDebug(info) {
// prepend debug marker, and shift to `info` log level
if (info.level === 'debug') {
info.level = 'info';
info.message = `[debug] ${info.message}`;
}
return info;
})(),
timestampFormat,
args.logNoColors ? stripColorFormat : colorizeFormat,
format.printf(function printInfo(info) {
@@ -92,7 +84,7 @@ function createConsoleTransport(args, logLvl) {
function createFileTransport(args, logLvl) {
return new transports.File({
// @ts-expect-error
// @ts-expect-error The 'name' property should exist
name: 'file',
filename: args.logFile,
maxFiles: 1,
@@ -121,7 +113,7 @@ function createHttpTransport(args, logLvl) {
}
return new transports.Http({
// @ts-expect-error
// @ts-expect-error The 'name' property should exist
name: 'http',
host,
port,
@@ -215,22 +207,19 @@ async function init(args) {
});
// Capture logs emitted via npmlog and pass them through winston
npmlog.on('log', (logObj) => {
const winstonLevel = npmToWinstonLevels[logObj.level] || 'info';
let msg = logObj.message;
if (logObj.prefix) {
const prefix = `[${logObj.prefix}]`;
if (args.logNoColors) {
msg = `${prefix} ${msg}`;
} if (prefix === '[Appium]') {
msg = `${prefix.magenta} ${msg}`;
} else {
msg = `${getColorizedPrefix(prefix)} ${msg}`;
}
log[winstonLevel](msg);
if (args.logHandler && _.isFunction(args.logHandler)) {
args.logHandler(logObj.level, msg);
}
npmlog.on('log', ({level, message, prefix}) => {
const winstonLevel = npmToWinstonLevels[level] || 'info';
let msg = message;
if (prefix) {
const decoratedPrefix = `[${prefix}]`;
const toColorizedDecoratedPrefix = () => prefix === APPIUM_LOGGER_NAME
? decoratedPrefix.magenta
: getColorizedPrefix(decoratedPrefix);
msg = `${args.logNoColors ? decoratedPrefix : toColorizedDecoratedPrefix()} ${msg}`;
}
log[winstonLevel](msg);
if (args.logHandler && _.isFunction(args.logHandler)) {
args.logHandler(level, msg);
}
});
}
+4 -6
View File
@@ -347,7 +347,7 @@ function logServerAddress(url) {
: href;
};
logger.info(
`You can provide the following ${util.pluralize('URL', interfaces.length, false)} ` +
`You can provide the following ${interfaces.length === 1 ? 'URL' : 'URLs'} ` +
`in your client code to connect to this server:\n` +
interfaces.map((iface) => `\t${toLabel(iface)}`).join('\n')
);
@@ -440,10 +440,7 @@ async function main(args) {
process.once(signal, async function onSignal() {
logger.info(`Received ${signal} - shutting down`);
try {
await appiumDriver.deleteAllSessions({
force: true,
reason: `The process has received ${signal} signal`,
});
await appiumDriver.shutdown(`The process has received ${signal} signal`);
await server.close();
process.exit(0);
} catch (e) {
@@ -453,8 +450,9 @@ async function main(args) {
});
}
const protocol = 'secure' in server && server.secure ? 'https' : 'http';
const address = net.isIPv6(parsedArgs.address) ? `[${parsedArgs.address}]` : parsedArgs.address;
logServerAddress(`http://${address}:${parsedArgs.port}${normalizeBasePath(parsedArgs.basePath)}`);
logServerAddress(`${protocol}://${address}:${parsedArgs.port}${normalizeBasePath(parsedArgs.basePath)}`);
driverConfig.print();
pluginConfig.print([...pluginClasses.values()]);
+34 -10
View File
@@ -1,6 +1,6 @@
import _ from 'lodash';
import logger from './logger';
import {processCapabilities, PROTOCOLS, STANDARD_CAPS} from '@appium/base-driver';
import {processCapabilities, PROTOCOLS, STANDARD_CAPS, errors} from '@appium/base-driver';
import {inspect as dump} from 'util';
import {node} from '@appium/support';
import path from 'path';
@@ -22,6 +22,18 @@ export const V6_BROADCAST_IP = '::';
*/
const isStdoutTTY = process.stdout.isTTY;
/**
* Creates an error object in case a session gets incompatible capabilities as the input.
*
* @returns {Error}
*/
export function makeNonW3cCapsError() {
return new errors.SessionNotCreatedError(
'Session capabilities format must comply to the W3C standard. Make sure your client is up to date. ' +
'See https://www.w3.org/TR/webdriver/#new-session for more details.'
);
}
/**
* Dumps to value to the console using `info` logger.
*
@@ -69,7 +81,7 @@ function parseCapsForInnerDriver(
if (!hasW3CCaps) {
return /** @type {InvalidCaps<C>} */ ({
protocol: PROTOCOLS.W3C,
error: new Error('W3C capabilities should be provided'),
error: makeNonW3cCapsError(),
});
}
@@ -264,11 +276,18 @@ function adjustNodePath() {
/**
* Pulls the initial values of Appium settings from the given capabilities argument.
* Each setting item must satisfy the following format:
* `setting[setting_name]: setting_value`
* `settings[setting_name]: setting_value`
* or
* ```
* settings = {
* setting_name1: 'setting_value1',
* setting_name2: 'setting_value2',
* }
* ```
* The capabilities argument itself gets mutated, so it does not contain parsed
* settings anymore to avoid further parsing issues.
* Check
* https://github.com/appium/appium/blob/master/docs/en/advanced-concepts/settings.md
* https://appium.io/docs/en/latest/guides/settings/
* for more details on the available settings.
*
* @param {?Object} caps - Capabilities dictionary. It is mutated if
@@ -283,14 +302,19 @@ function pullSettings(caps) {
}
const result = {};
const singleSettings = {};
for (const [key, value] of _.toPairs(caps)) {
const match = /\bsettings\[(\S+)\]$/.exec(key);
if (!match) {
continue;
let match;
if (/^(s|appium:s)ettings$/.test(key) && _.isPlainObject(value)) {
Object.assign(result, value);
delete caps[key];
} else if ((match = /^(s|appium:s)ettings\[(\S+)\]$/.exec(key))) {
singleSettings[match[2]] = value;
delete caps[key];
}
result[match[1]] = value;
delete caps[key];
}
if (!_.isEmpty(singleSettings)) {
Object.assign(result, singleSettings);
}
return result;
}
+20 -22
View File
@@ -1,6 +1,6 @@
{
"name": "appium",
"version": "2.0.0-rc.4",
"version": "2.2.1",
"description": "Automation for Apps.",
"keywords": [
"automation",
@@ -60,52 +60,50 @@
"test:unit": "mocha \"./test/unit/**/*.spec.js\""
},
"dependencies": {
"@appium/base-driver": "^9.3.14",
"@appium/base-plugin": "^2.2.14",
"@appium/docutils": "^0.4.3",
"@appium/schema": "^0.3.0",
"@appium/support": "^4.1.1",
"@appium/types": "^0.13.1",
"@appium/base-driver": "^9.4.1",
"@appium/base-plugin": "^2.2.22",
"@appium/docutils": "^0.4.11",
"@appium/schema": "^0.4.1",
"@appium/support": "^4.1.8",
"@appium/types": "^0.14.1",
"@sidvind/better-ajv-errors": "2.1.0",
"@types/argparse": "2.0.10",
"@types/bluebird": "3.5.38",
"@types/fancy-log": "2.0.0",
"@types/semver": "7.5.0",
"@types/teen_process": "2.0.0",
"@types/argparse": "2.0.12",
"@types/bluebird": "3.5.41",
"@types/fancy-log": "2.0.1",
"@types/semver": "7.5.4",
"@types/teen_process": "2.0.1",
"@types/wrap-ansi": "3.0.0",
"ajv": "8.12.0",
"ajv-formats": "2.1.1",
"argparse": "2.0.1",
"async-lock": "1.4.0",
"asyncbox": "2.9.4",
"axios": "1.4.0",
"axios": "1.5.1",
"bluebird": "3.7.2",
"cross-env": "7.0.3",
"find-up": "5.0.0",
"glob": "8.1.0",
"lilconfig": "2.1.0",
"lodash": "4.17.21",
"npmlog": "7.0.1",
"ora": "5.4.1",
"package-changed": "3.0.0",
"resolve-from": "5.0.0",
"semver": "7.5.1",
"semver": "7.5.4",
"source-map-support": "0.5.21",
"teen_process": "2.0.2",
"type-fest": "3.11.1",
"winston": "3.9.0",
"teen_process": "2.0.50",
"type-fest": "3.13.1",
"winston": "3.11.0",
"wrap-ansi": "7.0.0",
"yaml": "2.3.1"
"yaml": "2.3.3"
},
"engines": {
"node": "^14.17.0 || ^16.13.0 || >=18.0.0",
"npm": ">=8"
},
"publishConfig": {
"access": "public",
"tag": "next"
"access": "public"
},
"gitHead": "8480a85ce2fa466360e0fb1a7f66628331907f02",
"gitHead": "3fa73a1d1a95e3868fbceb005f8b1deb4ac53eaf",
"typedoc": {
"entryPoint": "./lib/main.js"
}
@@ -1,5 +1,5 @@
{
"devDependencies": {
"webdriverio": "7.31.1"
"webdriverio": "^8.11.2"
}
}
@@ -9,7 +9,7 @@ const capabilities = {
};
const wdOpts = {
host: process.env.APPIUM_HOST || 'localhost',
hostname: process.env.APPIUM_HOST || 'localhost',
port: parseInt(process.env.APPIUM_PORT, 10) || 4723,
logLevel: 'info',
capabilities,
@@ -1,5 +1,6 @@
import unittest
from appium import webdriver
from appium.options.android import UiAutomator2Options
from appium.webdriver.common.appiumby import AppiumBy
capabilities = dict(
@@ -16,7 +17,7 @@ appium_server_url = 'http://localhost:4723'
class TestAppium(unittest.TestCase):
def setUp(self) -> None:
self.driver = webdriver.Remote(appium_server_url, capabilities)
self.driver = webdriver.Remote(appium_server_url, options=UiAutomator2Options().load_capabilities(capabilities))
def tearDown(self) -> None:
if self.driver:
@@ -320,7 +320,7 @@ describe('config file behavior', function () {
return this.skip();
}
await readConfigFile(INVALID_JSON_FILEPATH).should.be.rejectedWith(
new RegExp(`${INVALID_JSON_FILEPATH} is invalid`)
new RegExp(`${_.escapeRegExp(INVALID_JSON_FILEPATH)}`)
);
});
});
+23 -1
View File
@@ -240,6 +240,28 @@ describe('FakeDriver via HTTP', function () {
await B.delay(250);
await driver.getPageSource().should.eventually.be.rejectedWith(/terminated/);
await driver.getSessions().should.eventually.be.empty;
});
it('should not allow umbrella commands to prevent newCommandTimeout on inner driver', async function () {
let localCaps = Object.assign(
{
'appium:newCommandTimeout': 0.25,
},
caps
);
let driver = await wdio({...wdOpts, capabilities: localCaps});
should.exist(driver.sessionId);
// get the session list 6 times over 300ms. each request will be below the new command
// timeout but since they are not received by the driver the session should still time out
for (let i = 0; i < 6; i++) {
await driver.getSessions();
await B.delay(50);
}
await driver.getPageSource().should.eventually.be.rejectedWith(/terminated/);
await driver.getSessions().should.eventually.be.empty;
});
it('should accept valid W3C capabilities and start a W3C session', async function () {
@@ -474,7 +496,7 @@ describe('FakeDriver via HTTP', function () {
}
});
it('should log a single deprecation warning if a deprecated method is used and not overridden by a newMethodMap', async function () {
it.skip('should log a single deprecation warning if a deprecated method is used and not overridden by a newMethodMap', async function () {
let driver = await wdio({...wdOpts, capabilities: caps});
try {
driver.addCommand(
@@ -275,6 +275,31 @@ describe('FakePlugin w/ FakeDriver via HTTP', function () {
}
shutdownErr.message.should.match(/either terminated or not started/);
});
it('should allow plugin handled commands to reset newCommandTimeout', async function () {
/** @type {import('webdriverio').RemoteOptions} */
const newOpts = {...wdOpts};
newOpts.capabilities = {
...(newOpts.capabilities ?? {}),
'appium:newCommandTimeout': 2,
};
const driver = await wdio(newOpts);
const {sessionId} = driver;
try {
const start = Date.now();
for (let i = 0; i < 5; i++) {
await B.delay(500);
await driver.getPageSource();
}
// prove that we went beyond the new command timeout as a result of sending commands
(Date.now() - start).should.be.above(2500);
await driver
.getPageSource()
.should.eventually.eql(`<Fake>${JSON.stringify([sessionId])}</Fake>`);
} finally {
await driver.deleteSession();
}
});
});
}
describe('cli args handling for plugin args', function () {
+4
View File
@@ -16,6 +16,10 @@ export default [
description: 'IPv4/IPv6 address or a hostname to listen on',
title: 'address config',
type: 'string',
anyOf: [
{format: 'hostname', type: 'string'},
{format: 'ipv6', type: 'string'}
]
},
},
{
@@ -26,6 +26,7 @@ export function initMocks(sandbox = createSandbox()) {
.returns({next: sandbox.stub().resolves({done: true})}),
})
),
glob: /** @type {MockAppiumSupportFs['glob']} */ (sandbox.stub().resolves([])),
mkdirp: /** @type {MockAppiumSupportFs['mkdirp']} */ (sandbox.stub().resolves()),
readPackageJsonFrom: /** @type {MockAppiumSupportFs['readPackageJsonFrom']} */ (
sandbox.stub().returns({version: APPIUM_VER, engines: {node: '>=12'}})
@@ -166,6 +167,7 @@ export function initMocks(sandbox = createSandbox()) {
* @property {SinonStubbedMember<SupportFs['readFile']>} readFile
* @property {SinonStubbedMember<SupportFs['writeFile']>} writeFile
* @property {SinonStubbedMember<SupportFs['walk']>} walk
* @property {SinonStubbedMember<SupportFs['glob']>} glob
* @property {SinonStubbedMember<SupportFs['mkdirp']>} mkdirp
* @property {SinonStubbedMember<SupportFs['readPackageJsonFrom']>} readPackageJsonFrom
* @property {SinonStubbedMember<SupportFs['findRoot']>} findRoot
@@ -303,7 +303,7 @@ describe('schema', function () {
});
it('should flatten a schema', function () {
expect(flattenSchema()).to.eql(flattenedSchemaFixture);
expect(flattenSchema().length).to.be.greaterThanOrEqual(flattenedSchemaFixture.length);
});
});
@@ -362,7 +362,7 @@ describe('schema', function () {
});
it('should flatten a schema', function () {
expect(flattenSchema()).to.eql(expected);
expect(flattenSchema().length).to.be.greaterThanOrEqual(expected.length);
});
});
});
+20
View File
@@ -232,6 +232,26 @@ describe('utils', function () {
settings.should.eql({});
caps.should.eql({});
});
it('should pull combined settings', function () {
const caps = {
platformName: 'foo',
browserName: 'bar',
'appium:settings[foo]': 'baz2',
'appium:settings': {
foo: 'baz',
yolo: 'bar',
},
};
const settings = pullSettings(caps);
settings.should.eql({
foo: 'baz2',
yolo: 'bar',
});
caps.should.eql({
platformName: 'foo',
browserName: 'bar',
});
});
});
describe('inspect()', function () {
+98
View File
@@ -3,6 +3,104 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [9.4.1](https://github.com/appium/appium/compare/@appium/base-driver@9.4.0...@appium/base-driver@9.4.1) (2023-10-19)
### Bug Fixes
* **appium:** Make sure type definitions are always in sync across modules ([#19323](https://github.com/appium/appium/issues/19323)) ([de39013](https://github.com/appium/appium/commit/de39013ae501d4fc11988435737efb862cc1d820))
* **support:** update definitelytyped ([a306ce7](https://github.com/appium/appium/commit/a306ce741a806d21bc44f3b979803b8af5da99aa))
## [9.4.0](https://github.com/appium/appium/compare/@appium/base-driver@9.3.20...@appium/base-driver@9.4.0) (2023-10-18)
### Features
* **base-driver:** Add server support of TLS and SPDY protocols ([#19105](https://github.com/appium/appium/issues/19105)) ([5926919](https://github.com/appium/appium/commit/5926919177e3df675723c80d800f933fdbda5824))
### Bug Fixes
* **base-driver:** update definitelytyped ([5e09589](https://github.com/appium/appium/commit/5e095893ee8f65cb8744d2cd6c6abd70f402fa55))
* **base-driver:** update dependency http-status-codes to v2.3.0 ([331171d](https://github.com/appium/appium/commit/331171dd8c511aba15e1b5b24329b30224e3e6ac))
* **driver-test-support:** update dependency @types/lodash to v4.14.198 ([84fefd2](https://github.com/appium/appium/commit/84fefd214c40408cbbcd145723b5d8dbeec665af))
* **images-plugin:** update dependency lru-cache to v10 ([#19050](https://github.com/appium/appium/issues/19050)) ([72a806b](https://github.com/appium/appium/commit/72a806bec7c3a80747192d24dfd9d8286a751810))
* **opencv:** update definitelytyped ([d2a9a99](https://github.com/appium/appium/commit/d2a9a99418af9ce9b569bb9b98ee396faab932bb))
* **support:** update definitelytyped ([3b44c7d](https://github.com/appium/appium/commit/3b44c7d8f5b89f9357dfe6bb56b54799bbe0a921))
* **support:** update definitelytyped ([595d460](https://github.com/appium/appium/commit/595d460ac8dc41d310f9e4f653acbad3c7fd50b9))
* **support:** update definitelytyped ([b6a76ce](https://github.com/appium/appium/commit/b6a76ce91e2765c22f84e389b93f780e0b4490c0))
* **support:** update dependency axios to v1.5.0 ([08913cd](https://github.com/appium/appium/commit/08913cddde295f616f0fb376cc2cb71a9409a253))
* **support:** update dependency axios to v1.5.1 ([#19217](https://github.com/appium/appium/issues/19217)) ([3df047d](https://github.com/appium/appium/commit/3df047d128d5d032826c8f5fb605b019078b717d))
* **types:** update definitelytyped ([96b0a44](https://github.com/appium/appium/commit/96b0a44629c451102c44541a8d5b9e7be972f1ea))
* Use pathToRegexp to match websocket endpoints ([#19162](https://github.com/appium/appium/issues/19162)) ([de02ed8](https://github.com/appium/appium/commit/de02ed87fc665ec9c6e563a634634307c3f21e44))
## [9.3.20](https://github.com/appium/appium/compare/@appium/base-driver@9.3.19...@appium/base-driver@9.3.20) (2023-08-23)
### Bug Fixes
* **base-driver:** Avoid RangeError while caching the response data ([#19043](https://github.com/appium/appium/issues/19043)) ([315a5e6](https://github.com/appium/appium/commit/315a5e6cc75d53d5fbbdae598dc4523ab85b7cb1))
* **base-driver:** fix the LRUCache.dispose callback param order ([#19037](https://github.com/appium/appium/issues/19037)) ([abcf0d4](https://github.com/appium/appium/commit/abcf0d451f47f5c7c285f0988693c4bef9c29024))
## [9.3.19](https://github.com/appium/appium/compare/@appium/base-driver@9.3.18...@appium/base-driver@9.3.19) (2023-08-22)
**Note:** Version bump only for package @appium/base-driver
## [9.3.18](https://github.com/appium/appium/compare/@appium/base-driver@9.3.17...@appium/base-driver@9.3.18) (2023-08-21)
### Bug Fixes
* **base-driver:** Fix possible NPE while cleaning up the state listener ([#19020](https://github.com/appium/appium/issues/19020)) ([53bfc68](https://github.com/appium/appium/commit/53bfc68eee5766ca8c6851c424c89d6b123d602e))
* **base-driver:** Respect basic auth credentials if provided ([#19000](https://github.com/appium/appium/issues/19000)) ([ed8e83c](https://github.com/appium/appium/commit/ed8e83c76c5b660e619833515c2ea2ec29082e18))
* **driver-test-support:** update dependency @types/lodash to v4.14.197 ([a080b72](https://github.com/appium/appium/commit/a080b729208b4e3c352456f0f230b63b0b7ee9ee))
## [9.3.17](https://github.com/appium/appium/compare/@appium/base-driver@9.3.16...@appium/base-driver@9.3.17) (2023-08-17)
### Bug Fixes
* **base-driver:** Tune responses caching logic ([#18922](https://github.com/appium/appium/issues/18922)) ([de5b55a](https://github.com/appium/appium/commit/de5b55ae90fefcce86962a48d5aceb73962e56b6))
* **driver-test-support:** update definitelytyped ([c320e8a](https://github.com/appium/appium/commit/c320e8a1a61cb6d980d6d944ae47b60da97aa398))
* **support:** update dependency glob to v10 ([#18490](https://github.com/appium/appium/issues/18490)) ([aaf31a5](https://github.com/appium/appium/commit/aaf31a577cb0b9cbe22646dcd888dc393a03aa11))
* **test-support:** update dependency @colors/colors to v1.6.0 ([1358937](https://github.com/appium/appium/commit/1358937db2edf08ce1ebe3dff2f70ac6b07cd373))
* **types:** update dependency type-fest to v3.13.1 ([fb34ab9](https://github.com/appium/appium/commit/fb34ab917216121d2b554677a12f07a03393d218))
## [9.3.16](https://github.com/appium/appium/compare/@appium/base-driver@9.3.15...@appium/base-driver@9.3.16) (2023-07-24)
### Bug Fixes
* **base-driver:** Use proper cached headers for app download ([#18874](https://github.com/appium/appium/issues/18874)) ([75650a6](https://github.com/appium/appium/commit/75650a6b744dfcbd50d45972f04040472fdbcd45))
## [9.3.15](https://github.com/appium/appium/compare/@appium/base-driver@9.3.14...@appium/base-driver@9.3.15) (2023-07-03)
### Bug Fixes
* **base-driver:** allow subclass to define shape of settings object ([3d614d6](https://github.com/appium/appium/commit/3d614d6d414d0d34026f516dbfad7d296000efcf))
* **base-driver:** pass thru all type args to ExternalDriver ([2b35170](https://github.com/appium/appium/commit/2b351705d401e2db8da76022989c1475cbdda0f8))
* **types,base-driver:** remove deviceName from base constraints ([01061b2](https://github.com/appium/appium/commit/01061b291981333bdec59adfbea60f0cef3d69c1))
* **types:** separate the type of opts from initialOpts ([d6cca51](https://github.com/appium/appium/commit/d6cca5175c3e55d4670936c9d216cd3a6610d16b))
## [9.3.14](https://github.com/appium/appium/compare/@appium/base-driver@9.3.13...@appium/base-driver@9.3.14) (2023-06-29)
**Note:** Version bump only for package @appium/base-driver
@@ -1,6 +1,5 @@
import './event';
import './find';
import './log';
import './settings';
import './timeout';
import './execute';
@@ -1,6 +1,6 @@
import {Constraints, Driver, ILogCommands, LogDefRecord} from '@appium/types';
import type {Constraints, Driver, ILogCommands} from '@appium/types';
import _ from 'lodash';
import {BaseDriver} from '../driver';
import type {BaseDriver} from '../driver';
import {mixin} from './mixin';
declare module '../driver' {
@@ -9,7 +9,7 @@ declare module '../driver' {
}
const LogCommands: ILogCommands = {
supportedLogTypes: <LogDefRecord>{},
supportedLogTypes: {},
async getLogTypes<C extends Constraints>(this: BaseDriver<C>) {
this.log.debug('Retrieving supported log types');
@@ -1,26 +0,0 @@
import {BaseDriver} from '../driver';
import {Constraints, ISettingsCommands, StringRecord} from '@appium/types';
import {mixin} from './mixin';
declare module '../driver' {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
interface BaseDriver<C extends Constraints> extends ISettingsCommands {}
}
const SettingsCommands: ISettingsCommands = {
async updateSettings<C extends Constraints>(this: BaseDriver<C>, newSettings: StringRecord) {
if (!this.settings) {
this.log.errorAndThrow('Cannot update settings; settings object not found');
}
return await this.settings.update(newSettings);
},
async getSettings<C extends Constraints>(this: BaseDriver<C>) {
if (!this.settings) {
this.log.errorAndThrow('Cannot get settings; settings object not found');
}
return this.settings.getSettings();
},
};
mixin(SettingsCommands);
@@ -2,10 +2,23 @@
/* eslint-disable require-await */
import {logger} from '@appium/support';
import type {
AppiumLogger,
Constraints,
Core,
Driver,
DriverOpts,
EventHistory,
HTTPMethod,
InitialOpts,
Protocol,
RouteMatcher,
StringRecord,
} from '@appium/types';
import AsyncLock from 'async-lock';
import {EventEmitter} from 'events';
import _ from 'lodash';
import os from 'os';
import {EventEmitter} from 'node:events';
import os from 'node:os';
import {DEFAULT_BASE_PATH, PROTOCOLS} from '../constants';
import {errors} from '../protocol';
import DeviceSettings from './device-settings';
@@ -15,35 +28,22 @@ const NEW_COMMAND_TIMEOUT_MS = 60 * 1000;
const ON_UNEXPECTED_SHUTDOWN_EVENT = 'onUnexpectedShutdown';
/**
* @template {Constraints} C
* @template {StringRecord} [Settings=StringRecord]
* @implements {Core<C, Settings>}
*/
class DriverCore {
export class DriverCore<const C extends Constraints, Settings extends StringRecord = StringRecord>
implements Core<C, Settings>
{
/**
* Make the basedriver version available so for any driver which inherits from this package, we
* know which version of basedriver it inherited from
*/
static baseVersion = BASEDRIVER_VER;
/**
* @type {string?}
*/
sessionId;
sessionId: string | null;
/**
* @type {import('@appium/types').DriverOpts<C>}
*/
opts;
opts: DriverOpts<C>;
/**
* @type {import('@appium/types').DriverOpts<C>}
*/
initialOpts;
initialOpts: InitialOpts;
/** @type {typeof helpers} */
helpers;
helpers: typeof helpers;
/**
* basePath is used for several purposes, for example in setting up
@@ -52,83 +52,58 @@ class DriverCore {
* initially but it is automatically updated during any actual program
* execution by the routeConfiguringFunction, which is necessarily run as
* the entrypoint for any Appium server
* @type {string}
*/
basePath;
basePath: string;
/** @type {boolean} */
relaxedSecurityEnabled;
relaxedSecurityEnabled: boolean;
/** @type {string[]} */
allowInsecure;
allowInsecure: string[];
/** @type {string[]} */
denyInsecure;
denyInsecure: string[];
/** @type {number} */
newCommandTimeoutMs;
newCommandTimeoutMs: number;
/** @type {number} */
implicitWaitMs;
implicitWaitMs: number;
/** @type {string[]} */
locatorStrategies;
locatorStrategies: string[];
/** @type {string[]} */
webLocatorStrategies;
webLocatorStrategies: string[];
/** @type {Driver[]} */
managedDrivers;
managedDrivers: Driver[];
/** @type {NodeJS.Timeout?} */
noCommandTimer;
noCommandTimer: NodeJS.Timeout | null;
/** @type {EventHistory} */
_eventHistory;
protected _eventHistory: EventHistory;
// used to handle driver events
/** @type {NodeJS.EventEmitter} */
eventEmitter;
eventEmitter: NodeJS.EventEmitter;
/**
* @type {AppiumLogger}
* @privateRemarks XXX: unsure why this is wrapped in a getter when nothing else is
*/
_log;
protected _log: AppiumLogger;
/**
* @type {boolean}
*/
shutdownUnexpectedly;
shutdownUnexpectedly: boolean;
/**
* @type {boolean}
*/
shouldValidateCaps;
shouldValidateCaps: boolean;
/**
* @protected
* @type {AsyncLock}
*/
commandsQueueGuard;
protected commandsQueueGuard: AsyncLock;
/**
* settings should be instantiated by drivers which extend BaseDriver, but
* we set it to an empty DeviceSettings instance here to make sure that the
* default settings are applied even if an extending driver doesn't utilize
* the settings functionality itself
* @type {DeviceSettings<Settings>}
*/
settings;
settings: DeviceSettings<Settings>;
/**
* @param {DriverOpts<C>} opts
* @param {boolean} [shouldValidateCaps]
*/
constructor(opts = /** @type {DriverOpts<C>} */ ({}), shouldValidateCaps = true) {
this._log = logger.getLogger(helpers.generateDriverLogPrefix(this));
protocol?: Protocol;
constructor(opts: InitialOpts = <InitialOpts>{}, shouldValidateCaps = true) {
this._log = logger.getLogger(helpers.generateDriverLogPrefix(this as Core<C>));
// setup state
this.opts = opts;
this.opts = opts as DriverOpts<C>;
// use a custom tmp dir to avoid losing data and app when computer is
// restarted
@@ -168,11 +143,11 @@ class DriverCore {
* when the driver is shut down unexpectedly. Multiple calls to this method
* will cause the handler to be executed mutiple times
*
* @param {(...args: any[]) => void} handler The code to be executed on unexpected shutdown.
* @param handler The code to be executed on unexpected shutdown.
* The function may accept one argument, which is the actual error instance, which
* caused the driver to shut down.
*/
onUnexpectedShutdown(handler) {
onUnexpectedShutdown(handler: (...args: any[]) => void) {
this.eventEmitter.on(ON_UNEXPECTED_SHUTDOWN_EVENT, handler);
}
@@ -183,7 +158,7 @@ class DriverCore {
* Override it in inherited driver classes if necessary.
*/
get driverData() {
return /** @type {import('@appium/types').DriverData} */ ({});
return {};
}
/**
@@ -191,13 +166,13 @@ class DriverCore {
* handles new driver commands received from the client.
* Override it for inherited classes only in special cases.
*
* @return {boolean} If the returned value is true (default) then all the commands
* @return If the returned value is true (default) then all the commands
* received by the particular driver instance are going to be put into the queue,
* so each following command will not be executed until the previous command
* execution is completed. False value disables that queue, so each driver command
* is executed independently and does not wait for anything.
*/
get isCommandsQueueEnabled() {
get isCommandsQueueEnabled(): boolean {
return true;
}
@@ -211,9 +186,8 @@ class DriverCore {
/**
* API method for driver developers to log timings for important events
* @param {string} eventName
*/
logEvent(eventName) {
logEvent(eventName: string) {
if (eventName === 'commands') {
throw new Error('Cannot log commands directly');
}
@@ -240,10 +214,8 @@ class DriverCore {
/**
* method required by MJSONWP in order to determine whether it should
* respond with an invalid session response
* @param {string} [sessionId]
* @returns {boolean}
*/
sessionExists(sessionId) {
sessionExists(sessionId: string): boolean {
if (!sessionId) return false; // eslint-disable-line curly
return sessionId === this.sessionId;
}
@@ -251,11 +223,9 @@ class DriverCore {
/**
* method required by MJSONWP in order to determine if the command should
* be proxied directly to the driver
* @param {string} sessionId
* @returns {Core<C> | null}
*/
driverForSession(sessionId) {
return /** @type {Core<C> | null} */ (this);
driverForSession(sessionId: string): Core<Constraints> | null {
return this as Core<Constraints>;
}
isMjsonwpProtocol() {
@@ -277,11 +247,9 @@ class DriverCore {
/**
* Check whether a given feature is enabled via its name
*
* @param {string} name - name of feature/command
*
* @returns {Boolean}
* @param name - name of feature/command
*/
isFeatureEnabled(name) {
isFeatureEnabled(name: string): boolean {
// if we have explicitly denied this feature, return false immediately
if (this.denyInsecure && _.includes(this.denyInsecure, name)) {
return false;
@@ -306,10 +274,10 @@ class DriverCore {
* Assert that a given feature is enabled and throw a helpful error if it's
* not
*
* @param {string} name - name of feature/command
* @param name - name of feature/command
* @deprecated
*/
ensureFeatureEnabled(name) {
ensureFeatureEnabled(name: string) {
this.assertFeatureEnabled(name);
}
@@ -317,26 +285,20 @@ class DriverCore {
* Assert that a given feature is enabled and throw a helpful error if it's
* not
*
* @param {string} name - name of feature/command
* @param name - name of feature/command
*/
assertFeatureEnabled(name) {
assertFeatureEnabled(name: string) {
if (!this.isFeatureEnabled(name)) {
throw new Error(
`Potentially insecure feature '${name}' has not been ` +
`enabled. If you want to enable this feature and accept ` +
`the security ramifications, please do so by following ` +
`the documented instructions at https://github.com/appium` +
`/appium/blob/master/docs/en/writing-running-appium/security.md`
`the documented instructions at http://appium.io/docs/en/2.0/guides/security/`
);
}
}
/**
*
* @param {string} strategy
* @param {boolean} [webContext]
*/
validateLocatorStrategy(strategy, webContext = false) {
validateLocatorStrategy(strategy: string, webContext = false) {
let validStrategies = this.locatorStrategies;
this.log.debug(`Valid locator strategies for this request: ${validStrategies.join(', ')}`);
@@ -351,30 +313,15 @@ class DriverCore {
}
}
/**
*
* @param {string} [sessionId]
* @returns {boolean}
*/
proxyActive(sessionId) {
proxyActive(sessionId: string): boolean {
return false;
}
/**
*
* @param {string} sessionId
* @returns {import('@appium/types').RouteMatcher[]}
*/
getProxyAvoidList(sessionId) {
getProxyAvoidList(sessionId: string): RouteMatcher[] {
return [];
}
/**
*
* @param {string} [sessionId]
* @returns {boolean}
*/
canProxy(sessionId) {
canProxy(sessionId: string): boolean {
return false;
}
@@ -382,28 +329,28 @@ class DriverCore {
* Whether a given command route (expressed as method and url) should not be
* proxied according to this driver
*
* @param {string} sessionId - the current sessionId (in case the driver runs
* @param sessionId - the current sessionId (in case the driver runs
* multiple session ids and requires it). This is not used in this method but
* should be made available to overridden methods.
* @param {import('@appium/types').HTTPMethod} method - HTTP method of the route
* @param {string} url - url of the route
* @param {any} [body] - webdriver request body
* @param method - HTTP method of the route
* @param url - url of the route
* @param [body] - webdriver request body
*
* @returns {boolean} - whether the route should be avoided
* @returns whether the route should be avoided
*/
proxyRouteIsAvoided(sessionId, method, url, body) {
for (let avoidSchema of this.getProxyAvoidList(sessionId)) {
proxyRouteIsAvoided(sessionId: string, method: HTTPMethod, url: string, body?: any): boolean {
for (const avoidSchema of this.getProxyAvoidList(sessionId)) {
if (!_.isArray(avoidSchema) || avoidSchema.length !== 2) {
throw new Error('Proxy avoidance must be a list of pairs');
}
let [avoidMethod, avoidPathRegex] = avoidSchema;
const [avoidMethod, avoidPathRegex] = avoidSchema;
if (!_.includes(['GET', 'POST', 'DELETE'], avoidMethod)) {
throw new Error(`Unrecognized proxy avoidance method '${avoidMethod}'`);
}
if (!_.isRegExp(avoidPathRegex)) {
throw new Error('Proxy avoidance path must be a regular expression');
}
let normalizedUrl = url.replace(new RegExp(`^${_.escapeRegExp(this.basePath)}`), '');
const normalizedUrl = url.replace(new RegExp(`^${_.escapeRegExp(this.basePath)}`), '');
if (avoidMethod === method && avoidPathRegex.test(normalizedUrl)) {
return true;
}
@@ -415,7 +362,7 @@ class DriverCore {
*
* @param {Driver} driver
*/
addManagedDriver(driver) {
addManagedDriver(driver: Driver) {
this.managedDrivers.push(driver);
}
@@ -430,26 +377,3 @@ class DriverCore {
}
}
}
export {DriverCore};
/**
* @typedef {import('@appium/types').Driver} Driver
* @typedef {import('@appium/types').Constraints} Constraints
* @typedef {import('@appium/types').ServerArgs} ServerArgs
* @typedef {import('@appium/types').EventHistory} EventHistory
* @typedef {import('@appium/types').AppiumLogger} AppiumLogger
* @typedef {import('@appium/types').StringRecord} StringRecord
* @typedef {import('@appium/types').BaseDriverCapConstraints} BaseDriverCapConstraints
*/
/**
* @template {Constraints} C
* @template {StringRecord} [S=StringRecord]
* @typedef {import('@appium/types').Core<C, S>} Core
*/
/**
* @template {Constraints} C
* @typedef {import('@appium/types').DriverOpts<C>} DriverOpts
*/
@@ -9,7 +9,7 @@ import {errors} from '../protocol/errors';
export const MAX_SETTINGS_SIZE = 20 * 1024 * 1024; // 20 MB
/**
* @template {import('@appium/types').StringRecord} T
* @template {StringRecord} T
* @implements {IDeviceSettings<T>}
*/
export class DeviceSettings {
@@ -74,6 +74,10 @@ export class DeviceSettings {
export default DeviceSettings;
/**
* @template {import('@appium/types').StringRecord} [T=import('@appium/types').StringRecord]
* @typedef {import('@appium/types').StringRecord} StringRecord
*/
/**
* @template {StringRecord} [T=StringRecord]
* @typedef {import('@appium/types').IDeviceSettings<T>} IDeviceSettings
*/
+46 -29
View File
@@ -1,28 +1,29 @@
import {validateCaps, processCapabilities} from './capabilities';
import {DriverCore} from './core';
import {util} from '@appium/support';
import {
BASE_DESIRED_CAP_CONSTRAINTS,
type AppiumServer,
type BaseDriverCapConstraints,
type Capabilities,
type Constraints,
type DefaultCreateSessionResult,
type Driver,
type DriverCaps,
type DriverData,
type MultiSessionData,
type ServerArgs,
type StringRecord,
type W3CDriverCaps,
type InitialOpts,
type DefaultDeleteSessionResult,
type SingularSessionData,
} from '@appium/types';
import B from 'bluebird';
import _ from 'lodash';
import {fixCaps, isW3cCaps} from '../helpers/capabilities';
import {DELETE_SESSION_COMMAND, determineProtocol, errors} from '../protocol';
import {processCapabilities, validateCaps} from './capabilities';
import {DriverCore} from './core';
import helpers from './helpers';
import {
AppiumServer,
BaseDriverCapConstraints,
BASE_DESIRED_CAP_CONSTRAINTS,
Capabilities,
Constraints,
DefaultCreateSessionResult,
Driver,
DriverCaps,
DriverData,
DriverOpts,
MultiSessionData,
ServerArgs,
SingularSessionData,
StringRecord,
W3CDriverCaps,
} from '@appium/types';
const EVENT_SESSION_INIT = 'newSessionRequested';
const EVENT_SESSION_START = 'newSessionStarted';
@@ -31,26 +32,26 @@ const EVENT_SESSION_QUIT_DONE = 'quitSessionFinished';
const ON_UNEXPECTED_SHUTDOWN_EVENT = 'onUnexpectedShutdown';
export class BaseDriver<
C extends Constraints,
const C extends Constraints,
CArgs extends StringRecord = StringRecord,
Settings extends StringRecord = StringRecord,
CreateResult = DefaultCreateSessionResult<C>,
DeleteResult = DefaultDeleteSessionResult,
SessionData extends StringRecord = StringRecord
>
extends DriverCore<C, Settings>
implements Driver<C, CArgs>
implements Driver<C, CArgs, Settings, CreateResult, DeleteResult, SessionData>
{
cliArgs: CArgs & ServerArgs;
caps: DriverCaps<C>;
originalCaps: W3CDriverCaps<C>;
desiredCapConstraints: C;
opts: DriverOpts<C>;
server?: AppiumServer;
serverHost?: string;
serverPort?: number;
serverPath?: string;
constructor(opts: DriverOpts<C>, shouldValidateCaps = true) {
constructor(opts: InitialOpts, shouldValidateCaps = true) {
super(opts, shouldValidateCaps);
this.caps = {} as DriverCaps<C>;
@@ -63,7 +64,7 @@ export class BaseDriver<
*
* Subclasses _shouldn't_ need to use this. If you need to use this, please create
* an issue:
* @see https://github.com/appium/appium/issues/new
* @see {@link https://github.com/appium/appium/issues/new}
*/
protected get _desiredCapConstraints(): Readonly<BaseDriverCapConstraints & C> {
return Object.freeze(_.merge({}, BASE_DESIRED_CAP_CONSTRAINTS, this.desiredCapConstraints));
@@ -234,7 +235,7 @@ export class BaseDriver<
w3cCapabilities?: W3CDriverCaps<C>,
// eslint-disable-next-line @typescript-eslint/no-unused-vars
driverData?: DriverData[]
): Promise<DefaultCreateSessionResult<C>> {
): Promise<CreateResult> {
if (this.sessionId !== null) {
throw new errors.SessionNotCreatedError(
'Cannot create a new session while one is in progress'
@@ -311,7 +312,7 @@ export class BaseDriver<
this.log.info(`Session created with session id: ${this.sessionId}`);
return [this.sessionId, caps];
return [this.sessionId, caps] as CreateResult;
}
async getSessions() {
const ret: MultiSessionData<C>[] = [];
@@ -330,7 +331,9 @@ export class BaseDriver<
* Returns capabilities for the session and event history (if applicable)
*/
async getSession() {
return this.caps.eventTimings ? {...this.caps, events: this.eventHistory} : this.caps;
return (
this.caps.eventTimings ? {...this.caps, events: this.eventHistory} : this.caps
) as SingularSessionData<C, SessionData>;
}
// eslint-disable-next-line @typescript-eslint/no-unused-vars
@@ -352,7 +355,7 @@ export class BaseDriver<
const extraCaps = _.difference(_.keys(caps), _.keys(this._desiredCapConstraints));
if (extraCaps.length) {
this.log.warn(
`The following capabilities were provided, but are not ` + `recognized by Appium:`
`The following provided capabilities were not recognized by this driver:`
);
for (const cap of extraCaps) {
this.log.warn(` ${cap}`);
@@ -380,6 +383,20 @@ export class BaseDriver<
return true;
}
async updateSettings(newSettings: Settings) {
if (!this.settings) {
this.log.errorAndThrow('Cannot update settings; settings object not found');
}
return await this.settings.update(newSettings);
}
async getSettings() {
if (!this.settings) {
this.log.errorAndThrow('Cannot get settings; settings object not found');
}
return this.settings.getSettings();
}
}
export * from './commands';
+29 -19
View File
@@ -3,7 +3,7 @@ import path from 'path';
import url from 'url';
import logger from './logger';
import {tempDir, fs, util, zip, timing, node} from '@appium/support';
import LRU from 'lru-cache';
import { LRUCache } from 'lru-cache';
import AsyncLock from 'async-lock';
import axios from 'axios';
import B from 'bluebird';
@@ -20,11 +20,12 @@ const DEFAULT_REQ_HEADERS = Object.freeze({
'user-agent': `Appium (BaseDriver v${BASEDRIVER_VER})`,
});
const AVG_DOWNLOAD_SPEED_MEASUREMENT_THRESHOLD_SEC = 2;
const APPLICATIONS_CACHE = new LRU({
const APPLICATIONS_CACHE = new LRUCache({
max: MAX_CACHED_APPS,
ttl: CACHED_APPS_MAX_AGE, // expire after 24 hours
updateAgeOnGet: true,
dispose: (app, {fullPath}) => {
// @ts-ignore The fullPath property exists
dispose: ({fullPath}, app) => {
logger.info(
`The application '${app}' cached at '${fullPath}' has ` +
`expired after ${CACHED_APPS_MAX_AGE}ms`
@@ -45,7 +46,9 @@ process.on('exit', () => {
return;
}
const appPaths = [...APPLICATIONS_CACHE.values()].map(({fullPath}) => fullPath);
const appPaths = [...APPLICATIONS_CACHE.values()]
// @ts-ignore The fullPath property exists
.map(({fullPath}) => fullPath);
logger.debug(
`Performing cleanup of ${appPaths.length} cached ` +
util.pluralize('application', appPaths.length)
@@ -72,7 +75,7 @@ function verifyAppExtension(app, supportedAppExtensions) {
}
async function calculateFolderIntegrity(folderPath) {
return (await fs.glob('**/*', {cwd: folderPath, strict: false, nosort: true})).length;
return (await fs.glob('**/*', {cwd: folderPath})).length;
}
async function calculateFileIntegrity(filePath) {
@@ -140,7 +143,12 @@ async function configureApp(
const {protocol, pathname} = url.parse(newApp);
const isUrl = protocol === null ? false : ['http:', 'https:'].includes(protocol);
/** @type {import('@appium/types').CachedAppInfo|undefined} */
// @ts-ignore We know the returned type
const cachedAppInfo = APPLICATIONS_CACHE.get(app);
if (cachedAppInfo) {
logger.debug(`Cached app data: ${JSON.stringify(cachedAppInfo, null, 2)}`);
}
return await APPLICATIONS_CACHE_GUARD.acquire(app, async () => {
if (isUrl) {
@@ -150,27 +158,23 @@ async function configureApp(
...DEFAULT_REQ_HEADERS,
};
if (cachedAppInfo?.etag) {
reqHeaders['if-none-match'] = remoteAppProps.etag;
reqHeaders['if-none-match'] = cachedAppInfo.etag;
} else if (cachedAppInfo?.lastModified) {
reqHeaders['if-modified-since'] = remoteAppProps.lastModified?.toString();
reqHeaders['if-modified-since'] = cachedAppInfo.lastModified.toUTCString();
}
let {headers, stream, status} = await queryAppLink(newApp, reqHeaders);
try {
if (!_.isEmpty(headers)) {
logger.debug(`Etag: ${remoteAppProps?.etag} -> ${headers.etag}`);
logger.debug(`Etag: ${headers.etag}`);
if (headers.etag) {
remoteAppProps.etag = headers.etag;
}
logger.debug(
`Last-Modified: ${remoteAppProps?.['last-modified']} -> ${headers['last-modified']}`
);
logger.debug(`Last-Modified: ${headers['last-modified']}`);
if (headers['last-modified']) {
remoteAppProps.lastModified = new Date(headers['last-modified']);
}
logger.debug(
`Cache-Control: ${remoteAppProps?.['cache-control']} -> ${headers['cache-control']}`
);
logger.debug(`Cache-Control: ${headers['cache-control']}`);
if (headers['cache-control']) {
remoteAppProps.immutable = /\bimmutable\b/i.test(headers['cache-control']);
const maxAgeMatch = /\bmax-age=(\d+)\b/i.exec(headers['cache-control']);
@@ -280,7 +284,7 @@ async function configureApp(
if (isPackageAFile && shouldUnzipApp && !_.isFunction(onPostProcess)) {
const archivePath = newApp;
if (packageHash === cachedAppInfo?.packageHash) {
const {fullPath} = cachedAppInfo;
const fullPath = cachedAppInfo?.fullPath;
if (await isAppIntegrityOk(fullPath, cachedAppInfo?.integrity)) {
if (archivePath !== app) {
await fs.rimraf(archivePath);
@@ -363,12 +367,19 @@ async function configureApp(
* @returns {Promise<RemoteAppData>}
*/
async function queryAppLink(appLink, reqHeaders) {
const {href} = url.parse(appLink);
const {href, auth} = url.parse(appLink);
const axiosUrl = auth ? href.replace(`${auth}@`, '') : href;
/** @type {import('axios').AxiosBasicCredentials|undefined} */
const axiosAuth = auth ? {
username: auth.substring(0, auth.indexOf(':')),
password: auth.substring(auth.indexOf(':') + 1),
} : undefined;
/**
* @type {import('axios').RawAxiosRequestConfig}
*/
const requestOpts = {
url: href,
url: axiosUrl,
auth: axiosAuth,
responseType: 'stream',
timeout: APP_DOWNLOAD_TIMEOUT_MS,
validateStatus: (status) =>
@@ -383,7 +394,7 @@ async function queryAppLink(appLink, reqHeaders) {
status,
};
} catch (err) {
throw new Error(`Cannot download the app from ${href}: ${err.message}`);
throw new Error(`Cannot download the app from ${axiosUrl}: ${err.message}`);
}
}
@@ -476,7 +487,6 @@ async function unzipApp(zipPath, dstRoot, supportedAppExtensions) {
const sortedBundleItems = (
await fs.glob(globPattern, {
cwd: tmpRoot,
strict: false,
// Get the top level match
})
).sort((a, b) => a.split(path.sep).length - b.split(path.sep).length);
@@ -1,4 +1,5 @@
import {util} from '@appium/support';
import {Protocol} from '@appium/types';
// The default maximum length of a single log record
// containing http request/response body
@@ -12,7 +13,7 @@ const W3C_ELEMENT_KEY = util.W3C_WEB_ELEMENT_IDENTIFIER;
const PROTOCOLS = {
W3C: 'W3C',
MJSONWP: 'MJSONWP',
};
} as const satisfies Record<Protocol, Protocol>;
// Before Appium 2.0, this default value was '/wd/hub' by historical reasons.
const DEFAULT_BASE_PATH = '';
+120 -84
View File
@@ -1,34 +1,41 @@
import log from './logger';
import LRU from 'lru-cache';
import {fs, util} from '@appium/support';
import os from 'os';
import path from 'path';
import { LRUCache } from 'lru-cache';
import _ from 'lodash';
import {EventEmitter} from 'events';
const CACHE_SIZE = 1024;
const IDEMPOTENT_RESPONSES = new LRU({
max: CACHE_SIZE,
const IDEMPOTENT_RESPONSES = new LRUCache({
max: 64,
ttl: 30 * 60 * 1000,
updateAgeOnGet: true,
dispose(key, {response}) {
if (response) {
fs.rimrafSync(response);
}
},
updateAgeOnHas: true,
// @ts-ignore The value must contain responseStateListener
dispose: ({responseStateListener}) => {
responseStateListener?.removeAllListeners();
}
});
const MONITORED_METHODS = ['POST', 'PATCH'];
const IDEMPOTENCY_KEY_HEADER = 'x-idempotency-key';
const MAX_CACHED_PAYLOAD_SIZE_BYTES = 1 * 1024 * 1024; // 1 MiB
process.on('exit', () => {
const resPaths = [...IDEMPOTENT_RESPONSES.values()].map(({response}) => response).filter(Boolean);
for (const resPath of resPaths) {
try {
// Asynchronous calls are not supported in onExit handler
fs.rimrafSync(resPath);
} catch (ign) {}
}
});
/**
* @typedef {Object} CachedResponse
* @property {string} method
* @property {string} path
* @property {Buffer?} response
* @property {EventEmitter|null|undefined} responseStateListener
*/
/**
*
* @param {string} key
* @param {import('express').Request} req
* @param {import('express').Response} res
*/
function cacheResponse(key, req, res) {
if (!res.socket) {
return;
}
const responseStateListener = new EventEmitter();
IDEMPOTENT_RESPONSES.set(key, {
method: req.method,
@@ -36,69 +43,107 @@ function cacheResponse(key, req, res) {
response: null,
responseStateListener,
});
const tmpFile = path.resolve(os.tmpdir(), `${util.uuidV4()}.response`);
const responseListener = fs.createWriteStream(tmpFile, {
emitClose: true,
});
const originalSocketWriter = res.socket.write.bind(res.socket);
const socket = res.socket;
const originalSocketWriter = socket.write.bind(socket);
const responseRef = new WeakRef(res);
let responseChunks = [];
let responseSize = 0;
let errorMessage = null;
const patchedWriter = (chunk, encoding, next) => {
if (responseListener.writable) {
responseListener.write(chunk);
if (errorMessage || !responseRef.deref()) {
responseChunks = [];
responseSize = 0;
return originalSocketWriter(chunk, encoding, next);
}
const buf = Buffer.from(chunk, encoding);
responseChunks.push(buf);
responseSize += buf.length;
if (responseSize > MAX_CACHED_PAYLOAD_SIZE_BYTES) {
errorMessage = `The actual response size exceeds ` +
`the maximum allowed limit of ${MAX_CACHED_PAYLOAD_SIZE_BYTES} bytes`;
}
return originalSocketWriter(chunk, encoding, next);
};
res.socket.write = patchedWriter;
let writeError = null;
let isResponseFullySent = false;
responseListener.once('error', (e) => {
writeError = e;
});
res.once('finish', () => {
isResponseFullySent = true;
responseListener.end();
});
res.once('close', () => {
if (!isResponseFullySent) {
responseListener.end();
}
});
responseListener.once('close', () => {
if (res.socket?.write === patchedWriter) {
res.socket.write = originalSocketWriter;
socket.write = patchedWriter;
let didEmitReady = false;
res.once('error', (e) => {
errorMessage = e.message;
if (socket.write === patchedWriter) {
socket.write = originalSocketWriter;
}
if (!IDEMPOTENT_RESPONSES.has(key)) {
log.info(
`Could not cache the response identified by '${key}'. ` +
`Cache consistency has been damaged`
`Cache consistency has been damaged`
);
return responseStateListener.emit('ready', null);
}
if (writeError) {
log.info(`Could not cache the response identified by '${key}': ${writeError.message}`);
} else {
log.info(`Could not cache the response identified by '${key}': ${errorMessage}`);
IDEMPOTENT_RESPONSES.delete(key);
return responseStateListener.emit('ready', null);
}
if (!isResponseFullySent) {
log.info(
`Could not cache the response identified by '${key}', ` +
`because it has not been completed`
);
log.info('Does the client terminate connections too early?');
IDEMPOTENT_RESPONSES.delete(key);
return responseStateListener.emit('ready', null);
}
IDEMPOTENT_RESPONSES.get(key).response = tmpFile;
responseStateListener.emit('ready', tmpFile);
responseChunks = [];
responseSize = 0;
if (!didEmitReady) {
responseStateListener.emit('ready', null);
didEmitReady = true;
}
});
res.once('finish', () => {
if (socket.write === patchedWriter) {
socket.write = originalSocketWriter;
}
if (!IDEMPOTENT_RESPONSES.has(key)) {
log.info(
`Could not cache the response identified by '${key}'. ` +
`Cache consistency has been damaged`
);
} else if (errorMessage) {
log.info(`Could not cache the response identified by '${key}': ${errorMessage}`);
IDEMPOTENT_RESPONSES.delete(key);
}
/** @type {CachedResponse|undefined} */
// @ts-ignore The returned type is ok
const value = IDEMPOTENT_RESPONSES.get(key);
if (value) {
value.response = Buffer.concat(responseChunks);
}
responseChunks = [];
responseSize = 0;
if (!didEmitReady) {
responseStateListener.emit('ready', value?.response ?? null);
didEmitReady = true;
}
});
res.once('close', () => {
if (socket.write === patchedWriter) {
socket.write = originalSocketWriter;
}
if (!didEmitReady) {
/** @type {CachedResponse|undefined} */
// @ts-ignore The returned type is ok
const value = IDEMPOTENT_RESPONSES.get(key);
responseStateListener.emit('ready', value?.response ?? null);
didEmitReady = true;
}
});
}
/**
* @param {import('express').Request} req
* @param {import('express').Response} res
*/
async function handleIdempotency(req, res, next) {
const key = req.headers[IDEMPOTENCY_KEY_HEADER];
if (!key) {
const keyOrArr = req.headers[IDEMPOTENCY_KEY_HEADER];
if (_.isEmpty(keyOrArr) || !keyOrArr) {
return next();
}
const key = _.isArray(keyOrArr) ? keyOrArr[0] : keyOrArr;
if (!MONITORED_METHODS.includes(req.method)) {
// GET, DELETE, etc. requests are idempotent by default
// there is no need to cache them
@@ -112,39 +157,30 @@ async function handleIdempotency(req, res, next) {
}
const {
method: storedMethod,
path: storedPath,
response,
responseStateListener,
// @ts-ignore We have asserted the presence of the key above
method, path, response, responseStateListener,
} = IDEMPOTENT_RESPONSES.get(key);
if (req.method !== storedMethod || req.path !== storedPath) {
if (req.method !== method || req.path !== path) {
log.warn(`Got two different requests with the same idempotency key '${key}'`);
log.warn('Is the client generating idempotency keys properly?');
return next();
}
const rerouteCachedResponse = async (cachedResPath) => {
if (!(await fs.exists(cachedResPath))) {
IDEMPOTENT_RESPONSES.delete(key);
log.warn(`Could not read the cached response identified by key '${key}'`);
log.warn('The temporary storage is not accessible anymore');
return next();
}
fs.createReadStream(cachedResPath).pipe(res.socket);
};
if (response) {
log.info(`The same request with the idempotency key '${key}' has been already processed`);
log.info(`Rerouting its response to the current request`);
await rerouteCachedResponse(response);
if (!res.socket?.writable) {
return next();
}
res.socket.write(response.toString('utf8'));
} else {
log.info(`The same request with the idempotency key '${key}' is being processed`);
log.info(`Waiting for the response to be rerouted to the current request`);
responseStateListener.once('ready', async (cachedResponsePath) => {
if (!cachedResponsePath) {
responseStateListener.once('ready', async (/** @type {Buffer?} */ cachedResponse) => {
if (!cachedResponse || !res.socket?.writable) {
return next();
}
await rerouteCachedResponse(cachedResponsePath);
res.socket.write(cachedResponse.toString('utf8'));
});
}
}
+42 -2
View File
@@ -27,9 +27,49 @@ import {
import B from 'bluebird';
import {DEFAULT_BASE_PATH} from '../constants';
import {EventEmitter} from 'events';
import {fs} from '@appium/support';
const KEEP_ALIVE_TIMEOUT_MS = 10 * 60 * 1000; // 10 minutes
/**
*
* @param {import('express').Express} app
* @param {Partial<import('@appium/types').ServerArgs>} [cliArgs]
* @returns {Promise<http.Server>}
*/
async function createServer (app, cliArgs) {
const {sslCertificatePath, sslKeyPath} = cliArgs ?? {};
if (!sslCertificatePath && !sslKeyPath) {
return http.createServer(app);
}
if (!sslCertificatePath || !sslKeyPath) {
throw new Error(`Both certificate path and key path must be provided to enable TLS`);
}
const certKey = [sslCertificatePath, sslKeyPath];
const zipped = _.zip(
await B.all(certKey.map((p) => fs.exists(p))),
['certificate', 'key'],
certKey,
);
for (const [exists, desc, p] of zipped) {
if (!exists) {
throw new Error(`The provided SSL ${desc} at '${p}' does not exist or is not accessible`);
}
}
const [cert, key] = await B.all(certKey.map((p) => fs.readFile(p, 'utf8')));
log.debug('Enabling TLS/SPDY on the server using the provided certificate');
// eslint-disable-next-line @typescript-eslint/no-var-requires
return require('spdy').createServer({
cert,
key,
spdy: {
plain: false,
ssl: true,
}
}, app);
}
/**
*
* @param {ServerOpts} opts
@@ -48,9 +88,9 @@ async function server(opts) {
keepAliveTimeout = KEEP_ALIVE_TIMEOUT_MS,
} = opts;
// create the actual http server
const app = express();
const httpServer = http.createServer(app);
const httpServer = await createServer(app, cliArgs);
return await new B(async (resolve, reject) => {
// we put an async function as the promise constructor because we want some things to happen in
// serial (application of plugin updates, for example). But we still need to use a promise here
@@ -2,6 +2,7 @@
import _ from 'lodash';
import {URL} from 'url';
import B from 'bluebird';
import { pathToRegexp } from 'path-to-regexp';
const DEFAULT_WS_PATHNAME_PREFIX = '/ws';
@@ -16,12 +17,12 @@ async function addWebSocketHandler(handlerPathname, handlerServer) {
this.on('upgrade', (request, socket, head) => {
let currentPathname;
try {
currentPathname = new URL(/** @type {string} */ (request.url)).pathname;
currentPathname = new URL(request.url ?? '').pathname;
} catch {
currentPathname = request.url;
currentPathname = request.url ?? '';
}
for (const [pathname, wsServer] of _.toPairs(this.webSocketsMapping)) {
if (currentPathname === pathname) {
if (pathToRegexp(pathname).test(currentPathname)) {
wsServer.handleUpgrade(request, socket, head, (ws) => {
wsServer.emit('connection', ws, request);
});
+1 -1
View File
@@ -15,7 +15,7 @@ export default BaseDriver;
// MJSONWP exports
export * from './protocol';
export {errorFromMJSONWPStatusCode as errorFromCode} from './protocol';
export {DEFAULT_BASE_PATH, PROTOCOLS} from './constants';
export {DEFAULT_BASE_PATH, PROTOCOLS, W3C_ELEMENT_KEY} from './constants';
// Express exports
export {STATIC_DIR} from './express/static';
@@ -341,6 +341,7 @@ class JWProxy {
* @param {string} url
* @param {import('@appium/types').HTTPMethod} method
* @param {any?} body
* @returns {Promise<unknown>}
*/
async command(url, method, body = null) {
let response;
+32 -12
View File
@@ -843,24 +843,43 @@ export class UnableToCaptureScreen extends ProtocolError {
}
}
function generateBadParametersMessage(requiredParams, actualParams) {
const toArray = (/** @type {any} */ x) => _.isArray(x) ? x : [];
const requiredParamNames = toArray(requiredParams?.required);
const actualParamNames = toArray(actualParams);
const missingRequiredParamNames = _.difference(requiredParamNames, actualParamNames);
/** @type {string[]} */
const resultLines = [];
resultLines.push(_.isEmpty(missingRequiredParamNames)
// This should not happen
? 'Some of the provided parameters are not known'
: (`The following required parameter${missingRequiredParamNames.length === 1 ? ' is ' : 's are '}`
+ `missing: ${JSON.stringify(missingRequiredParamNames)}`)
);
if (!_.isEmpty(requiredParamNames)) {
resultLines.push(`Known required parameters are: ${JSON.stringify(requiredParamNames)}`);
}
const optionalParamNames = _.difference(toArray(requiredParams?.optional), ['sessionId', 'id']);
if (!_.isEmpty(optionalParamNames)) {
resultLines.push(`Known optional parameters are: ${JSON.stringify(optionalParamNames)}`);
}
resultLines.push(
`You have provided${_.isEmpty(actualParamNames) ? ' none' : (': ' + JSON.stringify(actualParams))}`
);
return resultLines.join('\n');
}
// Equivalent to W3C InvalidArgumentError
export class BadParametersError extends ES6Error {
static error() {
return 'invalid argument';
}
constructor(requiredParams, actualParams, errMessage) {
let message;
if (!errMessage) {
message =
`Parameters were incorrect. We wanted ` +
`${JSON.stringify(requiredParams)} and you ` +
`sent ${JSON.stringify(actualParams)}`;
} else {
message = `Parameters were incorrect. You sent ${JSON.stringify(
actualParams
)}, ${errMessage}`;
}
super(message);
super(errMessage
? `Parameters were incorrect. You sent ${JSON.stringify(actualParams)}, ${errMessage}`
: generateBadParametersMessage(requiredParams, actualParams)
);
this.w3cStatus = HTTPStatusCodes.BAD_REQUEST;
}
}
@@ -1078,6 +1097,7 @@ function getResponseForW3CError(err) {
w3cLog.debug(`Bad parameters: ${err}`);
w3cErrorString = BadParametersError.error();
} else {
// @ts-expect-error unclear what the problem is here
w3cErrorString = err.error;
}
@@ -19,7 +19,7 @@ const CREATE_SESSION_COMMAND = 'createSession';
const DELETE_SESSION_COMMAND = 'deleteSession';
const GET_STATUS_COMMAND = 'getStatus';
/** type {Set<string>} */
/** @type {Set<string>} */
const deprecatedCommandsLogged = new Set();
function determineProtocol(createSessionArgs) {
+20 -16
View File
@@ -1,6 +1,6 @@
{
"name": "@appium/base-driver",
"version": "9.3.14",
"version": "9.4.1",
"description": "Base driver class for Appium drivers",
"keywords": [
"automation",
@@ -37,39 +37,43 @@
"!build/tsconfig.tsbuildinfo"
],
"scripts": {
"test": "npm run test:unit",
"test:e2e": "mocha -p --timeout 20s --slow 10s \"./test/e2e/**/*.spec.js\"",
"test": "run-p test:unit test:types",
"test:e2e": "mocha --timeout 20s --slow 10s \"./test/e2e/**/*.spec.js\"",
"test:smoke": "node ./index.js",
"test:unit": "mocha \"./test/unit/**/*.spec.js\"",
"test:types": "tsd"
},
"dependencies": {
"@appium/support": "^4.1.1",
"@appium/types": "^0.13.1",
"@colors/colors": "1.5.0",
"@types/async-lock": "1.4.0",
"@types/bluebird": "3.5.38",
"@types/express": "4.17.17",
"@types/lodash": "4.14.195",
"@types/method-override": "0.0.32",
"@types/serve-favicon": "2.5.4",
"@appium/support": "^4.1.8",
"@appium/types": "^0.14.1",
"@colors/colors": "1.6.0",
"@types/async-lock": "1.4.1",
"@types/bluebird": "3.5.41",
"@types/express": "4.17.20",
"@types/lodash": "4.14.200",
"@types/method-override": "0.0.34",
"@types/serve-favicon": "2.5.6",
"async-lock": "1.4.0",
"asyncbox": "2.9.4",
"axios": "1.4.0",
"axios": "1.5.1",
"bluebird": "3.7.2",
"body-parser": "1.20.2",
"es6-error": "4.1.1",
"express": "4.18.2",
"http-status-codes": "2.2.0",
"http-status-codes": "2.3.0",
"lodash": "4.17.21",
"lru-cache": "7.18.3",
"lru-cache": "10.0.1",
"method-override": "3.0.0",
"morgan": "1.10.0",
"path-to-regexp": "6.2.1",
"serve-favicon": "2.5.0",
"source-map-support": "0.5.21",
"type-fest": "3.11.1",
"type-fest": "3.13.1",
"validate.js": "0.13.1"
},
"optionalDependencies": {
"spdy": "4.0.2"
},
"engines": {
"node": "^14.17.0 || ^16.13.0 || >=18.0.0",
"npm": ">=8"
@@ -3,8 +3,19 @@ import axios from 'axios';
import {createSandbox} from 'sinon';
import B from 'bluebird';
import _ from 'lodash';
import { exec } from 'teen_process';
import https from 'node:https';
import {TEST_HOST, getTestPort} from '@appium/driver-test-support';
async function generateCertificate (certPath, keyPath) {
await exec('openssl', [
'req', '-nodes', '-new', '-x509',
'-keyout', keyPath,
'-out', certPath,
'-subj', '/C=US/ST=State/L=City/O=company/OU=Com/CN=www.testserver.local',
]);
}
describe('server', function () {
let hwServer;
let port;
@@ -96,6 +107,61 @@ describe('server', function () {
});
});
describe('tls server', function () {
let hwServer;
let port;
let certPath = 'certificate.cert';
let keyPath = 'certificate.key';
const looseClient = axios.create({
httpsAgent: new https.Agent({
rejectUnauthorized: false
})
});
before(async function () {
try {
await generateCertificate(certPath, keyPath);
} catch (e) {
if (process.env.CI) {
throw e;
}
return this.skip();
}
port = await getTestPort(true);
function configureRoutes(app) {
app.get('/', (req, res) => {
res.header['content-type'] = 'text/html';
res.status(200).send('Hello World!');
});
}
hwServer = await server({
routeConfiguringFunction: configureRoutes,
cliArgs: {
sslCertificatePath: certPath,
sslKeyPath: keyPath,
},
port,
});
});
after(async function () {
await hwServer.close();
});
it('should start up with our middleware', async function () {
const {data} = await looseClient.get(`https://${TEST_HOST}:${port}/`);
data.should.eql('Hello World!');
});
it('should throw if untrusted', async function () {
await axios.get(`https://${TEST_HOST}:${port}/`).should.eventually.be.rejected;
});
it('should throw if not secure', async function () {
await axios.get(`http://${TEST_HOST}:${port}/`).should.eventually.be.rejected;
});
});
describe('server plugins', function () {
let hwServer;
let port;
@@ -428,7 +428,7 @@ describe('Protocol', function () {
status.should.equal(400);
const {error: w3cError, message, stacktrace} = data.value;
message.should.match(/Parameters were incorrect/);
message.should.match(/following required parameter/);
stacktrace.should.match(/protocol.js/);
w3cError.should.be.a.string;
w3cError.should.equal(errors.InvalidArgumentError.error());
@@ -4,8 +4,8 @@ import {BaseDriver} from '.../../..';
import {BaseDriverCapConstraints, ExternalDriver, Driver, DriverOpts} from '@appium/types';
expectAssignable<Driver<BaseDriverCapConstraints>>(
new BaseDriver({} as DriverOpts<BaseDriverCapConstraints>)
new BaseDriver<BaseDriverCapConstraints>({} as DriverOpts<BaseDriverCapConstraints>)
);
expectAssignable<ExternalDriver<BaseDriverCapConstraints>>(
new BaseDriver({} as DriverOpts<BaseDriverCapConstraints>)
new BaseDriver<BaseDriverCapConstraints>({} as DriverOpts<BaseDriverCapConstraints>)
);
@@ -36,18 +36,15 @@ describe('Desired Capabilities', function () {
it('should require platformName', async function () {
await d
.createSession({
alwaysMatch: {
'appium:deviceName': 'Delorean',
},
alwaysMatch: {},
firstMatch: [{}],
})
.should.be.rejectedWith(errors.SessionNotCreatedError, /platformName/);
});
it('should not care about cap order', async function () {
await d.createSession(null, null, {
await d.createSession({
alwaysMatch: {
'appium:deviceName': 'Delorean',
platformName: 'iOS',
},
firstMatch: [{}],
@@ -67,10 +64,9 @@ describe('Desired Capabilities', function () {
};
await d
.createSession(null, null, {
.createSession({
alwaysMatch: {
platformName: 'iOS',
'appium:deviceName': 'Delorean',
},
firstMatch: [{}],
})
@@ -90,7 +86,7 @@ describe('Desired Capabilities', function () {
});
await d
.createSession(null, null, {
.createSession({
alwaysMatch: {
'appium:necessary': 'yup',
},
@@ -100,28 +96,22 @@ describe('Desired Capabilities', function () {
});
it('should accept extra capabilities', async function () {
await d.createSession(
null,
null,
/** @type {import('@appium/types').W3CCapabilities<{'hold the':string}>} */ ({
alwaysMatch: {
platformName: 'iOS',
'appium:deviceName': 'Delorean',
'appium:extra': 'cheese',
'appium:hold the': 'sauce',
},
firstMatch: [{}],
})
).should.be.fulfilled;
await d.createSession({
alwaysMatch: {
platformName: 'iOS',
'appium:extra': 'cheese',
'appium:hold the': 'sauce',
},
firstMatch: [{}],
}).should.be.fulfilled;
});
it('should log the use of extra caps', async function () {
this.timeout(500);
await d.createSession(null, null, {
await d.createSession({
alwaysMatch: {
platformName: 'iOS',
'appium:deviceName': 'Delorean',
'appium:extra': 'cheese',
'appium:hold the': 'sauce',
},
@@ -133,11 +123,10 @@ describe('Desired Capabilities', function () {
it('should be sensitive to the case of caps', async function () {
await d
.createSession(null, null, {
.createSession({
alwaysMatch: {
// @ts-expect-error
platformname: 'iOS',
'appium:deviceName': 'Delorean',
},
firstMatch: [{}],
})
@@ -146,10 +135,9 @@ describe('Desired Capabilities', function () {
describe('boolean capabilities', function () {
it('should allow a string "false"', async function () {
await d.createSession(null, null, {
await d.createSession({
alwaysMatch: {
platformName: 'iOS',
'appium:deviceName': 'Delorean',
// @ts-expect-error
'appium:noReset': 'false',
},
@@ -162,10 +150,9 @@ describe('Desired Capabilities', function () {
});
it('should allow a string "true"', async function () {
await d.createSession(null, null, {
await d.createSession({
alwaysMatch: {
platformName: 'iOS',
'appium:deviceName': 'Delorean',
// @ts-expect-error
'appium:noReset': 'true',
},
@@ -178,10 +165,9 @@ describe('Desired Capabilities', function () {
});
it('should allow a string "true" in string capabilities', async function () {
await d.createSession(null, null, {
await d.createSession({
alwaysMatch: {
platformName: 'iOS',
'appium:deviceName': 'Delorean',
'appium:language': 'true',
},
firstMatch: [{}],
@@ -195,10 +181,9 @@ describe('Desired Capabilities', function () {
describe('number capabilities', function () {
it('should allow a string "1"', async function () {
await d.createSession(null, null, {
await d.createSession({
alwaysMatch: {
platformName: 'iOS',
'appium:deviceName': 'Delorean',
// @ts-expect-error
'appium:newCommandTimeout': '1',
},
@@ -211,10 +196,9 @@ describe('Desired Capabilities', function () {
});
it('should allow a string "1.1"', async function () {
await d.createSession(null, null, {
await d.createSession({
alwaysMatch: {
platformName: 'iOS',
'appium:deviceName': 'Delorean',
// @ts-expect-error
'appium:newCommandTimeout': '1.1',
},
@@ -227,10 +211,9 @@ describe('Desired Capabilities', function () {
});
it('should allow a string "1" in string capabilities', async function () {
await d.createSession(null, null, {
await d.createSession({
alwaysMatch: {
platformName: 'iOS',
'appium:deviceName': 'Delorean',
'appium:language': '1',
},
firstMatch: [{}],
@@ -244,11 +227,10 @@ describe('Desired Capabilities', function () {
it('should error if objects in caps', async function () {
await d
.createSession(null, null, {
.createSession({
alwaysMatch: {
// @ts-expect-error
platformName: {a: 'iOS'},
'appium:deviceName': 'Delorean',
},
firstMatch: [{}],
})
@@ -264,10 +246,9 @@ describe('Desired Capabilities', function () {
},
};
await d.createSession(null, null, {
await d.createSession({
alwaysMatch: {
platformName: 'iOS',
'appium:deviceName': 'Delorean',
'appium:lynx-version': 5,
},
firstMatch: [{}],
@@ -285,10 +266,9 @@ describe('Desired Capabilities', function () {
},
};
await d.createSession(null, null, {
await d.createSession({
alwaysMatch: {
platformName: 'iOS',
'appium:deviceName': 'Delorean',
'appium:lynx-version': 5,
},
firstMatch: [{}],
@@ -305,10 +285,9 @@ describe('Desired Capabilities', function () {
};
try {
await d.createSession(null, null, {
await d.createSession({
alwaysMatch: {
platformName: 'iOS',
'appium:deviceName': 'Dumb',
'appium:foo': null,
},
firstMatch: [{}],
@@ -318,10 +297,9 @@ describe('Desired Capabilities', function () {
}
await d
.createSession(null, null, {
.createSession({
alwaysMatch: {
platformName: 'iOS',
'appium:deviceName': 'Dumb',
'appium:foo': 1,
},
firstMatch: [{}],
@@ -329,10 +307,9 @@ describe('Desired Capabilities', function () {
.should.be.rejectedWith(/'foo' must be of type string/);
try {
await d.createSession(null, null, {
await d.createSession({
alwaysMatch: {
platformName: 'iOS',
'appium:deviceName': 'Dumb',
'appium:foo': undefined,
},
firstMatch: [{}],
@@ -342,10 +319,9 @@ describe('Desired Capabilities', function () {
}
try {
await d.createSession(null, null, {
await d.createSession({
alwaysMatch: {
platformName: 'iOS',
'appium:deviceName': 'Dumb',
'appium:foo': '',
},
firstMatch: [{}],
@@ -363,10 +339,9 @@ describe('Desired Capabilities', function () {
};
await d
.createSession(null, null, {
.createSession({
alwaysMatch: {
platformName: 'iOS',
'appium:deviceName': 'Dumb',
'appium:foo': null,
},
firstMatch: [{}],
@@ -374,10 +349,10 @@ describe('Desired Capabilities', function () {
.should.be.rejectedWith(/blank/);
await d
// @ts-expect-error `null` is not actually allowed here
.createSession(null, {
alwaysMatch: {
platformName: 'iOS',
'appium:deviceName': 'Dumb',
'appium:foo': '',
},
firstMatch: [{}],
@@ -389,7 +364,6 @@ describe('Desired Capabilities', function () {
firstMatch: [
{
platformName: 'iOS',
'appium:deviceName': 'Dumb',
'appium:foo': {},
},
],
@@ -401,7 +375,6 @@ describe('Desired Capabilities', function () {
.createSession({
alwaysMatch: {
platformName: 'iOS',
'appium:deviceName': 'Dumb',
'appium:foo': [],
},
firstMatch: [{}],
@@ -412,7 +385,6 @@ describe('Desired Capabilities', function () {
.createSession({
alwaysMatch: {
platformName: 'iOS',
'appium:deviceName': 'Dumb',
'appium:foo': ' ',
},
firstMatch: [{}],
@@ -422,17 +394,15 @@ describe('Desired Capabilities', function () {
describe('w3c', function () {
it('should accept w3c capabilities', async function () {
const [sessionId, caps] = await d.createSession(null, null, {
const [sessionId, caps] = await d.createSession({
alwaysMatch: {
platformName: 'iOS',
'appium:deviceName': 'Delorean',
},
firstMatch: [{}],
});
sessionId.should.exist;
caps.should.eql({
platformName: 'iOS',
deviceName: 'Delorean',
});
});
@@ -442,7 +412,7 @@ describe('Desired Capabilities', function () {
await B.map(testValues, (val) =>
d
// @ts-expect-error
.createSession(null, null, val)
.createSession(val)
.should.be.rejectedWith(errors.SessionNotCreatedError)
);
});
+64
View File
@@ -3,6 +3,70 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [2.2.22](https://github.com/appium/appium/compare/@appium/base-plugin@2.2.21...@appium/base-plugin@2.2.22) (2023-10-19)
**Note:** Version bump only for package @appium/base-plugin
## [2.2.21](https://github.com/appium/appium/compare/@appium/base-plugin@2.2.20...@appium/base-plugin@2.2.21) (2023-10-18)
**Note:** Version bump only for package @appium/base-plugin
## [2.2.20](https://github.com/appium/appium/compare/@appium/base-plugin@2.2.19...@appium/base-plugin@2.2.20) (2023-08-23)
**Note:** Version bump only for package @appium/base-plugin
## [2.2.19](https://github.com/appium/appium/compare/@appium/base-plugin@2.2.18...@appium/base-plugin@2.2.19) (2023-08-22)
**Note:** Version bump only for package @appium/base-plugin
## [2.2.18](https://github.com/appium/appium/compare/@appium/base-plugin@2.2.17...@appium/base-plugin@2.2.18) (2023-08-21)
**Note:** Version bump only for package @appium/base-plugin
## [2.2.17](https://github.com/appium/appium/compare/@appium/base-plugin@2.2.16...@appium/base-plugin@2.2.17) (2023-08-17)
**Note:** Version bump only for package @appium/base-plugin
## [2.2.16](https://github.com/appium/appium/compare/@appium/base-plugin@2.2.15...@appium/base-plugin@2.2.16) (2023-07-24)
**Note:** Version bump only for package @appium/base-plugin
## [2.2.15](https://github.com/appium/appium/compare/@appium/base-plugin@2.2.14...@appium/base-plugin@2.2.15) (2023-07-03)
**Note:** Version bump only for package @appium/base-plugin
## [2.2.14](https://github.com/appium/appium/compare/@appium/base-plugin@2.2.13...@appium/base-plugin@2.2.14) (2023-06-29)
**Note:** Version bump only for package @appium/base-plugin
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@appium/base-plugin",
"version": "2.2.14",
"version": "2.2.22",
"description": "The base plugin used to create Appium 2.0 plugins",
"keywords": [
"automation",
@@ -40,8 +40,8 @@
"test:unit": "mocha \"./test/unit/**/*.spec.js\""
},
"dependencies": {
"@appium/base-driver": "^9.3.14",
"@appium/support": "^4.1.1"
"@appium/base-driver": "^9.4.1",
"@appium/support": "^4.1.8"
},
"engines": {
"node": "^14.17.0 || ^16.13.0 || >=18.0.0",
+92
View File
@@ -3,6 +3,98 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [2.0.27](https://github.com/appium/appium/compare/@appium/doctor@2.0.26...@appium/doctor@2.0.27) (2023-10-19)
### Bug Fixes
* **doctor:** update dependency appium-adb to v11 ([#19321](https://github.com/appium/appium/issues/19321)) ([408885a](https://github.com/appium/appium/commit/408885a5b28f8691dbbb3716f3c1a409d662275b))
* **support:** update definitelytyped ([a306ce7](https://github.com/appium/appium/commit/a306ce741a806d21bc44f3b979803b8af5da99aa))
## [2.0.26](https://github.com/appium/appium/compare/@appium/doctor@2.0.25...@appium/doctor@2.0.26) (2023-10-18)
### Bug Fixes
* **doctor:** update dependency appium-adb to v10 ([#19308](https://github.com/appium/appium/issues/19308)) ([3315671](https://github.com/appium/appium/commit/33156712b142b1cb2ffdcf1cfdf65f5b504e7751))
* **doctor:** update dependency appium-adb to v9.14.10 ([809b2da](https://github.com/appium/appium/commit/809b2daea5304942c849b7015f0a74447fb7b57c))
* **doctor:** update dependency appium-adb to v9.14.11 ([c81e99f](https://github.com/appium/appium/commit/c81e99fd80739d97b3dc2099a43cc66245035bc5))
* **doctor:** update dependency appium-adb to v9.14.12 ([0220a9f](https://github.com/appium/appium/commit/0220a9f8e9a890f84031cfeaea026fceb0a303e9))
* **doctor:** update dependency appium-adb to v9.14.7 ([#19058](https://github.com/appium/appium/issues/19058)) ([f8039a7](https://github.com/appium/appium/commit/f8039a70ca851dcc120a2b217e14e3e3b922ba21))
* **doctor:** update dependency appium-adb to v9.14.9 ([9f700bf](https://github.com/appium/appium/commit/9f700bfdf9e09de3cea9f81029fadef84b8e956b))
* **opencv:** update definitelytyped ([d2a9a99](https://github.com/appium/appium/commit/d2a9a99418af9ce9b569bb9b98ee396faab932bb))
* **support:** update definitelytyped ([b6a76ce](https://github.com/appium/appium/commit/b6a76ce91e2765c22f84e389b93f780e0b4490c0))
* **support:** update dependency @types/teen_process to v2.0.1 ([d2f19aa](https://github.com/appium/appium/commit/d2f19aab935cc6ec00a51f042b5f02674a772198))
* **support:** update dependency teen_process to v2.0.10 ([bc1b56a](https://github.com/appium/appium/commit/bc1b56a3c162ed8686d3d7956c30eb1f7682b1a7))
* **support:** update dependency teen_process to v2.0.12 ([c5d6df7](https://github.com/appium/appium/commit/c5d6df7a000d64e8591a56ce5ef65baa2071a36b))
* **support:** update dependency teen_process to v2.0.13 ([a0c4b84](https://github.com/appium/appium/commit/a0c4b84fb7d3977b7a4ca0a07fadd49ee355791a))
* **support:** update dependency teen_process to v2.0.18 ([ffeebc7](https://github.com/appium/appium/commit/ffeebc74b72e5eadf658325e67708ae6ed5b8346))
* **support:** update dependency teen_process to v2.0.19 ([2ef40fe](https://github.com/appium/appium/commit/2ef40febdc717f54ea618ecfe1058b858fe2daf9))
* **support:** update dependency teen_process to v2.0.23 ([1b0459e](https://github.com/appium/appium/commit/1b0459edd656514d8706aab8e21cd4d40de2ec5d))
* **support:** update dependency teen_process to v2.0.24 ([bc72c66](https://github.com/appium/appium/commit/bc72c6676a5412b60e74bb143a223738ce059977))
* **support:** update dependency teen_process to v2.0.27 ([03b2aa6](https://github.com/appium/appium/commit/03b2aa6b6e45fa0ea24c4691b039255bc4399733))
* **support:** update dependency teen_process to v2.0.30 ([7cdb142](https://github.com/appium/appium/commit/7cdb1429a1104ad3699547f2a2dd9b237135891a))
* **support:** update dependency teen_process to v2.0.34 ([#19218](https://github.com/appium/appium/issues/19218)) ([c28fcef](https://github.com/appium/appium/commit/c28fcefa725fbce5a0464e57946051e3cb023d85))
* **support:** update dependency teen_process to v2.0.37 ([6d894be](https://github.com/appium/appium/commit/6d894bef6f377ebfdffdeb1adde7a72624844414))
* **support:** update dependency teen_process to v2.0.38 ([a32dc11](https://github.com/appium/appium/commit/a32dc1110125d0f1fac9c66c17f1309145a634c7))
* **support:** update dependency teen_process to v2.0.40 ([2837bcd](https://github.com/appium/appium/commit/2837bcdeb19532fe973a2902db5c8d730252d962))
* **support:** update dependency teen_process to v2.0.41 ([1a34396](https://github.com/appium/appium/commit/1a34396339f71d40353d323feaf78afcf2269fc9))
* **support:** update dependency teen_process to v2.0.42 ([e2a670e](https://github.com/appium/appium/commit/e2a670e1c4a0f061b0bfb08a6b534d9deb7bdd9c))
* **support:** update dependency teen_process to v2.0.45 ([ea731bf](https://github.com/appium/appium/commit/ea731bf117d680496fce453ac42cfee7f05ada60))
* **support:** update dependency teen_process to v2.0.48 ([eebc651](https://github.com/appium/appium/commit/eebc651f31c282baa7e77a6384d3ee8efc0072d6))
* **support:** update dependency teen_process to v2.0.50 ([ca3e5d9](https://github.com/appium/appium/commit/ca3e5d90e4c51fc1dda32154e1d77e65cb44fb54))
* **support:** update dependency teen_process to v2.0.9 ([6c7f3ef](https://github.com/appium/appium/commit/6c7f3ef670d441bdc4b693948a19dcbdc54e4764))
## [2.0.25](https://github.com/appium/appium/compare/@appium/doctor@2.0.24...@appium/doctor@2.0.25) (2023-08-22)
**Note:** Version bump only for package @appium/doctor
## [2.0.24](https://github.com/appium/appium/compare/@appium/doctor@2.0.23...@appium/doctor@2.0.24) (2023-08-21)
### Bug Fixes
* **doctor:** update dependency appium-adb to v9.14.5 ([d5f3a28](https://github.com/appium/appium/commit/d5f3a288c2497d4020b7eabc667814744e69ac48))
## [2.0.23](https://github.com/appium/appium/compare/@appium/doctor@2.0.22...@appium/doctor@2.0.23) (2023-08-17)
### Bug Fixes
* **doctor:** update dependency appium-adb to v9.14.4 ([#18844](https://github.com/appium/appium/issues/18844)) ([a9e86aa](https://github.com/appium/appium/commit/a9e86aabc657bf22df8b1c5f67ab93acc0ced934))
* **doctor:** update dependency inquirer to v8.2.6 ([#18940](https://github.com/appium/appium/issues/18940)) ([a8cc551](https://github.com/appium/appium/commit/a8cc551210c31b014025f7c56b091163f4d15df1))
* **test-support:** update dependency @colors/colors to v1.6.0 ([1358937](https://github.com/appium/appium/commit/1358937db2edf08ce1ebe3dff2f70ac6b07cd373))
## [2.0.22](https://github.com/appium/appium/compare/@appium/doctor@2.0.21...@appium/doctor@2.0.22) (2023-07-24)
### Bug Fixes
* **support:** update dependency teen_process to v2.0.4 ([151c19c](https://github.com/appium/appium/commit/151c19c1c3b4c9b94aba10033c2d863f567d849b))
## [2.0.21](https://github.com/appium/appium/compare/@appium/doctor@2.0.20...@appium/doctor@2.0.21) (2023-07-03)
### Bug Fixes
* **doctor:** update dependency appium-adb to v9.11.7 ([fdd2ac0](https://github.com/appium/appium/commit/fdd2ac098d1b6e0d17b1429defa0123660d85ca9))
## [2.0.20](https://github.com/appium/appium/compare/@appium/doctor@2.0.19...@appium/doctor@2.0.20) (2023-06-29)
**Note:** Version bump only for package @appium/doctor
-1
View File
@@ -3,7 +3,6 @@ import {exec} from 'teen_process';
import {DoctorCheck} from './doctor';
import NodeDetector from './node-detector';
import {util, env} from '@appium/support';
import {EOL} from 'os';
import '@colors/colors';
/**
+1 -1
View File
@@ -155,7 +155,7 @@ class OptionalApplesimutilsCommandCheck extends DoctorCheck {
async fix() {
return `Why ${
'applesimutils'.bold
} is needed and how to install it: http://appium.io/docs/en/drivers/ios-xcuitest/`;
} is needed and how to install it: https://github.com/appium/appium-xcuitest-driver/blob/master/docs/execute-methods.md#mobile-setpermission`;
}
}
checks.push(new OptionalApplesimutilsCommandCheck());
+8 -8
View File
@@ -1,6 +1,6 @@
{
"name": "@appium/doctor",
"version": "2.0.20",
"version": "2.0.27",
"description": "Test environment for fitness to run Appium",
"keywords": [
"automation",
@@ -44,16 +44,16 @@
"test:unit": "mocha \"./test/unit/**/*.spec.js\""
},
"dependencies": {
"@appium/support": "^4.1.1",
"@colors/colors": "1.5.0",
"@types/bluebird": "3.5.38",
"@types/teen_process": "2.0.0",
"appium-adb": "9.11.5",
"@appium/support": "^4.1.8",
"@colors/colors": "1.6.0",
"@types/bluebird": "3.5.41",
"@types/teen_process": "2.0.1",
"appium-adb": "11.0.1",
"bluebird": "3.7.2",
"inquirer": "8.2.5",
"inquirer": "8.2.6",
"lodash": "4.17.21",
"source-map-support": "0.5.21",
"teen_process": "2.0.2",
"teen_process": "2.0.50",
"yargs": "17.7.2"
},
"engines": {
+17 -11
View File
@@ -12,6 +12,7 @@ import * as tp from 'teen_process';
import {withMocks, stubEnv} from '@appium/test-support';
import B from 'bluebird';
import {removeColors} from './helper';
import {createSandbox} from 'sinon';
describe('android', function () {
const apkAnalyzerFilename = system.isWindows() ? 'apkanalyzer.bat' : 'apkanalyzer';
@@ -59,8 +60,17 @@ describe('android', function () {
})
);
describe(
'AndroidToolCheck',
withMocks({adb}, (mocks) => {
'AndroidToolCheck', function () {
// withMocks won't work with ESM modules: https://github.com/sinonjs/sinon/issues/2530
/** @type {sinon.SinonSandbox} */
let sandbox;
beforeEach(function () {
sandbox = createSandbox();
});
afterEach(function () {
sandbox.restore();
});
stubEnv();
const check = new AndroidToolCheck();
it('autofix', function () {
@@ -68,16 +78,13 @@ describe('android', function () {
});
it('diagnose - success', async function () {
process.env.ANDROID_HOME = '/a/b/c/d';
mocks.adb
.expects('getAndroidBinaryPath')
.exactly(check.tools.length)
.returns(B.resolve('/path/to/binary'));
sandbox.stub(adb, 'getAndroidBinaryPath')
.get(() => sandbox.fake.resolves('/path/to/binary'));
(await check.diagnose()).should.deep.equal({
ok: true,
optional: false,
message: `adb, emulator, ${apkAnalyzerFilename} exist: /a/b/c/d`,
});
mocks.verify();
});
it('diagnose - failure - no ANDROID_HOME', async function () {
delete process.env.ANDROID_HOME;
@@ -87,17 +94,16 @@ describe('android', function () {
optional: false,
message: `adb, emulator, ${apkAnalyzerFilename} could not be found because ANDROID_HOME or ANDROID_SDK_ROOT is NOT set!`,
});
mocks.verify();
});
it('diagnose - failure - path not valid', async function () {
process.env.ANDROID_HOME = '/a/b/c/d';
mocks.adb.expects('getAndroidBinaryPath').exactly(check.tools.length).throws();
sandbox.stub(adb, 'getAndroidBinaryPath')
.get(() => sandbox.fake.throws());
(await check.diagnose()).should.deep.equal({
ok: false,
optional: false,
message: `adb, emulator, ${apkAnalyzerFilename} could NOT be found in /a/b/c/d!`,
});
mocks.verify();
});
it('fix - ANDROID_HOME', async function () {
delete process.env.ANDROID_HOME;
@@ -111,7 +117,7 @@ describe('android', function () {
`Manually install adb, emulator, ${apkAnalyzerFilename} and add it to PATH. https://developer.android.com/studio#cmdline-tools and https://developer.android.com/studio/intro/update#sdk-manager may help to setup.`
);
});
})
}
);
describe(
+1 -1
View File
@@ -346,7 +346,7 @@ describe('ios', function () {
});
it('fix', async function () {
removeColors(await check.fix()).should.equal(
'Why applesimutils is needed and how to install it: http://appium.io/docs/en/drivers/ios-xcuitest/'
'Why applesimutils is needed and how to install it: https://github.com/appium/appium-xcuitest-driver/blob/master/docs/execute-methods.md#mobile-setpermission'
);
});
})
+90
View File
@@ -3,6 +3,96 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [0.4.11](https://github.com/appium/appium/compare/@appium/docutils@0.4.10...@appium/docutils@0.4.11) (2023-10-19)
### Bug Fixes
* **appium:** Make sure type definitions are always in sync across modules ([#19323](https://github.com/appium/appium/issues/19323)) ([de39013](https://github.com/appium/appium/commit/de39013ae501d4fc11988435737efb862cc1d820))
## [0.4.10](https://github.com/appium/appium/compare/@appium/docutils@0.4.9...@appium/docutils@0.4.10) (2023-10-18)
### Bug Fixes
* **docutils:** update dependency yaml to v2.3.2 ([1a3d408](https://github.com/appium/appium/commit/1a3d408e239e4a9a7070923a90aca70df1dda908))
* **docutils:** update dependency yaml to v2.3.3 ([caf600b](https://github.com/appium/appium/commit/caf600bffd5f25971d0270e9990b2640a671e366))
* **support:** update dependency teen_process to v2.0.10 ([bc1b56a](https://github.com/appium/appium/commit/bc1b56a3c162ed8686d3d7956c30eb1f7682b1a7))
* **support:** update dependency teen_process to v2.0.12 ([c5d6df7](https://github.com/appium/appium/commit/c5d6df7a000d64e8591a56ce5ef65baa2071a36b))
* **support:** update dependency teen_process to v2.0.13 ([a0c4b84](https://github.com/appium/appium/commit/a0c4b84fb7d3977b7a4ca0a07fadd49ee355791a))
* **support:** update dependency teen_process to v2.0.18 ([ffeebc7](https://github.com/appium/appium/commit/ffeebc74b72e5eadf658325e67708ae6ed5b8346))
* **support:** update dependency teen_process to v2.0.19 ([2ef40fe](https://github.com/appium/appium/commit/2ef40febdc717f54ea618ecfe1058b858fe2daf9))
* **support:** update dependency teen_process to v2.0.23 ([1b0459e](https://github.com/appium/appium/commit/1b0459edd656514d8706aab8e21cd4d40de2ec5d))
* **support:** update dependency teen_process to v2.0.24 ([bc72c66](https://github.com/appium/appium/commit/bc72c6676a5412b60e74bb143a223738ce059977))
* **support:** update dependency teen_process to v2.0.27 ([03b2aa6](https://github.com/appium/appium/commit/03b2aa6b6e45fa0ea24c4691b039255bc4399733))
* **support:** update dependency teen_process to v2.0.30 ([7cdb142](https://github.com/appium/appium/commit/7cdb1429a1104ad3699547f2a2dd9b237135891a))
* **support:** update dependency teen_process to v2.0.34 ([#19218](https://github.com/appium/appium/issues/19218)) ([c28fcef](https://github.com/appium/appium/commit/c28fcefa725fbce5a0464e57946051e3cb023d85))
* **support:** update dependency teen_process to v2.0.37 ([6d894be](https://github.com/appium/appium/commit/6d894bef6f377ebfdffdeb1adde7a72624844414))
* **support:** update dependency teen_process to v2.0.38 ([a32dc11](https://github.com/appium/appium/commit/a32dc1110125d0f1fac9c66c17f1309145a634c7))
* **support:** update dependency teen_process to v2.0.40 ([2837bcd](https://github.com/appium/appium/commit/2837bcdeb19532fe973a2902db5c8d730252d962))
* **support:** update dependency teen_process to v2.0.41 ([1a34396](https://github.com/appium/appium/commit/1a34396339f71d40353d323feaf78afcf2269fc9))
* **support:** update dependency teen_process to v2.0.42 ([e2a670e](https://github.com/appium/appium/commit/e2a670e1c4a0f061b0bfb08a6b534d9deb7bdd9c))
* **support:** update dependency teen_process to v2.0.45 ([ea731bf](https://github.com/appium/appium/commit/ea731bf117d680496fce453ac42cfee7f05ada60))
* **support:** update dependency teen_process to v2.0.48 ([eebc651](https://github.com/appium/appium/commit/eebc651f31c282baa7e77a6384d3ee8efc0072d6))
* **support:** update dependency teen_process to v2.0.50 ([ca3e5d9](https://github.com/appium/appium/commit/ca3e5d90e4c51fc1dda32154e1d77e65cb44fb54))
* **support:** update dependency teen_process to v2.0.9 ([6c7f3ef](https://github.com/appium/appium/commit/6c7f3ef670d441bdc4b693948a19dcbdc54e4764))
## [0.4.9](https://github.com/appium/appium/compare/@appium/docutils@0.4.8...@appium/docutils@0.4.9) (2023-08-23)
**Note:** Version bump only for package @appium/docutils
## [0.4.8](https://github.com/appium/appium/compare/@appium/docutils@0.4.7...@appium/docutils@0.4.8) (2023-08-22)
**Note:** Version bump only for package @appium/docutils
## [0.4.7](https://github.com/appium/appium/compare/@appium/docutils@0.4.6...@appium/docutils@0.4.7) (2023-08-21)
**Note:** Version bump only for package @appium/docutils
## [0.4.6](https://github.com/appium/appium/compare/@appium/docutils@0.4.5...@appium/docutils@0.4.6) (2023-08-17)
### Bug Fixes
* **support:** update dependency semver to v7.5.4 ([03ddcdf](https://github.com/appium/appium/commit/03ddcdfcafbccf6698868a272e499cbdac41d791))
* **types:** update dependency type-fest to v3.13.1 ([fb34ab9](https://github.com/appium/appium/commit/fb34ab917216121d2b554677a12f07a03393d218))
## [0.4.5](https://github.com/appium/appium/compare/@appium/docutils@0.4.4...@appium/docutils@0.4.5) (2023-07-24)
### Bug Fixes
* **support:** update dependency teen_process to v2.0.4 ([151c19c](https://github.com/appium/appium/commit/151c19c1c3b4c9b94aba10033c2d863f567d849b))
## [0.4.4](https://github.com/appium/appium/compare/@appium/docutils@0.4.3...@appium/docutils@0.4.4) (2023-07-03)
### Bug Fixes
* **support:** update dependency semver to v7.5.3 ([ed1856d](https://github.com/appium/appium/commit/ed1856d720c442842d5c3fe5f6caeccb8229b5f1))
## [0.4.3](https://github.com/appium/appium/compare/@appium/docutils@0.4.2...@appium/docutils@0.4.3) (2023-06-29)
+9 -9
View File
@@ -1,6 +1,6 @@
{
"name": "@appium/docutils",
"version": "0.4.3",
"version": "0.4.11",
"description": "Documentation generation utilities for Appium and related projects",
"keywords": [
"automation",
@@ -49,9 +49,9 @@
"start": "node ./build/lib/cli/index.js"
},
"dependencies": {
"@appium/support": "^4.1.1",
"@appium/tsconfig": "^0.3.0",
"@appium/typedoc-plugin-appium": "^0.6.5",
"@appium/support": "^4.1.8",
"@appium/tsconfig": "^0.x",
"@appium/typedoc-plugin-appium": "^0.x",
"@sliphua/lilconfig-ts-loader": "3.2.2",
"@types/which": "3.0.0",
"chalk": "4.1.2",
@@ -65,15 +65,15 @@
"log-symbols": "4.1.0",
"pkg-dir": "5.0.0",
"read-pkg": "5.2.0",
"semver": "7.5.1",
"semver": "7.5.4",
"source-map-support": "0.5.21",
"teen_process": "2.0.2",
"type-fest": "3.11.1",
"teen_process": "2.0.50",
"type-fest": "3.13.1",
"typedoc": "0.23.28",
"typedoc-plugin-markdown": "3.14.0",
"typedoc-plugin-resolve-crossmodule-references": "0.3.3",
"typescript": "4.9.5",
"yaml": "2.3.1",
"typescript": "5.0.4",
"yaml": "2.3.3",
"yargs": "17.7.2",
"yargs-parser": "21.1.1"
},
+3 -3
View File
@@ -1,4 +1,4 @@
mkdocs==1.4.3
mkdocs-material==9.1.15
mkdocs-material-extensions==1.1.1
mkdocs==1.5.3
mkdocs-material==9.4.6
mkdocs-material-extensions==1.3
mike==1.1.2
+72
View File
@@ -3,6 +3,78 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [0.4.16](https://github.com/appium/appium/compare/@appium/driver-test-support@0.4.15...@appium/driver-test-support@0.4.16) (2023-10-19)
### Bug Fixes
* **appium:** Make sure type definitions are always in sync across modules ([#19323](https://github.com/appium/appium/issues/19323)) ([de39013](https://github.com/appium/appium/commit/de39013ae501d4fc11988435737efb862cc1d820))
* **support:** update definitelytyped ([a306ce7](https://github.com/appium/appium/commit/a306ce741a806d21bc44f3b979803b8af5da99aa))
* **test-support:** update dependency sinon to v16.1.3 ([aaa7668](https://github.com/appium/appium/commit/aaa7668ae6d58f1ac6a5af957b9b214ee71c6a48))
## [0.4.15](https://github.com/appium/appium/compare/@appium/driver-test-support@0.4.14...@appium/driver-test-support@0.4.15) (2023-10-18)
### Bug Fixes
* **driver-test-support:** update dependency @types/lodash to v4.14.198 ([84fefd2](https://github.com/appium/appium/commit/84fefd214c40408cbbcd145723b5d8dbeec665af))
* **driver-test-support:** update dependency chai to v4.3.10 ([7a06ec5](https://github.com/appium/appium/commit/7a06ec5041e0ca4f6bf1ed9c771cb722dd707dc4))
* **driver-test-support:** update dependency chai to v4.3.8 ([#19059](https://github.com/appium/appium/issues/19059)) ([d85b216](https://github.com/appium/appium/commit/d85b2161b5b8ac8654e25c2f357de50a7068d8e1))
* **support:** update definitelytyped ([595d460](https://github.com/appium/appium/commit/595d460ac8dc41d310f9e4f653acbad3c7fd50b9))
* **support:** update dependency axios to v1.5.0 ([08913cd](https://github.com/appium/appium/commit/08913cddde295f616f0fb376cc2cb71a9409a253))
* **support:** update dependency axios to v1.5.1 ([#19217](https://github.com/appium/appium/issues/19217)) ([3df047d](https://github.com/appium/appium/commit/3df047d128d5d032826c8f5fb605b019078b717d))
* **test-support:** update dependency sinon to v16 ([#19161](https://github.com/appium/appium/issues/19161)) ([49b3434](https://github.com/appium/appium/commit/49b3434c2bc324b5dc9f8204242c12f04b5252af))
* **test-support:** update dependency sinon to v16.1.0 ([126daec](https://github.com/appium/appium/commit/126daeca4e600b75cf37f9fc15a1b6e563058b3c))
## [0.4.14](https://github.com/appium/appium/compare/@appium/driver-test-support@0.4.13...@appium/driver-test-support@0.4.14) (2023-08-22)
**Note:** Version bump only for package @appium/driver-test-support
## [0.4.13](https://github.com/appium/appium/compare/@appium/driver-test-support@0.4.12...@appium/driver-test-support@0.4.13) (2023-08-21)
### Bug Fixes
* **driver-test-support:** update dependency @types/lodash to v4.14.197 ([a080b72](https://github.com/appium/appium/commit/a080b729208b4e3c352456f0f230b63b0b7ee9ee))
## [0.4.12](https://github.com/appium/appium/compare/@appium/driver-test-support@0.4.11...@appium/driver-test-support@0.4.12) (2023-08-17)
### Bug Fixes
* **driver-test-support:** update definitelytyped ([c320e8a](https://github.com/appium/appium/commit/c320e8a1a61cb6d980d6d944ae47b60da97aa398))
* **test-support:** update dependency sinon to v15.2.0 ([a21ae6a](https://github.com/appium/appium/commit/a21ae6ab2bcaba44ecdacae67076cf011b4e5ae8))
* **types:** update dependency type-fest to v3.13.1 ([fb34ab9](https://github.com/appium/appium/commit/fb34ab917216121d2b554677a12f07a03393d218))
## [0.4.11](https://github.com/appium/appium/compare/@appium/driver-test-support@0.4.10...@appium/driver-test-support@0.4.11) (2023-07-24)
### Bug Fixes
* **test-support:** update dependency sinon to v15.1.2 ([e5b569c](https://github.com/appium/appium/commit/e5b569c3a0a0545210f126822031420d236ad1f4))
## [0.4.10](https://github.com/appium/appium/compare/@appium/driver-test-support@0.4.9...@appium/driver-test-support@0.4.10) (2023-07-03)
**Note:** Version bump only for package @appium/driver-test-support
## [0.4.9](https://github.com/appium/appium/compare/@appium/driver-test-support@0.4.8...@appium/driver-test-support@0.4.9) (2023-06-29)
**Note:** Version bump only for package @appium/driver-test-support
+46 -18
View File
@@ -5,9 +5,10 @@ import B from 'bluebird';
import {TEST_HOST, getTestPort, createAppiumURL} from './helpers';
import chai from 'chai';
import sinon from 'sinon';
import { Agent } from 'node:http';
import {Agent} from 'node:http';
const should = chai.should();
const {expect} = chai;
/**
* Creates some helper functions for E2E tests to manage sessions.
@@ -150,7 +151,7 @@ export function driverE2ETestSuite(DriverClass, defaultCaps = {}) {
describe('session handling', function () {
it('should handle idempotency while creating sessions', async function () {
// workaround for https://github.com/node-fetch/node-fetch/issues/1735
const httpAgent = new Agent({ keepAlive: true });
const httpAgent = new Agent({keepAlive: true});
const sessionIds = [];
let times = 0;
@@ -179,7 +180,7 @@ export function driverE2ETestSuite(DriverClass, defaultCaps = {}) {
it('should handle idempotency while creating parallel sessions', async function () {
// workaround for https://github.com/node-fetch/node-fetch/issues/1735
const httpAgent = new Agent({ keepAlive: true });
const httpAgent = new Agent({keepAlive: true});
const reqs = [];
let times = 0;
@@ -400,22 +401,49 @@ export function driverE2ETestSuite(DriverClass, defaultCaps = {}) {
});
describe('event timings', function () {
it('should not add timings if not using opt-in cap', async function () {
const session = await startSession({capabilities: {alwaysMatch: defaultCaps}});
const res = await getSession(session.sessionId);
should.not.exist(res.events);
await endSession(session.sessionId);
/** @type {NewSessionResponse} */
let session;
/** @type {SingularSessionData} */
let res;
describe('when not provided the eventTimings cap', function () {
before(async function () {
session = await startSession({capabilities: {alwaysMatch: defaultCaps}});
res = await getSession(session.sessionId);
});
after(async function () {
if (session) {
await endSession(session.sessionId);
}
});
it('should not respond with events', function () {
expect(res.events).to.be.undefined;
});
});
it('should add start session timings', async function () {
const caps = {...defaultCaps, 'appium:eventTimings': true};
const session = await startSession({capabilities: {alwaysMatch: caps}});
const res = await getSession(session.sessionId);
should.exist(res.events);
should.exist(res.events?.newSessionRequested);
should.exist(res.events?.newSessionStarted);
res.events?.newSessionRequested[0].should.be.a('number');
res.events?.newSessionStarted[0].should.be.a('number');
await endSession(session.sessionId);
describe('when provided the eventTimings cap', function () {
before(async function () {
session = await startSession({
capabilities: {alwaysMatch: {...defaultCaps, 'appium:eventTimings': true}},
});
res = await getSession(session.sessionId);
});
after(async function () {
if (session) {
await endSession(session.sessionId);
}
});
it('should add a newSessionRequested event', function () {
expect(res.events?.newSessionRequested?.[0]).to.be.a('number');
});
it('should add a newSessionStarted event', function () {
expect(res.events?.newSessionRequested?.[0]).to.be.a('number');
});
});
});
});
+8 -8
View File
@@ -1,6 +1,6 @@
{
"name": "@appium/driver-test-support",
"version": "0.4.9",
"version": "0.4.16",
"description": "Test utilities for Appium drivers",
"keywords": [
"automation",
@@ -41,18 +41,18 @@
},
"types": "./build/lib/index.d.ts",
"dependencies": {
"@appium/types": "^0.13.1",
"@types/lodash": "4.14.195",
"@types/stoppable": "1.1.1",
"axios": "1.4.0",
"@appium/types": "^0.14.1",
"@types/lodash": "4.14.200",
"@types/stoppable": "1.1.2",
"axios": "1.5.1",
"bluebird": "3.7.2",
"chai": "4.3.7",
"chai": "4.3.10",
"get-port": "5.1.1",
"lodash": "4.17.21",
"sinon": "15.1.0",
"sinon": "16.1.3",
"source-map-support": "0.5.21",
"stoppable": "1.1.0",
"type-fest": "3.11.1"
"type-fest": "3.13.1"
},
"peerDependencies": {
"appium": "^2.0.0-beta.43",
@@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [0.3.2](https://github.com/appium/appium/compare/@appium/eslint-config-appium-ts@0.3.1...@appium/eslint-config-appium-ts@0.3.2) (2023-10-18)
**Note:** Version bump only for package @appium/eslint-config-appium-ts
## [0.3.1](https://github.com/appium/appium/compare/@appium/eslint-config-appium-ts@0.3.0...@appium/eslint-config-appium-ts@0.3.1) (2023-04-03)
**Note:** Version bump only for package @appium/eslint-config-appium-ts
+4 -1
View File
@@ -58,7 +58,10 @@ module.exports = {
* want to be replaced with `import()` (I am not sure if there's a rule about that?). **If this check fails**, disable the rule for the particular line.
*/
'@typescript-eslint/no-var-requires': 'error',
// 'no-unused-vars': 'off',
/**
* Sometimes we want unused variables to be present in base class method declarations.
*/
'@typescript-eslint/no-unused-vars': 'warn',
/**
* Allow native `Promise`s. **This overrides `@appium/eslint-config-appium`.**
* @remarks Originally, this was so that we could use [bluebird](https://npm.im/bluebird)
@@ -1,6 +1,6 @@
{
"name": "@appium/eslint-config-appium-ts",
"version": "0.3.1",
"version": "0.3.2",
"description": "Shared ESLint config for Appium projects (TypeScript version)",
"keywords": [
"eslint",
@@ -29,10 +29,10 @@
},
"peerDependencies": {
"@appium/eslint-config-appium": "^8.0.0",
"@typescript-eslint/eslint-plugin": "^5.5.0",
"@typescript-eslint/parser": "^5.5.0",
"@typescript-eslint/eslint-plugin": "^5.5.0 || ^6.0.0",
"@typescript-eslint/parser": "^5.5.0 || ^6.0.0",
"eslint": "^8.21.0",
"eslint-config-prettier": "^8.5.0",
"eslint-config-prettier": "^8.5.0 || ^9.0.0",
"eslint-import-resolver-typescript": "^3.5.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-mocha": "^10.1.0",
@@ -3,6 +3,23 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [8.0.5](https://github.com/appium/appium/compare/@appium/eslint-config-appium@8.0.4...@appium/eslint-config-appium@8.0.5) (2023-10-18)
**Note:** Version bump only for package @appium/eslint-config-appium
## [8.0.4](https://github.com/appium/appium/compare/@appium/eslint-config-appium@8.0.3...@appium/eslint-config-appium@8.0.4) (2023-07-03)
### Bug Fixes
* **eslint-config-appium:** remove prototype assignment warning ([679865e](https://github.com/appium/appium/commit/679865ed2f1df59baef8c4d884b0a63a9222940e))
## [8.0.3](https://github.com/appium/appium/compare/@appium/eslint-config-appium@8.0.2...@appium/eslint-config-appium@8.0.3) (2023-04-03)
**Note:** Version bump only for package @appium/eslint-config-appium
-12
View File
@@ -91,18 +91,6 @@ module.exports = {
'require-atomic-updates': 0,
'no-prototype-builtins': 1,
'no-redeclare': 1,
'no-restricted-syntax': [
'warn',
{
selector: 'AssignmentExpression[left.object.property.name="prototype"]',
message: 'Avoid assignment to prototype; use class fields, methods or mixins instead.',
},
{
selector:
'CallExpression[callee.object.name="Object"][callee.property.name="assign"][arguments.0.property.name="prototype"]',
message: 'Avoid assignment to prototype; use class fields, methods or mixins instead.',
},
],
},
overrides: [
/**
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@appium/eslint-config-appium",
"version": "8.0.3",
"version": "8.0.5",
"description": "Shared ESLint config for Appium projects",
"keywords": [
"eslint",
@@ -31,7 +31,7 @@
},
"peerDependencies": {
"eslint": "^8.21.0",
"eslint-config-prettier": "^8.5.0",
"eslint-config-prettier": "^8.5.0 || ^9.0.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-mocha": "^10.1.0",
"eslint-plugin-promise": "^6.0.0"
@@ -3,6 +3,74 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [3.0.19](https://github.com/appium/appium/compare/@appium/execute-driver-plugin@3.0.18...@appium/execute-driver-plugin@3.0.19) (2023-10-19)
### Bug Fixes
* **support:** update definitelytyped ([a306ce7](https://github.com/appium/appium/commit/a306ce741a806d21bc44f3b979803b8af5da99aa))
## [3.0.18](https://github.com/appium/appium/compare/@appium/execute-driver-plugin@3.0.17...@appium/execute-driver-plugin@3.0.18) (2023-10-18)
### Bug Fixes
* **execute-driver-plugin:** update dependency webdriverio to v8.15.10 ([545576a](https://github.com/appium/appium/commit/545576a740265284e154a9dcc82a225d3cd3481f))
* **execute-driver-plugin:** update dependency webdriverio to v8.15.6 ([0830fd8](https://github.com/appium/appium/commit/0830fd8257b0d4674ea5af45689a7a5a2610ee74))
* **execute-driver-plugin:** update dependency webdriverio to v8.15.8 ([b510fad](https://github.com/appium/appium/commit/b510fad303472e6de6a656f40b7d87bd64e62685))
* **execute-driver-plugin:** update dependency webdriverio to v8.15.9 ([427bc8e](https://github.com/appium/appium/commit/427bc8eb0c374ecd4d53eb4fdad4b32c2bfffd00))
* **execute-driver-plugin:** update dependency webdriverio to v8.16.0 ([207700b](https://github.com/appium/appium/commit/207700bc829b8aa19bc46b0952e7b2f890ea8c90))
* **execute-driver-plugin:** update dependency webdriverio to v8.16.10 ([48be0f8](https://github.com/appium/appium/commit/48be0f83b05f465f9e422496dbac7e63767fa5f5))
* **execute-driver-plugin:** update dependency webdriverio to v8.16.11 ([cef37d3](https://github.com/appium/appium/commit/cef37d3ee3aba2d93773d159f58d895e5fd6c17e))
* **execute-driver-plugin:** update dependency webdriverio to v8.16.12 ([34d978e](https://github.com/appium/appium/commit/34d978e8504ac5e7f3b302641272676c7e0949ef))
* **execute-driver-plugin:** update dependency webdriverio to v8.16.15 ([2281e11](https://github.com/appium/appium/commit/2281e1102826e4c03eb98f6d8b5b0630bd7ed795))
* **execute-driver-plugin:** update dependency webdriverio to v8.16.17 ([f3614ad](https://github.com/appium/appium/commit/f3614adbde76c4ab98fd1dbfa9207fdfe84c7377))
* **execute-driver-plugin:** update dependency webdriverio to v8.16.18 ([5d172a5](https://github.com/appium/appium/commit/5d172a58bd40a66f605ab3eaaf55d54dd895fb22))
* **execute-driver-plugin:** update dependency webdriverio to v8.16.2 ([2d3c5cd](https://github.com/appium/appium/commit/2d3c5cd0b721074e6f7bbadc958bb8d27e9254ac))
* **execute-driver-plugin:** update dependency webdriverio to v8.16.20 ([11926d4](https://github.com/appium/appium/commit/11926d4d39c521b88502f3fab770d8917f3f9144))
* **execute-driver-plugin:** update dependency webdriverio to v8.16.22 ([8c7225d](https://github.com/appium/appium/commit/8c7225d4e94a0042ebf56ca9d758205c2f1a4083))
* **execute-driver-plugin:** update dependency webdriverio to v8.16.3 ([d1a4932](https://github.com/appium/appium/commit/d1a493240973e41645a43a44f3cebe82d514b5b2))
* **execute-driver-plugin:** update dependency webdriverio to v8.16.4 ([fea8f85](https://github.com/appium/appium/commit/fea8f8537defd16053fba5623dace4f27a8aaa1f))
* **execute-driver-plugin:** update dependency webdriverio to v8.16.5 ([862225c](https://github.com/appium/appium/commit/862225c1d8473e175aa793bda943056359369338))
* **execute-driver-plugin:** update dependency webdriverio to v8.16.6 ([7625218](https://github.com/appium/appium/commit/7625218c221c45b6179fc1dcf2103045e4c22718))
* **execute-driver-plugin:** update dependency webdriverio to v8.16.7 ([4b09c32](https://github.com/appium/appium/commit/4b09c323d9da65f0631d150e2a402c791ec36f3d))
* **execute-driver-plugin:** update dependency webdriverio to v8.17.0 ([#19277](https://github.com/appium/appium/issues/19277)) ([f52a23c](https://github.com/appium/appium/commit/f52a23c6866b7352e1eb53ed6e737d22c81ccc34))
* **opencv:** update definitelytyped ([d2a9a99](https://github.com/appium/appium/commit/d2a9a99418af9ce9b569bb9b98ee396faab932bb))
* **support:** update definitelytyped ([b6a76ce](https://github.com/appium/appium/commit/b6a76ce91e2765c22f84e389b93f780e0b4490c0))
* **tsconfig:** update dependency @tsconfig/node14 to v14 ([#19082](https://github.com/appium/appium/issues/19082)) ([65b3787](https://github.com/appium/appium/commit/65b3787912a4948fb1ed48e8095299bc9ba95844))
## [3.0.17](https://github.com/appium/appium/compare/@appium/execute-driver-plugin@3.0.16...@appium/execute-driver-plugin@3.0.17) (2023-08-22)
### Bug Fixes
* **execute-driver-plugin:** update dependency webdriverio to v7.32.4 ([4e4eaad](https://github.com/appium/appium/commit/4e4eaad6b68386e900427aafd9afd19f43033bda))
* **execute-driver-plugin:** update dependency webdriverio to v8 ([#18095](https://github.com/appium/appium/issues/18095)) ([b608db9](https://github.com/appium/appium/commit/b608db91a8ef0e3cad43ce3e14b625bf9234d383))
## [3.0.16](https://github.com/appium/appium/compare/@appium/execute-driver-plugin@3.0.15...@appium/execute-driver-plugin@3.0.16) (2023-08-17)
### Bug Fixes
* **execute-driver-plugin:** update dependency webdriverio to v7.32.3 ([9a5c9ae](https://github.com/appium/appium/commit/9a5c9ae55c97ea3e5c604ecbc3f972480d091ba9))
## [3.0.15](https://github.com/appium/appium/compare/@appium/execute-driver-plugin@3.0.14...@appium/execute-driver-plugin@3.0.15) (2023-07-24)
### Bug Fixes
* **execute-driver-plugin:** update dependency webdriverio to v7.32.0 ([b9151a5](https://github.com/appium/appium/commit/b9151a573b6a8b0a5194658882ad59cca1a5f8b5))
## [3.0.14](https://github.com/appium/appium/compare/@appium/execute-driver-plugin@3.0.13...@appium/execute-driver-plugin@3.0.14) (2023-06-14)
@@ -89,7 +89,7 @@ function coerceScriptResult(obj) {
} catch (e) {
log.warn(
'Could not convert executeDriverScript to safe response!' +
`Result was: ${JSON.stringify(obj)}. Will make it null`
`Result was: ${JSON.stringify(obj)}. Will make it null`,
);
return null;
}
+8 -6
View File
@@ -67,12 +67,14 @@ export default class ExecuteDriverPlugin extends BasePlugin {
const driverOpts = {
sessionId: driver.sessionId,
// Appium probably won't be behind ssl locally; if it ever is, might need to update this to
// provide a user configurable parameter
protocol: 'http',
hostname: driver.serverHost,
port: driver.serverPort,
path: driver.serverPath,
options: {
// Appium probably won't be behind ssl locally; if it ever is, might need to update this to
// provide a user configurable parameter
protocol: 'http',
hostname: driver.serverHost,
port: driver.serverPort,
path: driver.serverPath,
},
isW3C: true,
isMobile: true,
capabilities: driver.caps,
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@appium/execute-driver-plugin",
"version": "3.0.14",
"version": "3.0.19",
"description": "Plugin for batching and executing driver commands with Appiums",
"keywords": [
"automation",
@@ -38,12 +38,12 @@
"test:unit": "mocha \"./test/unit/**/*.spec.js\""
},
"dependencies": {
"@types/bluebird": "3.5.38",
"@types/bluebird": "3.5.41",
"bluebird": "3.7.2",
"lodash": "4.17.21",
"source-map-support": "0.5.21",
"vm2": "3.9.19",
"webdriverio": "7.31.1"
"webdriverio": "8.17.0"
},
"peerDependencies": {
"appium": "^2.0.0-beta.35"
+2 -1
View File
@@ -1,7 +1,8 @@
{
"compilerOptions": {
"outDir": "build",
"checkJs": true
"checkJs": true,
"moduleResolution": "node10"
},
"extends": "@appium/tsconfig/tsconfig.plugin.json",
"include": ["lib"]
+47
View File
@@ -3,6 +3,53 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [5.2.10](https://github.com/appium/appium/compare/@appium/fake-driver@5.2.9...@appium/fake-driver@5.2.10) (2023-10-19)
### Bug Fixes
* **support:** update definitelytyped ([a306ce7](https://github.com/appium/appium/commit/a306ce741a806d21bc44f3b979803b8af5da99aa))
## [5.2.9](https://github.com/appium/appium/compare/@appium/fake-driver@5.2.8...@appium/fake-driver@5.2.9) (2023-10-18)
### Bug Fixes
* **images-plugin:** update dependency lru-cache to v10 ([#19050](https://github.com/appium/appium/issues/19050)) ([72a806b](https://github.com/appium/appium/commit/72a806bec7c3a80747192d24dfd9d8286a751810))
* **opencv:** update definitelytyped ([d2a9a99](https://github.com/appium/appium/commit/d2a9a99418af9ce9b569bb9b98ee396faab932bb))
* **support:** update definitelytyped ([b6a76ce](https://github.com/appium/appium/commit/b6a76ce91e2765c22f84e389b93f780e0b4490c0))
## [5.2.8](https://github.com/appium/appium/compare/@appium/fake-driver@5.2.7...@appium/fake-driver@5.2.8) (2023-08-21)
### Bug Fixes
* **universal-xml-plugin:** update dependency xpath to v0.0.33 ([#18952](https://github.com/appium/appium/issues/18952)) ([f2cff24](https://github.com/appium/appium/commit/f2cff24685e96578f17549454de7b7931c13df83))
## [5.2.7](https://github.com/appium/appium/compare/@appium/fake-driver@5.2.6...@appium/fake-driver@5.2.7) (2023-08-17)
### Bug Fixes
* **universal-xml-plugin:** update dependency @xmldom/xmldom to v0.8.10 ([#18949](https://github.com/appium/appium/issues/18949)) ([12147d5](https://github.com/appium/appium/commit/12147d518fc3ac86b01c3401b9e462b5dca99ca4))
## [5.2.6](https://github.com/appium/appium/compare/@appium/fake-driver@5.2.5...@appium/fake-driver@5.2.6) (2023-07-03)
### Bug Fixes
* **types:** separate the type of opts from initialOpts ([d6cca51](https://github.com/appium/appium/commit/d6cca5175c3e55d4670936c9d216cd3a6610d16b))
## [5.2.5](https://github.com/appium/appium/compare/@appium/fake-driver@5.2.4...@appium/fake-driver@5.2.5) (2023-06-15)
@@ -73,7 +73,7 @@ const ContextsMixin: FakeDriverContextsMixin = {
this.appModel.deactivateFrame();
} else {
const nodes = this.appModel.xpathQuery(`//iframe[@id="${frameId}"]`);
if (!nodes.length) {
if (!_.isArray(nodes) || _.isEmpty(nodes)) {
throw new errors.NoSuchFrameError();
}
this.appModel.activateFrame(nodes[0]);
+3 -3
View File
@@ -1,6 +1,5 @@
import B from 'bluebird';
import {BaseDriver, errors} from 'appium/driver';
import {deprecatedCommandsLogged} from '@appium/base-driver/build/lib/protocol/protocol';
import {FakeApp} from './fake-app';
const FAKE_DRIVER_CONSTRAINTS = /** @type {const} */ ({
@@ -55,7 +54,7 @@ export class FakeDriver extends BaseDriver {
elMap;
constructor(
opts = /** @type {import('@appium/types').DriverOpts<FakeDriverConstraints>} */ ({}),
opts = /** @type {import('@appium/types').InitialOpts} */ ({}),
shouldValidateCaps = true
) {
super(opts, shouldValidateCaps);
@@ -167,7 +166,8 @@ export class FakeDriver extends BaseDriver {
*/
async getDeprecatedCommandsCalled() {
await B.delay(1);
return Array.from(deprecatedCommandsLogged);
// TODO: Properly get deprecatedCommandsLogged list from the base-driver
return [];
}
/**
+10 -3
View File
@@ -4,6 +4,7 @@ import path from 'path';
import XMLDom from '@xmldom/xmldom';
import xpath from 'xpath';
import log from './logger';
import _ from 'lodash';
import {FakeElement} from './fake-element';
const SCREENSHOT = path.join(__dirname, 'screen.png');
@@ -28,7 +29,7 @@ export class FakeApp {
get title() {
let nodes = this.xpathQuery('//title');
if (nodes.length < 1) {
if (!_.isArray(nodes) || nodes.length < 1) {
throw new Error('No title!');
}
const node = /** @type {Node} */ (nodes[0]);
@@ -75,6 +76,11 @@ export class FakeApp {
setDims() {
const nodes = this.xpathQuery('//app');
if (!_.isArray(nodes)) {
throw new Error(
'Cannot fetch app dimensions because no corresponding node has benn found in the source'
);
}
const app = new FakeElement(nodes[0], this);
this._width = parseInt(app.nodeAttrs.width, 10);
this._height = parseInt(app.nodeAttrs.height, 10);
@@ -93,7 +99,8 @@ export class FakeApp {
}
getWebviews() {
return this.xpathQuery('//MockWebView/*[1]').map((n) => new FakeWebView(n));
const nodes = this.xpathQuery('//MockWebView/*[1]');
return _.isArray(nodes) ? nodes.map((n) => new FakeWebView(n)) : [];
}
activateWebview(wv) {
@@ -153,7 +160,7 @@ export class FakeApp {
showAlert(alertId) {
let nodes = this.xpathQuery(`//alert[@id="${alertId}"]`);
if (nodes.length < 1) {
if (!_.isArray(nodes) || _.isEmpty(nodes)) {
throw new Error(`Alert ${alertId} doesn't exist!`);
}
this.activeAlert = new FakeElement(nodes[0], this);
+4 -4
View File
@@ -1,6 +1,6 @@
{
"name": "@appium/fake-driver",
"version": "5.2.5",
"version": "5.2.10",
"description": "Mock driver used internally by Appium for testing. Ignore",
"keywords": [
"automation",
@@ -46,13 +46,13 @@
"test:unit": "mocha --timeout 10s --slow 5s \"./test/unit/**/*.spec.js\""
},
"dependencies": {
"@types/bluebird": "3.5.38",
"@xmldom/xmldom": "0.8.8",
"@types/bluebird": "3.5.41",
"@xmldom/xmldom": "0.8.10",
"asyncbox": "2.9.4",
"bluebird": "3.7.2",
"lodash": "4.17.21",
"source-map-support": "0.5.21",
"xpath": "0.0.32"
"xpath": "0.0.33"
},
"peerDependencies": {
"appium": "^2.0.0-beta.35"
@@ -131,7 +131,7 @@ function generalTests() {
it('should throw an error if a required overload param is missing', async function () {
await driver
.executeScript('fake: addition', [{num3: 4}])
.should.be.rejectedWith(/Parameters were incorrect/);
.should.be.rejectedWith(/required parameters are missing/);
});
it('should throw an error if sending in wrong types of params', async function () {
+67
View File
@@ -3,6 +3,73 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [3.1.26](https://github.com/appium/appium/compare/@appium/fake-plugin@3.1.25...@appium/fake-plugin@3.1.26) (2023-10-19)
### Bug Fixes
* **support:** update definitelytyped ([a306ce7](https://github.com/appium/appium/commit/a306ce741a806d21bc44f3b979803b8af5da99aa))
## [3.1.25](https://github.com/appium/appium/compare/@appium/fake-plugin@3.1.24...@appium/fake-plugin@3.1.25) (2023-10-18)
### Bug Fixes
* **opencv:** update definitelytyped ([d2a9a99](https://github.com/appium/appium/commit/d2a9a99418af9ce9b569bb9b98ee396faab932bb))
* **support:** update definitelytyped ([b6a76ce](https://github.com/appium/appium/commit/b6a76ce91e2765c22f84e389b93f780e0b4490c0))
## [3.1.24](https://github.com/appium/appium/compare/@appium/fake-plugin@3.1.23...@appium/fake-plugin@3.1.24) (2023-08-23)
**Note:** Version bump only for package @appium/fake-plugin
## [3.1.23](https://github.com/appium/appium/compare/@appium/fake-plugin@3.1.22...@appium/fake-plugin@3.1.23) (2023-08-22)
**Note:** Version bump only for package @appium/fake-plugin
## [3.1.22](https://github.com/appium/appium/compare/@appium/fake-plugin@3.1.21...@appium/fake-plugin@3.1.22) (2023-08-21)
**Note:** Version bump only for package @appium/fake-plugin
## [3.1.21](https://github.com/appium/appium/compare/@appium/fake-plugin@3.1.20...@appium/fake-plugin@3.1.21) (2023-08-17)
**Note:** Version bump only for package @appium/fake-plugin
## [3.1.20](https://github.com/appium/appium/compare/@appium/fake-plugin@3.1.19...@appium/fake-plugin@3.1.20) (2023-07-24)
**Note:** Version bump only for package @appium/fake-plugin
## [3.1.19](https://github.com/appium/appium/compare/@appium/fake-plugin@3.1.18...@appium/fake-plugin@3.1.19) (2023-07-03)
**Note:** Version bump only for package @appium/fake-plugin
## [3.1.18](https://github.com/appium/appium/compare/@appium/fake-plugin@3.1.17...@appium/fake-plugin@3.1.18) (2023-06-29)
**Note:** Version bump only for package @appium/fake-plugin
+4 -4
View File
@@ -1,6 +1,6 @@
{
"name": "@appium/fake-plugin",
"version": "3.1.18",
"version": "3.1.26",
"description": "A fake Appium 2.0 plugin",
"keywords": [
"automation",
@@ -39,9 +39,9 @@
"test:unit": "mocha \"./test/unit/**/*.spec.js\""
},
"dependencies": {
"@appium/base-plugin": "^2.2.14",
"@appium/support": "^4.1.1",
"@types/bluebird": "3.5.38",
"@appium/base-plugin": "^2.2.22",
"@appium/support": "^4.1.8",
"@types/bluebird": "3.5.41",
"bluebird": "3.7.2",
"lodash": "4.17.21",
"source-map-support": "0.5.21"
+33
View File
@@ -3,6 +3,39 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [2.1.6](https://github.com/appium/appium/compare/@appium/images-plugin@2.1.5...@appium/images-plugin@2.1.6) (2023-10-19)
**Note:** Version bump only for package @appium/images-plugin
## [2.1.5](https://github.com/appium/appium/compare/@appium/images-plugin@2.1.4...@appium/images-plugin@2.1.5) (2023-10-18)
### Bug Fixes
* **images-plugin:** update dependency lru-cache to v10 ([#19050](https://github.com/appium/appium/issues/19050)) ([72a806b](https://github.com/appium/appium/commit/72a806bec7c3a80747192d24dfd9d8286a751810))
## [2.1.4](https://github.com/appium/appium/compare/@appium/images-plugin@2.1.3...@appium/images-plugin@2.1.4) (2023-08-21)
**Note:** Version bump only for package @appium/images-plugin
## [2.1.3](https://github.com/appium/appium/compare/@appium/images-plugin@2.1.2...@appium/images-plugin@2.1.3) (2023-08-17)
**Note:** Version bump only for package @appium/images-plugin
## [2.1.2](https://github.com/appium/appium/compare/@appium/images-plugin@2.1.1...@appium/images-plugin@2.1.2) (2023-06-14)
@@ -98,7 +98,7 @@ assert File.size? 'find_result_visual.png'
The image must have the same scale and look the same. However, you can add a scaling transformation beforehand.
official doc:
https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/image-comparison.md
https://github.com/appium/appium/blob/master/packages/images-plugin/docs/image-comparison.md
OpenCV algorithm doc:
https://docs.opencv.org/2.4/doc/tutorials/imgproc/histograms/template_matching/template_matching.html
official sample code:
+2 -2
View File
@@ -1,5 +1,5 @@
import _ from 'lodash';
import LRU from 'lru-cache';
import { LRUCache } from 'lru-cache';
import {errors} from 'appium/driver';
import {ImageElement} from './image-element';
import {compareImages} from './compare';
@@ -41,7 +41,7 @@ export default class ImageElementFinder {
* @param {number} max
*/
constructor(max = MAX_CACHE_ITEMS) {
this._imgElCache = new LRU({
this._imgElCache = new LRUCache({
ttl: MAX_CACHE_AGE_MS,
updateAgeOnGet: true,
max,

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