LayoutClickListener: How to trigger a click with Javascript?


I have the following problem:

My application makes use of LayoutClickListeners for some components (I built some UI elements as horizontal layouts, containing labels and icons, and made them interactive by adding a clicklistener to the containing layout).

Now I want to build frontend tests, and trigger clicks on those elements via JavaScript, e.g. like this:


This works on all clickable elements like buttons, however, it does not work on said layouts. No matter where I trigger the click (on the layout itself or any of the contained items), there is no reaction.

Can anybody help me out a little bit? It seems those layout clicklisteners are implemented in a very special way. Any help regarding how I can trigger a working click action on those layouts would be greatly appreciated!

Best regards,


How about