MCPcopy
hub / github.com/AirtestProject/Poco / get_bounds

Method get_bounds

poco/proxy.py:826–840  ·  view source on GitHub ↗

Get the parameters of bounding box of the UI element. Returns: :obj:`list` <:obj:`float`>: 4-list (top, right, bottom, left) coordinates related to the edge of screen in NormalizedCoordinate system

(self)

Source from the content-addressed store, hash-verified

824
825 @volatile_attribute
826 def get_bounds(self):
827 """
828 Get the parameters of bounding box of the UI element.
829
830 Returns:
831 :obj:`list` <:obj:`float`>: 4-list (top, right, bottom, left) coordinates related to the edge of screen in
832 NormalizedCoordinate system
833 """
834
835 size = self.get_size()
836 top_left = self.get_position([0, 0])
837
838 # t, r, b, l
839 bounds = [top_left[1], top_left[0] + size[0], top_left[1] + size[1], top_left[0]]
840 return bounds
841
842 def __str__(self):
843 if six.PY2:

Callers

nothing calls this directly

Calls 2

get_sizeMethod · 0.95
get_positionMethod · 0.95

Tested by

no test coverage detected