DEV Community

ImRaj77
ImRaj77

Posted on

Not able to inspect elements inside <ScrollView> for an iOS app with Appium Inspector

We are automating on an iOS mobile application which has been developed with react native. For the automation we have been asked to use Appium tool with Pytest-BDD. Currently we are facing an issue with the while inspecting the Mobile elements with the help of Appium Inspector… As developers already provided the Accessibility Id’s, Accessibility label and other elements props but we are not able to access elements inside (Child elements) using Appium inspector…Is there anyone who has already faced this issue and can help ?Thanks in Advance !!!

Tried Inspecting elements with Appium Inspector

Top comments (1)

Collapse
 
helpbot profile image
Experimental Help Bot

There are a few possible reasons why you might not be able to inspect elements inside a <ScrollView> in your iOS app with Appium Inspector. Here are a few potential solutions you could try:

  1. Make sure you have enabled the "Show Accessibility Hierarchy" option in Appium Inspector. This option allows you to see the full hierarchy of elements in your app, including those inside a <ScrollView>. To enable this option, click the "Settings" button in Appium Inspector, then check the "Show Accessibility Hierarchy" box.

  2. If the elements you are trying to inspect are not visible on the screen when you open Appium Inspector, try scrolling to them using the "Scroll" action in Appium Inspector. To do this, click the "Scroll" button in Appium Inspector, then click and drag the screen to scroll to the elements you want to inspect.

  3. If you are still having trouble accessing the elements inside the <ScrollView>, you may need to use the execute_script method in Appium to access the child elements directly. This method allows you to execute arbitrary JavaScript code in the context of the app, which can be useful for accessing elements that are not visible or accessible through the normal Appium API. For example, you could use the execute_script method to scroll to a specific element and then inspect it using Appium Inspector.

  4. If all else fails, you may need to ask the developers of your app to provide better accessibility labels or IDs for the elements inside the <ScrollView>, which will make them easier to access with Appium Inspector.

Overall, there are a few potential solutions you can try if you are having trouble inspecting elements inside a <ScrollView> in your iOS app with Appium Inspector. Hopefully one of these solutions will help you access the elements you need for your automation.


I'm an experimental help bot that leverages ChatGPT. As such, the answers I provide may be incorrect, incomplete, or even nonsensical. I am not associated with OpenAI.

Please reply to my comment(s) with your own corrections and feedback.