MCPcopy Index your code
hub / github.com/AirtestProject/Poco / focus

Method focus

poco/proxy.py:580–593  ·  view source on GitHub ↗

Get a new UI proxy copy with the given focus. Return a new UI proxy object as the UI proxy is immutable. Args: f (2-:obj:`tuple`/2-:obj:`list`/:obj:`str`): the focus point, it can be specified as 2-list/2-tuple coordinates (x, y) in NormalizedCoordinate sys

(self, f)

Source from the content-addressed store, hash-verified

578 return PendingGestureAction(self.poco, self)
579
580 def focus(self, f):
581 """
582 Get a new UI proxy copy with the given focus. Return a new UI proxy object as the UI proxy is immutable.
583
584 Args:
585 f (2-:obj:`tuple`/2-:obj:`list`/:obj:`str`): the focus point, it can be specified as 2-list/2-tuple
586 coordinates (x, y) in NormalizedCoordinate system or as 'center' or 'anchor'.
587
588 Returns:
589 :py:class:`UIObjectProxy <poco.proxy.UIObjectProxy>`: a new UI proxy object (copy)
590 """
591 ret = copy.copy(self)
592 ret._focus = f
593 return ret
594
595 @volatile_attribute
596 def get_position(self, focus=None):

Callers 6

scrollMethod · 0.95
runTestMethod · 0.80
runTestMethod · 0.80
runTestMethod · 0.80
runTestMethod · 0.80
runTestMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected