I have an app built in Unity which uses the new canvas features including buttons and inputfields.
I'm wondering how I could implement automated testing by programmatically entering characters into the input fields and clicking buttons. In the case of the button the UI.Button component doesnt seem to have a click method you can call. Is there a way of registering mouse clicks at the buttons location? Or some other way of achieving this?
Ok, This is how you click a button programmatically
MyButton.onClick.Invoke();
and for the inputfields you can just set their text fields like so..
MyInput.text = "flooopybloopybloo";
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments