# androidx.wear.protolayout.testing

*** ** * ** ***

## Classes

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/LayoutElementAssertion` | Represents a layout element that can be asserted on. |
| `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/LayoutElementAssertionsProvider` | Provides the main entry point into testing by exposing methods to find a layout element. |
| `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/LayoutElementMatcher` | Wrapper for element matcher lambdas that allows to build string explaining to the developer what conditions are being tested. |
| `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/TestContext` | Context data for performing assertation on a layout, including: |

## Top-level functions summary

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/LayoutElementMatcher` | `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/package-summary#containsTag(kotlin.String)(value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` Returns a `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/LayoutElementMatcher` which checks whether the element's metadata tag contains the given value. |
| `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/LayoutElementMatcher` | `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/package-summary#hasAllCorners(kotlin.Float)(radiusDp: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Returns a `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/LayoutElementMatcher` which checks whether the element has all its four corners with the given radius. |
| `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/LayoutElementMatcher` | `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/package-summary#hasBottomLeftCorner(kotlin.Float,kotlin.Float)(xRadiusDp: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, yRadiusDp: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Returns a `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/LayoutElementMatcher` which checks whether the element has its bottom left corner with the given radii. |
| `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/LayoutElementMatcher` | `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/package-summary#hasBottomRightCorner(kotlin.Float,kotlin.Float)(xRadiusDp: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, yRadiusDp: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Returns a `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/LayoutElementMatcher` which checks whether the element has its bottom right corners with the given radii. |
| `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/LayoutElementMatcher` | `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/package-summary#hasChild(androidx.wear.protolayout.testing.LayoutElementMatcher)(matcher: https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/LayoutElementMatcher)` Returns a `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/LayoutElementMatcher` which checks whether the element has a child matching the given matcher. |
| `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/LayoutElementMatcher` | `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/package-summary#hasClickable(androidx.wear.protolayout.ActionBuilders.Action,kotlin.String,kotlin.Float,kotlin.Float)( action: https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ActionBuilders.Action, id: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?, minClickableWidth: @https://developer.android.com/reference/kotlin/androidx/annotation/Dimension(unit = 0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, minClickableHeight: @https://developer.android.com/reference/kotlin/androidx/annotation/Dimension(unit = 0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html )` Returns a `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/LayoutElementMatcher` which checks whether the element has the specific `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ModifiersBuilders.Clickable` attached. |
| `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/LayoutElementMatcher` | `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/package-summary#hasColor(kotlin.Int)(argb: @https://developer.android.com/reference/kotlin/androidx/annotation/ColorInt https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Returns a `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/LayoutElementMatcher` which checks whether the element is drawn with the given color. |
| `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/LayoutElementMatcher` | `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/package-summary#hasContentDescription(kotlin.text.Regex)(pattern: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.text/-regex/index.html)` Returns a `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/LayoutElementMatcher` which checks whether the element's content description matches the given pattern. |
| `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/LayoutElementMatcher` | `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/package-summary#hasContentDescription(kotlin.String)(value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` Returns a `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/LayoutElementMatcher` which checks whether the element's content description contains the given value. |
| `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/LayoutElementMatcher` | `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/package-summary#hasDescendant(androidx.wear.protolayout.testing.LayoutElementMatcher)(matcher: https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/LayoutElementMatcher)` Returns a `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/LayoutElementMatcher` which checks whether the element has a descendant matches the given matcher. |
| `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/LayoutElementMatcher` | `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/package-summary#hasHeight(androidx.wear.protolayout.DimensionBuilders.ContainerDimension)(height: https://developer.android.com/reference/kotlin/androidx/wear/protolayout/DimensionBuilders.ContainerDimension)` Returns a `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/LayoutElementMatcher` which checks whether the element has the given height value. |
| `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/LayoutElementMatcher` | `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/package-summary#hasHeight(androidx.wear.protolayout.DimensionBuilders.ProportionalDimensionProp)(height: https://developer.android.com/reference/kotlin/androidx/wear/protolayout/DimensionBuilders.ProportionalDimensionProp)` Returns a `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/LayoutElementMatcher` which checks whether the element has the given height value. |
| `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/LayoutElementMatcher` | `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/package-summary#hasImage(kotlin.String)(protolayoutResId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` Returns a `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/LayoutElementMatcher` which checks whether the element displays an image with the given protolayout resource id. |
| `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/LayoutElementMatcher` | `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/package-summary#hasTag(kotlin.String)(value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` Returns a `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/LayoutElementMatcher` which checks whether the element's metadata tag equals to the given value. |
| `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/LayoutElementMatcher` | `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/package-summary#hasText(kotlin.String,kotlin.Boolean,kotlin.Boolean)(value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, subString: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, ignoreCase: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` |
| `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/LayoutElementMatcher` | `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/package-summary#hasTopLeftCorner(kotlin.Float,kotlin.Float)(xRadiusDp: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, yRadiusDp: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Returns a `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/LayoutElementMatcher` which checks whether the element has its top left corner with the given radii. |
| `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/LayoutElementMatcher` | `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/package-summary#hasTopRightCorner(kotlin.Float,kotlin.Float)(xRadiusDp: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, yRadiusDp: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Returns a `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/LayoutElementMatcher` which checks whether the element has its top right corner with the given radii. |
| `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/LayoutElementMatcher` | `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/package-summary#hasWidth(androidx.wear.protolayout.DimensionBuilders.ContainerDimension)(width: https://developer.android.com/reference/kotlin/androidx/wear/protolayout/DimensionBuilders.ContainerDimension)` Returns a `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/LayoutElementMatcher` which checks whether the element has the given width value. |
| `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/LayoutElementMatcher` | `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/package-summary#hasWidth(androidx.wear.protolayout.DimensionBuilders.ProportionalDimensionProp)(width: https://developer.android.com/reference/kotlin/androidx/wear/protolayout/DimensionBuilders.ProportionalDimensionProp)` Returns a `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/LayoutElementMatcher` which checks whether the element has the given width value. |
| `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/LayoutElementMatcher` | `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/package-summary#isClickable()()` Returns a `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/LayoutElementMatcher` which checks whether the element is clickable. |
| `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/LayoutElementMatcher` | `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/package-summary#isSemanticsHeading()()` Returns a `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/LayoutElementMatcher` which checks whether the element is marked as heading for accessibility purpose. |

