Interface: AppiumServerExtension
@appium/types.AppiumServerExtension
Table of contents
Properties
Methods
Properties
webSocketsMapping
• webSocketsMapping: Record
<string
, WSServer
<WebSocket
>>
Defined in
node_modules/@appium/types/lib/server.ts:47
Methods
addWebSocketHandler
▸ addWebSocketHandler(this
, handlerPathname
, handlerServer
): Promise
<void
>
Adds websocket handler to an AppiumServer
.
Parameters
Name | Type | Description |
---|---|---|
this |
AppiumServer |
- |
handlerPathname |
string |
Web socket endpoint path starting with a single slash character. It is recommended to always prepend /ws to all web socket pathnames. |
handlerServer |
WSServer <WebSocket > |
WebSocket server instance. See https://github.com/websockets/ws/pull/885 for more details on how to configure the handler properly. |
Returns
Promise
<void
>
Defined in
node_modules/@appium/types/lib/server.ts:19
close
▸ close(): Promise
<void
>
Returns
Promise
<void
>
Defined in
node_modules/@appium/types/lib/server.ts:13
getWebSocketHandlers
▸ getWebSocketHandlers(this
, keysFilter?
): Promise
<Record
<string
, WSServer
<WebSocket
>>>
Returns web socket handlers registered for the given server instance.
Parameters
Name | Type | Description |
---|---|---|
this |
AppiumServer |
- |
keysFilter? |
null | string |
Only include pathnames with given value if set. All pairs will be included by default. |
Returns
Promise
<Record
<string
, WSServer
<WebSocket
>>>
Pathnames to WS server instances mapping matching the search criteria, if any found.
Defined in
node_modules/@appium/types/lib/server.ts:43
removeAllWebSocketHandlers
▸ removeAllWebSocketHandlers(this
): Promise
<boolean
>
Removes all existing WebSocket handlers from the server instance.
Parameters
Name | Type |
---|---|
this |
AppiumServer |
Returns
Promise
<boolean
>
true
if at least one handler was deleted; false
otherwise.
Defined in
node_modules/@appium/types/lib/server.ts:36
removeWebSocketHandler
▸ removeWebSocketHandler(this
, handlerPathname
): Promise
<boolean
>
Removes existing WebSocket handler from the server instance.
The call is ignored if the given handlerPathname
handler is not present in the handlers list.
Parameters
Name | Type | Description |
---|---|---|
this |
AppiumServer |
- |
handlerPathname |
string |
WebSocket endpoint path |
Returns
Promise
<boolean
>
true
if the handlerPathname
was found and deleted; false
otherwise.
Defined in
node_modules/@appium/types/lib/server.ts:31