Inspector not showing name/xpath/tagname


My sample app do not have any name/id/tagname/xpath when i do inspect. Could you please explain me how to code click for this ? In the inspector, when i click on a button it shows below details.


Hi Rohansurya,

Inspector is accessing element using “class name”, and based of index it perform action.
if you want to perform any action like click and etc.

Get list of element using class name and then perform action based on index.

I hope it will helpful.

Hi dharam,

I tried accessing the element using the class name but got the below error.

info: [debug] Responding to client with error: {“status”:32,“value”:{“message”:“Argument was an invalid selector (e.g.XPath/CSS).”,“origValue”:“javax.xml.transform.TransformerException: Extra illegal tokens: ‘$’, ‘VirtualChild’, ‘[’, ‘@’, ‘index’, ‘=’, ‘0’,’]’”},“sessionId”:“e60ed97b-255d-4336-ac0e-5fd701fe95ff”}

class name:$VirtualChild
package name: com.wearyinside.MyApp

Are you trying to access a non native UI Element?

No, I am trying to access native UI elements.$VirtualChild doesn’t sound right, try to print the page source before you do the find.

Hi Sebv,

Ours is a native android application. Can we get the page source for native apps? If yes, please help me with the steps to find the same.

Yes just check your driver doc.

Another way to get element properties …
Load the page in Device/Emulator and then use uiautomatorviewer command in Android sdk tools directory.