Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add infobox for elements at snapshotMaxDepth #1596

Merged
merged 2 commits into from
Aug 10, 2024

Conversation

eglitise
Copy link
Collaborator

@eglitise eglitise commented Aug 9, 2024

This PR adds a new infobox when selecting an element located at snapshotMaxDepth. It helps users understand that some elements may be hidden, explains the reason why they are hidden, and provides a way to expose them.
image
The hope is that this infobox will also provide additional help for users testing React Native apps on iOS, since such apps are known to have issues with high element depth.

@github-actions github-actions bot added enhancement New feature or request i18n Translation changes labels Aug 9, 2024
Copy link
Member

@KazuCocoa KazuCocoa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@@ -133,6 +133,7 @@
"contextDropdownInfo": "Multiple contexts detected; certain elements might only be accessible after switching to a different context. Note that webview inspection in Appium Inspector is less accurate than the DevTools of Chrome or Safari. For more information, see:",
"idAutocompletionCanBeDisabled": "The requested id selector does not have a package name prefix. This Appium session has package name autocompletion enabled, which may be the reason why no elements were found. To disable this behavior, relaunch this session with the capability 'appium:disableIdLocatorAutocompletion' set to 'true'.",
"missingAutomationNameForStrategies": "Additional locator strategies may be available. To view them, add the capability 'appium:automationName' when launching the session. Note that this capability is mandatory in Appium 2.",
"snapshotMaxDepthReached": "This element is located at the maximum source depth {{selectedElementDepth}}, therefore its child elements (if any) are not shown. To reveal them, change the 'snapshotMaxDepth' setting to a value higher than {{selectedElementDepth}}. Check your driver documentation for the maximum supported value.",
Copy link
Contributor

@mykola-mokhnach mykola-mokhnach Aug 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we explicitly mention the maximum supported value is 62?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perhaps greater than?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The maximum value of 62 refers only to the XCUITest driver, but for UiAutomator2 it seems to be 500.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume it would still be hard for users to find this value in docs themselves

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for UIA2 the value does not really have an upper limit. I don't know exactly at which value the tree reader starts to freak out

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that the value may not be easy to find in the XCUITest docs (I'm not sure if it even is there), but I would still say it's better to not refer to any specific drivers in this message for future extensibility.

@eglitise eglitise merged commit 9fd1a9d into appium:main Aug 10, 2024
6 checks passed
@eglitise eglitise deleted the add-snapshotmaxdepth-info branch August 10, 2024 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request i18n Translation changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants