---
title: exists
framework: xcuiautomation
role: symbol
role_heading: Instance Property
path: xcuiautomation/xcuielement/exists
---

# exists

Determines if the element exists.

## Declaration

```swift
var exists: Bool { get }
```

## Discussion

Discussion This property determines if the element exists within the app’s current UI hierarchy. note: The fact that an element exists doesn’t imply that it’s hittable. Elements can exist offscreen, or exist onscreen but be hidden by another element, causing their isHittable property to return false.

## See Also

### Querying element state

- [waitForExistence(timeout:)](xcuiautomation/xcuielement/waitforexistence(timeout:).md)
- [waitForNonExistence(timeout:)](xcuiautomation/xcuielement/waitfornonexistence(timeout:).md)
- [wait(for:toEqual:timeout:)](xcuiautomation/xcuielement/wait(for:toequal:timeout:).md)
- [isHittable](xcuiautomation/xcuielement/ishittable.md)
- [debugDescription](xcuiautomation/xcuielement/debugdescription.md)
