How to get all GUI objects on the unity game screen?

I want to get all GUI objects on the unity game screen, then I can get their coordinates for automation test.

But a GUI object is created as below:
void OnGUI() {
if (GUI.Button (new Rect (10, 30, 100, 70), “Exit”)) {
Application.Quit ();
}

}

It seems no button object can be found associated with a game object.
It is easy to find a game object by name. but Is there any way I can find a GUI button object in somewhere else?

No, the code is not a gameobject, but a script.

Thanks.
I know that the GUI object is different from game objects.but they all represent elements on screens.
Is there any object can be used to represent the GUI object or Is there any way I can get the GUI object?

You can use GUITextures or models as actual gameObjects.

To be honest, it doesn’t even make sense why the GUI isn’t composed of runtime instantiated gameobjects.
It would fit well with Unity’s design, it would allow us to create a GUI at runtime or before in a scene.
It would give us a “GUI” component to attach to gameobjects.

To my knowledge, from the free version of NGUI (I think it’s NGUI, whichever one gave a free version), it uses gameobjects to do all of this.

It just doesn’t make sense. Just the same as making the GUI top left but everything else bottom left. Have some consistency guys.

I really hope that their latest GUI revamp does exactly this. It’s so silly to ignore the wonderfulness of Scene:GameObject:Component relationships with the GUI, when Unity uses it for everything else very well.