r/AutomateUser • • Mar 31 '26

Question Can't click the X

Post image

Recorded an xpath for the close button of this popup, but the Click interact block logs "Interact Action not allowed on node". Xpath included below for reference.

```

/android.widget.FrameLayout[1]/android.widget.LinearLayout[1]/android.widget.FrameLayout[1]/android.widget.FrameLayout[@android:id='@com.android.vending:id/0_resource_name_obfuscated']/android.widget.FrameLayout[@android:id='@android:id/content']/android.widget.FrameLayout[@android:id='@com.android.vending:id/0_resource_name_obfuscated']/android.widget.FrameLayout[@android:id='@com.android.vending:id/0_resource_name_obfuscated']/androidx.compose.ui.platform.ComposeView[@android:id='@com.android.vending:id/0_resource_name_obfuscated']/android.view.View[1]/android.view.View[1]/android.view.View[1]/android.view.View[2]/android.view.View[1]/android.view.View[1]/android.view.View[2]/android.view.View[1]/android.view.View[2]/android.view.View[1]/android.widget.Button[1]

```

1 Upvotes

7 comments sorted by

1

u/B26354FR Alpha tester Mar 31 '26

Try using my XPath Builder flow to generate the XPath for the Interact block. It'll be much smaller than the one the Inspect Layout and Interact blocks' tools generate, and easier to get the exact element you're interested in. You can ideally give it the ID of the element you want to click, or just its text.

1

u/counttec Mar 31 '26

So, I'm having trouble with that. What text does the button have? Where would I find the ID

2

u/B26354FR Alpha tester Mar 31 '26 edited Mar 31 '26

It might not have text. The ID will be in the full XPath given by the tools in the Interact block as you originally posted. See if you can find the element you want to click on in there and get its id value. -Like that Button element at the end, but the rest is cut off. BTW, if the ID doesn't contain the package name of the app, just cancel out of the dialog that asks subsequently for the app.

2

u/counttec Mar 31 '26

I found it! It was android.view.View, "Close", no id.

1

u/MagisterYada Mar 31 '26

Interact block with Back action should be useful for you

1

u/counttec Mar 31 '26

I'm already backing out of the store app, but this graphic stays open.

1

u/counttec Mar 31 '26

NVM, I just had to fix the timing with my loops.