Skip to content

Commit

Permalink
chore: Tune contextUpdated event generation
Browse files Browse the repository at this point in the history
  • Loading branch information
mykola-mokhnach committed Dec 14, 2024
1 parent 8744e58 commit e674324
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
28 changes: 28 additions & 0 deletions docs/bidi.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,31 @@ These events might be disabled if the `appium:skipLogcatCapture` capability is e
Events are emitted for both emulator and real devices. Each event contains a single Appium server log line.
Events are always emitted with the `NATIVE_APP` context.
Events are only emitted if the `get_server_logs` server security feature is enabled.

## appium:uiautomator2.contextUpdate

This event is emitted upon the context change, either explicit or implicit.
The event is always emitted upon new session initialization.
See the [GitHub feature ticket](https://github.com/appium/appium/issues/20741) for more details.

### CDDL

```cddl
appium:uiautomator2.contextUpdated = {
method: "appium:uiautomator2.contextUpdated",
params: {
name: text,
type: "NATIVE" / "WEB",
},
}
```

The event contains the following params:

### name

Contains the actual name of the new context, for example `NATIVE_APP`.

### type

Either `NATIVE` or `WEB` depending on which context is currently active in the driver session.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
},
"dependencies": {
"appium-adb": "^12.7.3",
"appium-android-driver": "^9.14.2",
"appium-android-driver": "^9.14.7",
"appium-uiautomator2-server": "^7.0.24",
"asyncbox": "^3.0.0",
"axios": "^1.6.5",
Expand Down

0 comments on commit e674324

Please sign in to comment.