# UiContainer

Import: `import com.install4j.api.test.ui.UiContainer;`

```java
interface UiContainer
```

Shared base for [`ScreenHandle`](ScreenHandle.md) and the [`DialogHandle`](DialogHandle.md) family. Exposes the
widget-tree dump and screenshot diagnostics that work uniformly in both in-process and
subprocess mode.

## Methods

| Signature | Returns | Description |
|---|---|---|
| [`dumpAsString()`](#dumpasstring) | `String` | Returns this container's component tree as a string, for debugging. |
| [`saveScreenshot(File)`](#savescreenshot-file) | `void` | Save this container's underlying window as a PNG file. |

### dumpAsString()

```java
String dumpAsString()
```

Returns this container's component tree as a string, for debugging.

### saveScreenshot(File)

```java
void saveScreenshot(File file)
```

Save this container's underlying window as a PNG file. Captures the full window. Parent
directories of the file are created on demand. Existing files are overwritten.

