Skip to content

Commit

Permalink
fix: add support to capture Android view tags
Browse files Browse the repository at this point in the history
  • Loading branch information
PouriaAmini committed Aug 13, 2024
1 parent 05d331c commit 54ff2e5
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ internal class AndroidViewTargetLocator : ViewTargetLocator {
val className = javaClass.canonicalName ?: javaClass.simpleName ?: null
val resourceName = resourceIdWithFallback
val hierarchy = hierarchy
val tag = tag?.toString()
val text = (this as? TextView)?.text?.toString()
return ViewTarget(this, className, resourceName, tag as? String, text, SOURCE, hierarchy)
return ViewTarget(this, className, resourceName, tag, text, SOURCE, hierarchy)
}

private fun View.touchWithinBounds(position: Pair<Float, Float>): Boolean {
Expand Down

0 comments on commit 54ff2e5

Please sign in to comment.