## Top-level functions

### containsTag

Artifact: [androidx.wear.protolayout:protolayout-testing](https://developer.android.com/jetpack/androidx/releases/wear-protolayout) [View Source](https://cs.android.com/search?q=file:androidx/wear/protolayout/testing/filters.kt+function:containsTag) Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.3.0)

```
fun containsTag(value: String): LayoutElementMatcher
```

Returns a `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/LayoutElementMatcher` which checks whether the element's metadata tag contains the given value.

### hasAllCorners

Artifact: [androidx.wear.protolayout:protolayout-testing](https://developer.android.com/jetpack/androidx/releases/wear-protolayout) [View Source](https://cs.android.com/search?q=file:androidx/wear/protolayout/testing/filters.kt+function:hasAllCorners) Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.3.0)

```
fun hasAllCorners(radiusDp: Float): LayoutElementMatcher
```

Returns a `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/LayoutElementMatcher` which checks whether the element has all its four corners with the given radius.

### hasBottomLeftCorner

Artifact: [androidx.wear.protolayout:protolayout-testing](https://developer.android.com/jetpack/androidx/releases/wear-protolayout) [View Source](https://cs.android.com/search?q=file:androidx/wear/protolayout/testing/filters.kt+function:hasBottomLeftCorner) Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.3.0)

```
fun hasBottomLeftCorner(xRadiusDp: Float, yRadiusDp: Float): LayoutElementMatcher
```

Returns a `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/LayoutElementMatcher` which checks whether the element has its bottom left corner with the given radii.

### hasBottomRightCorner

Artifact: [androidx.wear.protolayout:protolayout-testing](https://developer.android.com/jetpack/androidx/releases/wear-protolayout) [View Source](https://cs.android.com/search?q=file:androidx/wear/protolayout/testing/filters.kt+function:hasBottomRightCorner) Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.3.0)

```
fun hasBottomRightCorner(xRadiusDp: Float, yRadiusDp: Float): LayoutElementMatcher
```

Returns a `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/LayoutElementMatcher` which checks whether the element has its bottom right corners with the given radii.

### hasChild

Artifact: [androidx.wear.protolayout:protolayout-testing](https://developer.android.com/jetpack/androidx/releases/wear-protolayout) [View Source](https://cs.android.com/search?q=file:androidx/wear/protolayout/testing/filters.kt+function:hasChild) Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.3.0)

```
fun hasChild(matcher: LayoutElementMatcher): LayoutElementMatcher
```

Returns a `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/LayoutElementMatcher` which checks whether the element has a child matching the given matcher.

### hasClickable

Artifact: [androidx.wear.protolayout:protolayout-testing](https://developer.android.com/jetpack/androidx/releases/wear-protolayout) [View Source](https://cs.android.com/search?q=file:androidx/wear/protolayout/testing/filters.kt+function:hasClickable) Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.3.0)

```
fun hasClickable(
    action: ActionBuilders.Action = loadAction(),
    id: String? = null,
    minClickableWidth: @Dimension(unit = 0) Float = Float.NaN,
    minClickableHeight: @Dimension(unit = 0) Float = Float.NaN
): LayoutElementMatcher
```

Returns a `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/LayoutElementMatcher` which checks whether the element has the specific `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ModifiersBuilders.Clickable` attached.

### hasColor

Artifact: [androidx.wear.protolayout:protolayout-testing](https://developer.android.com/jetpack/androidx/releases/wear-protolayout) [View Source](https://cs.android.com/search?q=file:androidx/wear/protolayout/testing/filters.kt+function:hasColor) Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.3.0)

```
fun hasColor(argb: @ColorInt Int): LayoutElementMatcher
```

Returns a `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/LayoutElementMatcher` which checks whether the element is drawn with the given color.

### hasContentDescription

Artifact: [androidx.wear.protolayout:protolayout-testing](https://developer.android.com/jetpack/androidx/releases/wear-protolayout) [View Source](https://cs.android.com/search?q=file:androidx/wear/protolayout/testing/filters.kt+function:hasContentDescription) Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.3.0)

```
fun hasContentDescription(pattern: Regex): LayoutElementMatcher
```

Returns a `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/LayoutElementMatcher` which checks whether the element's content description matches the given pattern.

| Parameters |
|---|---|
| `pattern: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.text/-regex/index.html` | String pattern to match with content description. |

### hasContentDescription

Artifact: [androidx.wear.protolayout:protolayout-testing](https://developer.android.com/jetpack/androidx/releases/wear-protolayout) [View Source](https://cs.android.com/search?q=file:androidx/wear/protolayout/testing/filters.kt+function:hasContentDescription) Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.3.0)

```
fun hasContentDescription(value: String): LayoutElementMatcher
```

Returns a `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/LayoutElementMatcher` which checks whether the element's content description contains the given value.

| Parameters |
|---|---|
| `value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | Value to match with content description. |

### hasDescendant

Artifact: [androidx.wear.protolayout:protolayout-testing](https://developer.android.com/jetpack/androidx/releases/wear-protolayout) [View Source](https://cs.android.com/search?q=file:androidx/wear/protolayout/testing/filters.kt+function:hasDescendant) Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.3.0)

```
fun hasDescendant(matcher: LayoutElementMatcher): LayoutElementMatcher
```

Returns a `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/LayoutElementMatcher` which checks whether the element has a descendant matches the given matcher.

### hasHeight

Artifact: [androidx.wear.protolayout:protolayout-testing](https://developer.android.com/jetpack/androidx/releases/wear-protolayout) [View Source](https://cs.android.com/search?q=file:androidx/wear/protolayout/testing/filters.kt+function:hasHeight) Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.3.0)

```
fun hasHeight(height: DimensionBuilders.ContainerDimension): LayoutElementMatcher
```

Returns a `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/LayoutElementMatcher` which checks whether the element has the given height value.

### hasHeight

Artifact: [androidx.wear.protolayout:protolayout-testing](https://developer.android.com/jetpack/androidx/releases/wear-protolayout) [View Source](https://cs.android.com/search?q=file:androidx/wear/protolayout/testing/filters.kt+function:hasHeight) Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.3.0)

```
fun hasHeight(height: DimensionBuilders.ProportionalDimensionProp): LayoutElementMatcher
```

Returns a `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/LayoutElementMatcher` which checks whether the element has the given height value.

### hasImage

Artifact: [androidx.wear.protolayout:protolayout-testing](https://developer.android.com/jetpack/androidx/releases/wear-protolayout) [View Source](https://cs.android.com/search?q=file:androidx/wear/protolayout/testing/filters.kt+function:hasImage) Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.3.0)

```
fun hasImage(protolayoutResId: String): LayoutElementMatcher
```

Returns a `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/LayoutElementMatcher` which checks whether the element displays an image with the given protolayout resource id.

| Parameters |
|---|---|
| `protolayoutResId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | The resource id of the image, which should be a protolayout resource id instead of android resource id. |

### hasTag

Artifact: [androidx.wear.protolayout:protolayout-testing](https://developer.android.com/jetpack/androidx/releases/wear-protolayout) [View Source](https://cs.android.com/search?q=file:androidx/wear/protolayout/testing/filters.kt+function:hasTag) Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.3.0)

```
fun hasTag(value: String): LayoutElementMatcher
```

Returns a `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/LayoutElementMatcher` which checks whether the element's metadata tag equals to the given value.

### hasText

Artifact: [androidx.wear.protolayout:protolayout-testing](https://developer.android.com/jetpack/androidx/releases/wear-protolayout) [View Source](https://cs.android.com/search?q=file:androidx/wear/protolayout/testing/filters.kt+function:hasText) Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.3.0)

```
fun hasText(value: String, subString: Boolean = false, ignoreCase: Boolean = false): LayoutElementMatcher
```

### hasTopLeftCorner

Artifact: [androidx.wear.protolayout:protolayout-testing](https://developer.android.com/jetpack/androidx/releases/wear-protolayout) [View Source](https://cs.android.com/search?q=file:androidx/wear/protolayout/testing/filters.kt+function:hasTopLeftCorner) Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.3.0)

```
fun hasTopLeftCorner(xRadiusDp: Float, yRadiusDp: Float): LayoutElementMatcher
```

Returns a `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/LayoutElementMatcher` which checks whether the element has its top left corner with the given radii.

### hasTopRightCorner

Artifact: [androidx.wear.protolayout:protolayout-testing](https://developer.android.com/jetpack/androidx/releases/wear-protolayout) [View Source](https://cs.android.com/search?q=file:androidx/wear/protolayout/testing/filters.kt+function:hasTopRightCorner) Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.3.0)

```
fun hasTopRightCorner(xRadiusDp: Float, yRadiusDp: Float): LayoutElementMatcher
```

Returns a `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/LayoutElementMatcher` which checks whether the element has its top right corner with the given radii.

### hasWidth

Artifact: [androidx.wear.protolayout:protolayout-testing](https://developer.android.com/jetpack/androidx/releases/wear-protolayout) [View Source](https://cs.android.com/search?q=file:androidx/wear/protolayout/testing/filters.kt+function:hasWidth) Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.3.0)

```
fun hasWidth(width: DimensionBuilders.ContainerDimension): LayoutElementMatcher
```

Returns a `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/LayoutElementMatcher` which checks whether the element has the given width value.

### hasWidth

Artifact: [androidx.wear.protolayout:protolayout-testing](https://developer.android.com/jetpack/androidx/releases/wear-protolayout) [View Source](https://cs.android.com/search?q=file:androidx/wear/protolayout/testing/filters.kt+function:hasWidth) Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.3.0)

```
fun hasWidth(width: DimensionBuilders.ProportionalDimensionProp): LayoutElementMatcher
```

Returns a `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/LayoutElementMatcher` which checks whether the element has the given width value.

### isClickable

Artifact: [androidx.wear.protolayout:protolayout-testing](https://developer.android.com/jetpack/androidx/releases/wear-protolayout) [View Source](https://cs.android.com/search?q=file:androidx/wear/protolayout/testing/filters.kt+function:isClickable) Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.3.0)

```
fun isClickable(): LayoutElementMatcher
```

Returns a `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/LayoutElementMatcher` which checks whether the element is clickable.

### isSemanticsHeading

Artifact: [androidx.wear.protolayout:protolayout-testing](https://developer.android.com/jetpack/androidx/releases/wear-protolayout) [View Source](https://cs.android.com/search?q=file:androidx/wear/protolayout/testing/filters.kt+function:isSemanticsHeading) Added in [1.4.2](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.4.2)

```
fun isSemanticsHeading(): LayoutElementMatcher
```

Returns a `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/testing/LayoutElementMatcher` which checks whether the element is marked as heading for accessibility purpose.