Button Click event generate

Button Click event generate


hi, all, have some issue, I want to generate a click event on Button through a console, for some autotest, but have no idea how to do it.

How can I do that?

Thanks in advance !!


fire a custom event and setup a listener on the other end to process it. You can even pass data with it


thx. But I have found another way to do that. Just add a method that does the same as the onClickListnerCallBack, add my Button to the window and then call the method from a console.