Skip to content

Feature Request: compose/click module could use a TestTag semantic property as a fallback to set clickable element name #1311

@Mateusz-Stasielowicz

Description

@Mateusz-Stasielowicz

A proposal to use the SemanticsProperties.TestTag as a fallback in compose/click module to discover clicked node name and send it as app.widget.name.

Currently only SemanticsActions.OnClick and SemanticsProperties.ContentDescription are discovered on clickable composable element to get the name of clicked widget.

In many cases the TestTag is used on the clickable elements for further testing purposes and it would be nice to have this also as an option in open-telemetry to not duplicate multiple semantic properties with the same value.

code snippet

val testTagSemanticsConfiguration = getOrNull(SemanticsProperties.TestTag)
if (testTagSemanticsConfiguration.isNullOrBlank().not()) {
    return testTagSemanticsConfiguration
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions