Click autopilot "did not match any interactive element"

I'm trying to use the click autopilot command to open a popup menu and then click on one of the items in the menu. The first click works fine, but the second click doesn't work and I get an error message saying that it "did not match any interactive element" on the page. I've double-checked in Chrome DevTools and the CSS selector is correct and matches the correct item. The snippet looks something like this:

{click: selector=[data-action="menubutton"]}{wait: delay=+.3s}{click: selector=[data-action="menuitem"]}

Any ideas on what's going on? I noticed that the popup menu items are not HTML buttons but rather div elements. Could that be causing an issue? Does the click autopilot command only work with HTML button elements?

Hi @farshadz Welcome to the forum! :slight_smile:

Your observation is correct. We only support {click} with HTML elements that are "clickable" (we have a set of heuristics to determine that). Usually, it should work fine even with a <div> element if it has the correct attributes, for example, aria-role set to button.

In your specific case, can you share a screenshot of the div element that is not getting clicked? There could be another attribute on the div element that we can add to our heuristic check.

Thank you @Gaurang_Tandon ! I've copied the HTML of the div element below (I've just changed/simplified the class names). Unfortunately, it looks like there aren't any aria attributes on it or anything like that :frowning:

<div class="popover-item" data-action="menubutton">
   <i class="icon"></i>
   <span>Menu Button</span>

Is there any way to "force" a click on an element, even if Text Blaze thinks it's not interactive?

That's sad :frowning: I have moved your post to feature ideas. We don't click on non-interactive elements to avoid confusion, but I can see that in cases like these it would make sense to support an override. We'll look into it!

1 Like