Unable to click/Tap a button having both clickable and Nonclickable part

The application I am testing right now has a button in one of it’s pages. Node details is given -
This button has two parts. One part is plain text which is non clickable but other part is clickable. How can I identify and click that part?

First Identify the button using either id or any preferable way and then get the coordinates of the button.After you get x and y coordinates,Use the TouchAction class and tap on the button at the required place.

Thanks for the reply Swathi but my problem is different. For example I have a button with ID say “X”. But this entire button is not clickable. Only a part of it is clickable. How can I identify that part?
Please refer this picture…part PQR is clickable in the button.

Hello Soham,
They are in single frame or having the different frame with in the Ui viewer,can you please share the screen shot for it.


Hi Amit,
I am sorry I won’t be abe to share the screen. But they are in a single frame.
Node details example -
class: android:widget:button
package: com.abc
content-desc :- ABC PQR
Clickable is set as true though for part ABC it is not enabled.

it’s ok!!!:slight_smile:
But the dynamic xpath for both the text will be different.which can help you to perform action on it. please try this and let me know if any concern.


Thanks Amit for the suggestion :slight_smile:. Just one more doubt - This button has no text or resource id. The part “PQR” and “ABC” is mentioned in the content description only. My question is even if I use dynamic xpath how it will separately identify PQR and perform click/tap on it?

Welcome Soham…:slight_smile:
you can use the dynamic xpath with bounds that can easily identify the “PQR” and “ABC” perform the click on specific element.let me know if any concern!!!

Hi Amit
Tried with bounds but not working. Please check the node details of the button.

Can we check this once.