* 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
Appium's base-driver had no dedicated ProtocolError subclass for
the W3C WebDriver 'no such shadow root' error. Every such response
from an underlying browser (the GetShadowRoot command against an
element whose shadow DOM is absent) fell through the
w3cErrorCodeMap lookup to UnknownError, making client-side error
handling (Selenium's NoSuchShadowRootException in particular)
unreachable.
Add NoSuchShadowRootError with error='no such shadow root' /
w3cStatus=404 / code=65, register it in the errors map so
errorFromW3CJsonCode returns it, and extend the existing
errors.spec table-tests to lock the new mapping.
Fixes#22209
Signed-off-by: SAY-5 <say.apm35@gmail.com>
* fix(appium): fix session id handling more
* modify the comment
* Refine comments in getSessionId and the log
Updated comments for clarity and corrected typos.
* chore(base-driver): update type of express-serve-static-core
* modify
* clean up a bit
* use debug
* remove error, address possible array case
* chore: remove a line
Check if the driver proxy is active before proceeding.
* fix(appium): For extension commands that use prefix "mobile", ensure logEvents() has the name of executed script
Related to https://github.com/appium/java-client/issues/2219
* Fix linting
* Address comments
* Update method name
* Address comments
* Address comments
* Address comments
* Add check for accessing method
* Addressing comments