# Client Diagnostics / Console

**URL:** <https://forum.inductiveautomation.com/t/client-diagnostics-console/3019>\
**Category:** Ignition\
**Created:** [June 16, 2011, 3:41pm UTC](https://forum.inductiveautomation.com/t/client-diagnostics-console/3019 "2011-06-16T15:41:19Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![justinedwards.jle](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justinedwards.jle/32/37854_2.png) [@justinedwards.jle](https://forum.inductiveautomation.com/u/justinedwards.jle)\
**Post date:** [October 15, 2024, 7:40pm UTC](https://forum.inductiveautomation.com/t/client-diagnostics-console/3019/6 "2024-10-15T19:40:48Z")

</div>

> [@kaushik.shah](#):
>
> through script) to select console once diagnostics

```python
from java.awt import Window

# Returns the first nested component of a given class
# container = The object containing nested components to be recursively searched
# className = the __name__ of the class given as a string
def findComponentOfClass(container, className):
	for component in container.components:
		if component. __class__. __name__ == className:
			return component
		else:
			foundComponent = findComponentOfClass(component, className)
			if foundComponent:
				return foundComponent

# Programatically open a diagnostic window, find it, and set it to the console tab
system.gui.openDiagnostics()
for window in Window.getWindows():
	if window. __class__. __name__ == 'DefaultPopupWindowParent':
		diagnosticDialog = findComponentOfClass(window, 'DiagnosticsDialog')
		if diagnosticDialog:
			tabbedPane = findComponentOfClass(diagnosticDialog, 'JTabbedPane')
			tabbedPane.selectedIndex = tabbedPane.indexOfTab('Console')

```

---

_[View the full topic](https://forum.inductiveautomation.com/t/client-diagnostics-console/3019)._
