Skip to main content

Explore View Tree

Explore View Tree is a feature that is designed to help you discover all the visible elements of your mobile application while developing your test scripts. It captures a snapshot of the user interface and allows you to navigate and explore the view objects of your native apps.

Explore View Tree feature allows you to see, debug, analyze or determine the state of individual View components. It also informs you about global changes in the view tree.

note

You can use our Appium Inspector capability to inspect the App Source and attributes in real time during a Live Testing session!

The feature speeds up your debugging experience of QA SDET for automated test scripts, and expedites the debugging and validating View and UI-related issues. Finally, the Explore feature is a critical factor for easy validation of accessibility labels.

What You'll Need

Using Explore View Tree for Real Devices

By default, the Explore View Tree feature is enabled if the instrumentation feature is enabled.

To enable instrumentation:

  1. In Sauce Labs, from the left navigation, click App Management.
App Logs
  1. Upload your mobile app.
App Logs
  1. After you’ve uploaded your app, hover your mouse over your app, then select Settings.
App Logs
  1. Under Real Device Settings, toggle Instrumentation to Enabled.
App Logs

Now you can start your live or automated testing session. View Tree will be captured and be part of your test results.

note

The Explore View Tree feature works for all the automated test framework types.

Accessing Explore View Tree

You can access the Explore View Tree from the Live Test Results or Automated Test Results page.

  1. In Sauce Labs, click LIVE or AUTOMATED and then click Test Results.


    Mobile app settings navigation
    Mobile app settings navigation
  2. Select a test result from the list.


    Mobile app settings navigation
  3. Click on Explore button.


    Mobile app settings navigation

The Explore View Tree feature will display the captured snapshots of detectable view changes:


Mobile app settings navigation

You can also download the results using the API call below:

 curl --compressed \
-O https://{SAUCE_USERNAME}:{SAUCE_ACCESS_KEY}@{DATA_CENTER}.saucelabs.com/v1/rdc/jobs/{JOB_ID}/insights.json

Explore View Tree Attributes

The following table lists the available attributes:

NameDescription
IDThe class identifier
VisibilityA value that checks if the component is present in the View Tree
FocusableA value that provides additional information associated with accessibility
AlphaA value that describes how translucent or opaque the component is
EnabledChecks the interactivity of the component
ContentDescThe accessibility description of a UI component
TextA text attribute of a UI component

Limitations

note
  • Webviews and hybrid apps will have additional capture limitations.
  • Emulators and Simulators are not supported.

More Information