---
title: "element(at:)"
framework: xcuiautomation
role: symbol
role_heading: Instance Method
path: "xcuiautomation/xcuielementquery/element(at:)"
---

# element(at:)

Returns an element that resolves to the index into the query’s result set.

## Declaration

```swift
func element(at index: Int) -> XCUIElement
```

## Parameters

- `index`: The element index to use.

## See Also

### Accessing matched elements

- [allElementsBoundByAccessibilityElement](xcuiautomation/xcuielementquery/allelementsboundbyaccessibilityelement.md)
- [allElementsBoundByIndex](xcuiautomation/xcuielementquery/allelementsboundbyindex.md)
- [count](xcuiautomation/xcuielementquery/count.md)
- [element](xcuiautomation/xcuielementquery/element.md)
- [element(boundBy:)](xcuiautomation/xcuielementquery/element(boundby:).md)
- [element(matching:)](xcuiautomation/xcuielementquery/element(matching:).md)
- [element(matching:identifier:)](xcuiautomation/xcuielementquery/element(matching:identifier:).md)
- [subscript(_:)](xcuiautomation/xcuielementquery/subscript(_:).md)
