Commit Graph
293 Commits
Author SHA1 Message Date
JustasM 33d866e575 fix(base-driver): clean up aborted session creation (#22733) 2026-09-16 17:55:53 +02:00
Giorgio Boa 0b104f6bf9 feat(appium): add --app-url-rules server arg to restrict remote app URLs (#22753) 2026-09-16 17:51:48 +02:00
Edgars Eglītis 93115d1957 feat(base-driver)!: align timeouts endpoints closer to W3C standard (#22776)
* feat!: align timeouts endpoints closer to W3C standard

* chore: remove unnecessary wrappers
2026-09-14 22:57:53 +03:00
Mykola Mokhnach ac01aa83ad feat(base-driver): add definitions for all WebDriver BiDi commands (#22770) 2026-09-14 08:32:02 +02:00
Mykola Mokhnach 0e91fb756b fix(base-driver)!: don't implicitly allow sessionId/id params in bidi commands (#22771)
BREAKING CHANGE: PayloadParams['validate'] no longer receives a protocol argument; its signature is now (obj: any) => boolean | string | undefined. No implementation in this repo used the second argument.
2026-09-13 22:18:30 +02:00
Mykola Mokhnach 8b62a7971a fix(base-driver): improve bidi command param validation and error messages (#22769) 2026-09-13 18:28:04 +02:00
Mykola Mokhnach 33def2cc0b refactor(base-driver)!: split basedriver helpers into a barrel (#22764)
BREAKING CHANGE: Removed the deprecated sessionId argument from generateDriverLogPrefix helper
2026-09-12 13:17:40 +02:00
Edgars Eglītis b7b09f750f chore!: cleanup remaining code for removed JSONWP/MJSONWP methods (#22765)
BREAKING CHANGE: types for the following commands have been removed: `getGeoLocation`, `setGeoLocation`, `getNetworkConnection`, `setNetworkConnection`. The `Location` type has also been removed.
2026-09-12 14:13:24 +03:00
Edgars Eglītis b129cbbcd5 fix: adjust deprecated JSONWP/MJSONWP routes (#22763)
* fix: adjust deprecated JSONWP/MJSONWP routes

* fix: add back geolocation routes for fake-driver

* test: update snapshot
2026-09-12 11:52:52 +03:00
Mykola Mokhnach 74d1ee6d17 feat(base-driver)!: remove deprecated JSONWP/MJSONWP routes (#22757)
BREAKING CHANGE: Dropped APIs: receive_async_response, element/:elementId GET stub, IME endpoints, orientation, location (geolocation), context/contexts, network_connection, and rotation.
BREAKING CHANGE: Dropped the allowCrossDomainAsyncExecute middleware + its dedicated test suite, which existed solely to CORS-enable the now-removed receive_async_response endpoint.
2026-09-11 14:13:33 +02:00
Mykola Mokhnach ff458d7cac refactor(base-driver): split protocol.ts into focused modules (#22750) 2026-09-10 18:39:09 +02:00
Mykola Mokhnach 6323df1d73 feat: backport diff from master (#22749) 2026-09-10 18:31:23 +02:00
Mykola Mokhnach 506bfeeb9a refactor(base-driver)!: replace command mixin with explicit named exports (#22741)
BREAKING CHANGE: @appium/base-driver's default export (BaseDriver) and @appium/base-driver's basedriver/helpers.js default export are removed; use the named exports instead. The appium/driver.js and driver.d.ts re-exports of the default are removed accordingly.
BREAKING CHANGE: BaseDriver.reset() is removed; it was unused, not part of any protocol route or the Driver interface, and had no callers in this monorepo or any driver package that was checked.
BREAKING CHANGE: BaseDriver's constructor is removed in favor of inherited DriverCore construction; opts is no longer a required constructor argument (it now defaults to {}, matching DriverCore).
2026-09-07 20:58:00 +02:00
Mykola Mokhnach add1615607 refactor(support)!: replace glob package with native node:fs glob (#22735)
BREAKING CHANGE: @appium/support's fs.glob option shape changed from the glob package's GlobOptions to a smaller, @appium/support-owned GlobOptions interface. Supported fields: cwd, withFileTypes, absolute, lazy. Options like nodir/ignore/nocase are no longer supported directly — callers needing directory filtering can pass withFileTypes: true and filter on .isFile()/.isDirectory(); callers needing path exclusion can filter the returned array by pattern.
2026-09-07 17:38:56 +02:00
Mykola Mokhnach db72249873 refactor(base-driver)!: remove deprecated multi-argument createSession overload (#22730)
BREAKING CHANGE: ISessionHandler.createSession (@appium/types) and LegacyCreateSessionArgs — overload and type deleted, single-argument signature only.
BREAKING CHANGE: BaseDriver.createSession and AppiumDriver.createSession — collapsed to the single-argument mplementation; capability validation now checks the one argument directly instead of scanning three positions for the first W3C-shaped value.
BREAKING CHANGE: FakeDriver.createSession (and the base-driver e2e test double) — overrides updated to match.
BREAKING CHANGE: RelaxedCapsPlugin.createSession — this plugin existed specifically to normalize capabilities across the (now-gone) three positions; its hook is simplified to a single caps argument.
BREAKING CHANGE: POST /session wire route (w3c.ts) — payloadParams.optional no longer sends capabilities three times into the command args.
2026-09-05 16:31:00 +02:00
Mykola Mokhnach f71d980779 refactor(base-driver)!: remove deprecated getSession command (#22725)
BREAKING CHANGE: BaseDriver.getSession, ISessionHandler.getSession, and the GET /session/:sessionId JSONWP route are gone. Use getAppiumSessionCapabilities to retrieve session capabilities and EventCommands.getLogEvents to retrieve event history instead.
BREAKING CHANGE: The appium:eventTimings capability is removed; it only ever controlled whether getSession's response was decorated with event history, which getLogEvents already exposes unconditionally.
2026-09-05 12:33:19 +02:00
Mykola Mokhnach ef8a8e1934 refactor!: remove deprecated driverData mechanism (#22716)
BREAKING CHANGE: Core.driverData, DriverData, and the driverData parameter on ISessionHandler.createSession/deleteSession are gone. Any driver overriding get driverData() or relying on the umbrella driver passing sibling-session data into createSession/deleteSession needs to migrate off this mechanism.
BREAKING CHANGE: FakeDriver no longer supports the uniqueApp capability.
2026-09-04 21:24:49 +02:00
Mykola Mokhnach 8b7bf30d43 fix(base-driver)!: map timeout and script timeout errors to HTTP 500 (#22686)
BREAKING CHANGE: Changes HTTP return codes for TimeoutError and ScriptTimeoutError from 408 to 500
2026-08-31 21:07:03 +02:00
Mykola Mokhnach 0b83e77e7a feat(base-driver)!: remove legacy (M)JSONWP protocol support (#22681)
BREAKING CHANGE: @appium/base-driver no longer exports statusCodes or getSummaryByCode (the jsonwp-status module was removed).
BREAKING CHANGE: errorFromMJSONWPStatusCode (aliased as errorFromCode) has been removed; use errorFromW3CJsonCode for W3C error-signature mapping.
BREAKING CHANGE: ProtocolError instances no longer have a jsonwpCode property.
BREAKING CHANGE: WebDriverProxy (formerly JWProxy) no longer proxies to or interprets responses from downstream servers speaking the legacy MJSONWP protocol; the ProtocolConverter class, COMMAND_URLS_CONFLICTS, and the downstreamProtocol getter/setter have been removed. Downstream automation servers must speak W3C WebDriver.
BREAKING CHANGE: Responses no longer duplicate element references under the legacy ELEMENT key; only the W3C element-6066-11e4-a52e-4f735466cecf key is present. The MJSONWP_ELEMENT_KEY constant has been removed.
BREAKING CHANGE: determineProtocol has been removed, and drivers can no longer produce the legacy {sessionId, status, value} response shape; all responses are now W3C-shaped regardless of how the client formatted its createSession capabilities.
BREAKING CHANGE: DriverCore#setProtocolMJSONWP() has been removed.
BREAKING CHANGE: The deprecated JWProxy export has been removed; use WebDriverProxy instead. Its source also moved from lib/jsonwp-proxy/proxy.js to lib/wd-proxy/proxy.js.
BREAKING CHANGE: DriverCore#isMjsonwpProtocol() has been removed.
2026-08-31 19:24:19 +02:00
Mykola Mokhnach a38539deaf feat(base-driver)!: remove deprecated legacy test pages (#22680)
BREAKING CHANGE: The STATIC_DIR export has been removed from @appium/base-driver, along with the built-in /welcome, /test/guinea-pig*, /produce_error, and /crash routes and the APPIUM_ENABLE_LEGACY_TEST_PAGES environment variable that used to enable them.
2026-08-30 15:05:47 +02:00
Mykola Mokhnach ec7de4768f feat(base-driver)!: replace spdy with native https transport (#22676)
BREAKING CHANGE: TLS-enabled Appium servers no longer negotiate SPDY/HTTP2 (spdy/2, spdy/3, spdy/3.1, h2) via ALPN; connections are now served as plain HTTPS (HTTP/1.1) using Node's native https module. Clients relying on SPDY or HTTP/2 multiplexing against Appium's TLS listener must switch to HTTP/1.1.
2026-08-29 21:00:24 +02:00
Mykola Mokhnach 3516e50ce6 feat!: convert remaining monorepo packages to ESM-only (#22674)
BREAKING CHANGE: require('@appium/support') no longer works; consumers must import it instead.
BREAKING CHANGE: require('@appium/base-driver') no longer works; drivers extending BaseDriver via require must switch to import.
BREAKING CHANGE: require('@appium/base-plugin') no longer works; plugins extending BasePlugin via require must switch to import.
BREAKING CHANGE: require('appium') no longer works; plugins extending the package via require must switch to import.
BREAKING CHANGE: require('@appium/fake-plugin') no longer works; consumers must import it instead.
BREAKING CHANGE: require('@appium/fake-driver') no longer works; consumers must import it instead.
BREAKING CHANGE: require('@appium/types') no longer works; consumers must import it instead.
BREAKING CHANGE: require('@appium/logger') no longer works; consumers must import it instead.
BREAKING CHANGE: require('@appium/schema') no longer works; consumers must import it instead.
2026-08-29 17:25:29 +02:00
Mykola Mokhnach d5b316031e feat(base-driver): add /appium-prefixed routes for JSONWP/MJSONWP end points (#22642) 2026-08-20 19:42:02 +02:00
Mykola Mokhnach 4422d99d45 fix(base-driver): anchor CORS async-response regex and match on req.path (#22639) 2026-08-19 11:47:06 +02:00
Mykola Mokhnach f06226b7bb feat(base-driver): add httpServer.frontRouter for global extension middleware (#22632) 2026-08-17 08:22:11 +02:00
Mohamed Mostafa 26ffad4f24 fix(base-driver): reject a non-string url without throwing TypeError (#22625) 2026-08-11 22:25:19 +02:00
Edgars Eglītis 1486078c82 chore: replace safe occurrences of JWProxy (#22614) 2026-08-06 16:54:45 +03:00
Mohamed Mostafa 68ce0e2bdd fix(base-driver): return a W3C error for a malformed JSON body (#22606) 2026-08-05 22:22:02 +02:00
Mykola Mokhnach 4b0cc9d37f chore(base-driver): Deprecate the legacy createSession API shape (#22587) 2026-08-04 18:55:03 +02:00
Mohamed Mostafa 03dac9d6e8 fix(base-driver): keep the find error if the page source fails (#22572) 2026-08-01 16:57:03 +02:00
Mykola Mokhnach a236fdbc97 chore(base-driver): Group route definitions (#22556) 2026-07-29 20:59:05 +02:00
ian zhang 281e61c297 fix(base-driver,storage-plugin): redact sensitive payloads in debug logs (#22549) 2026-07-27 20:21:15 -07:00
Edgars Eglītis 6609b2be57 fix(base-driver): fix typo in generic sensor protocol route (#22525) 2026-07-21 11:47:08 +03:00
Kazuaki Matsuo b56646198c fix: use module sync in appium/support (#22514)
* fix: use module sync in appium/support

* use node assert

* add __filename

* fix format
2026-07-18 07:34:45 -07:00
Asijit Manna a9dd7f5e41 fix(base-driver): redact proxied response body in proxy logs (#22470) 2026-07-03 21:09:38 +02:00
Mykola Mokhnach de2cd50b96 fix(base-driver): Perform shallow clone of initial options (#22465) 2026-07-03 20:59:18 +02:00
Mykola Mokhnach 08d50889c2 chore: Migrate from prettier to oxfmt (#22450) 2026-07-01 08:54:13 +02:00
Mykola Mokhnach e9a41bd9ae chore(base-driver): Migrate index to typescript (#22428) 2026-06-26 07:47:34 +02:00
Mykola Mokhnach d94a40af9f feat(base-driver): Isolate test endpoints (#22394) 2026-06-17 08:32:40 +02:00
Mykola Mokhnach c704023790 chore: Strip obsolete methods usages in monorepo packages (#22363) 2026-06-10 19:14:44 +02:00
Mykola Mokhnach f0de6b8719 chore: Ditch @colors/colors and supports-color (#22357) 2026-06-07 00:00:45 +02:00
Mykola Mokhnach 1a46d7d61e chore: Apply format (#22350) 2026-06-05 08:08:54 +02:00
Mykola Mokhnach d9a30c1ace chore(base-driver): Enable strict TS mode (#22334) 2026-06-02 06:43:18 +02:00
Mykola Mokhnach cf79b3283a feat(base-driver): Ditch lodash (#22324) 2026-05-30 08:13:10 +02:00
Mykola Mokhnach c9b7eac365 feat(base-driver): Ditch bluebird (#22293) 2026-05-23 08:28:06 +02:00
Mykola Mokhnach 25d922b7d3 feat: make assignIpc internal (#22278) 2026-05-18 07:35:51 +02:00
Mykola Mokhnach 0264775ecb feat: Limit the maximum count of topics per session and make it configurable (#22279) 2026-05-18 07:22:48 +02:00
Mykola Mokhnach f5b193ccf0 chore(base-driver): Simplify async generator logic in IpcSubscription (#22280) 2026-05-18 07:22:32 +02:00
Jonathan Lipps 97c879cdd0 feat: add IPC channels per session for drivers and plugins to communicate (#22211)
* feat: add IPC channels per session for drivers and plugins to communicate (fix #22206)

* lint

* export AppiumIpc

* fix test issues

* import AppiumIpc directly from basedriver

* fakedriver is used directly outside of appium so can't rely on existence of IPC

* make ipc functions async with lock and better types

* fix assignIpc types

* deduplicate session object deletion

* ipcGuard -> withIpc

* address various review comments

* lint

* address copilot and other review comments

* store only last message. change model to use subscription object and async generator

* enforce max message size in bytes

* fix tests and call the message payload 'data' for clarity

* lint

* make assignIpc optional on drivers for backwards compatibility

* add error handling in startClock since it is usually not awaited

* add docs

* remove todo comment

* apply copilot and eglitise suggestions

* add typedoc

* add error handling to onIpcInit

* apply more suggestions

* fix schema unit test

* apply more suggestions

* add links to ipc examples

* make minimum ipc message size 1 instead of 0

* ensure publisher names are friendly to consumers

* fix ipc message time unit

* use already included sizeof for objs

* just pass error obj to log

* be more typescriptey about our ipc guard

* make max obj size part of opts for appiumipc

* let unsubscribe return whether it worked

* improve ipc types and shapes

* apply master package-lock.json

* update schema config

* use javascript naming conventions

* clarify distinction between message and payload (data)

* ensure async iterator loop ends when unsubscribe is called

* ensure the right things happen when you unsubscribe

* make require ipc more ergonomic

* remove unnecessary async locks and de-asyncify methods

* simplify interface and just use subscriber/plugin names

* fix docs

* fix lint

* document isActive

* add note about topic namespace

* use sleep instead of delay

* restrict the ipc payload data type to something that can be cloned

* clarify topic namespacing recommendation

* make sure listeners and promises are cleaned up in async iterator

* clean up ipc internal names

* readonly

* address review comments

* make ipcmessage readonly

* readonly cause why not
2026-05-14 16:56:02 -07:00
Edgars Eglītis 787571d338 feat: add 3 WebDriver extension endpoints (#22237)
* feat: add 2 WebDriver extension endpoints

* docs: add missing reference for removeAuthCredential

* fix protocol hash
2026-05-05 20:30:59 +03:00