diff --git a/website/versioned_docs/version-20.x/api/device.md b/website/versioned_docs/version-20.x/api/device.md index 7673c39d26..d0258737eb 100644 --- a/website/versioned_docs/version-20.x/api/device.md +++ b/website/versioned_docs/version-20.x/api/device.md @@ -442,6 +442,16 @@ test('Capture view hierarchy', async () => { }); ``` +### `device.generateViewHierarchyXml([shouldInjectTestIds])` + +Generates a view hierarchy XML of the currently opened application. The XML is returned as a string. + +The `shouldInjectTestIds` parameter is optional and defaults to `false`. When set to `true`, Detox will attempt to inject `testID` attributes into the XML for each element if undefined. + +```js +const viewHierarchyXml = await device.generateViewHierarchyXml(); +``` + ### `device.shake()` **iOS Only** Simulate shake diff --git a/website/versioned_docs/version-20.x/contributing/code/overview.md b/website/versioned_docs/version-20.x/contributing/code/overview.md index 62e9510940..11693a0b93 100644 --- a/website/versioned_docs/version-20.x/contributing/code/overview.md +++ b/website/versioned_docs/version-20.x/contributing/code/overview.md @@ -28,6 +28,7 @@ The other projects are the Detox CLI, the Detox test app, example apps, and the Here's a high-level overview of the repository structure: - 📁 **detox-cli** - The CLI for Detox (e.g., `detox init`, `detox test`, read more about our [CLI docs]) +- 📁 **detox-copilot** - Detox plugin that leverages large language models (LLM) to seamlessly invoke Detox actions (**work in progress**) - 📁 **detox** - The Detox framework - 📁 **android** - The Android native code, alongside native unit tests - 📁 **ios** - The iOS native code, including its native submodules (e.g., DetoxSync)