MCPcopy Create free account
hub / github.com/dtmilano/AndroidViewClient / getCoords

Method getCoords

src/com/dtmilano/android/viewclient.py:792–805  ·  view source on GitHub ↗

Gets the coords of the View @return: A tuple containing the View's coordinates ((L, T), (R, B))

(self)

Source from the content-addressed store, hash-verified

790 return x + hx + wvx + pwx, y + hy + wvy - statusBarOffset + pwy
791
792 def getCoords(self):
793 """
794 Gets the coords of the View
795
796 @return: A tuple containing the View's coordinates ((L, T), (R, B))
797 """
798
799 if DEBUG_COORDS:
800 print("getCoords(%s %s ## %s)" % (self.getClass(), self.getId(), self.getUniqueId()), file=sys.stderr)
801
802 (x, y) = self.getXY()
803 w = self.getWidth()
804 h = self.getHeight()
805 return (x, y), (x + w, y + h)
806
807 def getPositionAndSize(self):
808 """

Callers 11

getBoundsMethod · 0.95
getCenterMethod · 0.95
writeImageToFileMethod · 0.95
__microStr__Method · 0.95
viewTreeItemClickedMethod · 0.80
findTargetsMethod · 0.80
__getClassAndIdMethod · 0.80

Calls 6

getClassMethod · 0.95
getIdMethod · 0.95
getUniqueIdMethod · 0.95
getXYMethod · 0.95
getWidthMethod · 0.95
getHeightMethod · 0.95

Tested by 2

__getClassAndIdMethod · 0.64