mirror of
https://github.com/priyanshujain/sanderling.git
synced 2026-10-02 11:07:10 +00:00
feat(hierarchy): expose checked/focused/selected on element objects
This commit is contained in:
1 parent
b248ad2e5a
commit
6c7ea35a7d
2 files changed
+14
No files matched your search
@@ -42,6 +42,9 @@ type Element struct {
|
||||
Package string
|
||||
Clickable bool
|
||||
Enabled bool
|
||||
Checked bool
|
||||
Focused bool
|
||||
Selected bool
|
||||
Bounds Bounds
|
||||
}
|
||||
|
||||
@@ -160,6 +163,12 @@ func elementFromStart(start xml.StartElement) (*Element, error) {
|
||||
element.Clickable = attribute.Value == "true"
|
||||
case "enabled":
|
||||
element.Enabled = attribute.Value == "true"
|
||||
case "checked":
|
||||
element.Checked = attribute.Value == "true"
|
||||
case "focused":
|
||||
element.Focused = attribute.Value == "true"
|
||||
case "selected":
|
||||
element.Selected = attribute.Value == "true"
|
||||
case "bounds":
|
||||
boundsText = attribute.Value
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user