Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds a new session setting, snapshotMaxChildren, to let advanced users cap the number of child elements traversed per XCElementSnapshot request (similar in spirit to snapshotMaxDepth) to improve page source / snapshot performance in large hierarchies.
Changes:
- Introduces a new settings key (
snapshotMaxChildren) and exposes it via the existing/settingsGET/SET routes. - Adds
FBConfigurationaccessors forsnapshotMaxChildrenand wires them into snapshot request parameters using the existing XCAXClient default-parameters override mechanism. - Adds a helper to remove a previously-set custom snapshot request parameter (used during session reset).
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| WebDriverAgentLib/Utilities/FBSettings.m | Adds the snapshotMaxChildren setting key constant. |
| WebDriverAgentLib/Utilities/FBSettings.h | Exposes the snapshotMaxChildren setting key constant. |
| WebDriverAgentLib/Utilities/FBConfiguration.m | Adds snapshotMaxChildren getters/setters and resets it for new sessions. |
| WebDriverAgentLib/Utilities/FBConfiguration.h | Documents/exposes snapshotMaxChildren configuration APIs. |
| WebDriverAgentLib/Commands/FBSessionCommands.m | Adds snapshotMaxChildren to /settings GET response and applies it on /settings SET. |
| WebDriverAgentLib/Categories/XCAXClient_iOS+FBSnapshotReqParams.m | Adds maxChildren parameter key constant and implements removal of custom snapshot params. |
| WebDriverAgentLib/Categories/XCAXClient_iOS+FBSnapshotReqParams.h | Exposes maxChildren key and the new remove helper. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
|
|
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
## [11.4.0](v11.3.0...v11.4.0) (2026-03-08) ### Features * make maxChildren configuable ([#1117](#1117)) ([57dd6dc](57dd6dc))
|
🎉 This PR is included in version 11.4.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
maxChildrensets the maximum number of elements to retrieve in each snapshot. This could help to improve the element retrieval performance likemaxDepth. This might be more for advanced users.maxDepthis how deeply recursive the snapshot.maxChildrenaffects each snapshot. For example, ifmaxChildrenwas1andmaxDepthwas 2, the result will be two nested element tree but each element tree has only one element.This is the home screen's page source when maxChildren is 1 and maxDepth is default (50).

This is the home screen's page source when maxDepth and maxChildren are default values.
