Skip to content

Commit 7555745

Browse files
authored
fix invalid xpath attr (#1143)
1 parent 9603bce commit 7555745

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

uiautomator2/xpath.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -481,10 +481,10 @@ def wait(self, timeout=None) -> bool:
481481
return False
482482
time.sleep(0.2)
483483

484-
def match(self) -> Optional["XMLElement"]:
484+
def match(self) -> Optional["DeviceXMLElement"]:
485485
"""
486486
Returns:
487-
None or matched XMLElement
487+
None or matched DeviceXMLElement
488488
"""
489489
if self.exists:
490490
return self.get_last_match()
@@ -545,7 +545,7 @@ def __getattr__(self, key: str):
545545
"""
546546
if key.startswith("_"):
547547
raise AttributeError("Invalid attr", key)
548-
if not hasattr(XMLElement, key):
548+
if not hasattr(DeviceXMLElement, key):
549549
raise AttributeError("Invalid attr", key)
550550
el = self.get()
551551
return getattr(el, key)

0 commit comments

Comments
 (0)