Gets the View X coordinate
(self)
| 641 | return self.getXY()[0] |
| 642 | |
| 643 | def __getX(self): |
| 644 | """ |
| 645 | Gets the View X coordinate |
| 646 | """ |
| 647 | |
| 648 | if DEBUG_COORDS: |
| 649 | print("getX(%s %s ## %s)" % (self.getClass(), self.getId(), self.getUniqueId()), file=sys.stderr) |
| 650 | x = 0 |
| 651 | |
| 652 | if self.useUiAutomator: |
| 653 | x = self.map['bounds'][0][0] |
| 654 | else: |
| 655 | try: |
| 656 | if GET_VISIBILITY_PROPERTY in self.map and self.map[GET_VISIBILITY_PROPERTY] == 'VISIBLE': |
| 657 | _x = int(self.map[self.leftProperty]) |
| 658 | if DEBUG_COORDS: print(" getX: VISIBLE adding %d" % _x, file=sys.stderr) |
| 659 | x += _x |
| 660 | except: |
| 661 | warnings.warn("View %s has no '%s' property" % (self.getId(), self.leftProperty)) |
| 662 | |
| 663 | if DEBUG_COORDS: print(" getX: returning %d" % (x), file=sys.stderr) |
| 664 | return x |
| 665 | |
| 666 | def getY(self): |
| 667 | """ |
no test coverage detected