public static Window waitForWindowByName(String name) {

		int time = 0;
		int timeout = DEFAULT_WAIT_TIMEOUT;
		while (time <= timeout) {
			Set<Window> allWindows = getAllWindows();
			for (Window window : allWindows) {
				String windowName = window.getName();
				if (name.equals(windowName) && window.isShowing()) {
					return window;
				}

				time += sleep(DEFAULT_WAIT_DELAY);
			}
		}

		throw new AssertionFailedError("Timed-out waiting for window with name '" + name + "'");
	}
Waits for a window with the given name.

@param name The name of the window for which to search
@return The window, if found, null otherwise
Ghidra/Framework/Docking/src/main/java/docking/test/AbstractDockingTest.java