MCPcopy Create free account
hub / github.com/AirtestProject/Poco / wait

Method wait

poco/proxy.py:645–661  ·  view source on GitHub ↗

Block and wait for max given time before the UI element appears. Args: timeout: maximum waiting time in seconds Returns: :py:class:`UIObjectProxy `: self

(self, timeout=3)

Source from the content-addressed store, hash-verified

643 return dir_vec
644
645 def wait(self, timeout=3):
646 """
647 Block and wait for max given time before the UI element appears.
648
649 Args:
650 timeout: maximum waiting time in seconds
651
652 Returns:
653 :py:class:`UIObjectProxy <poco.proxy.UIObjectProxy>`: self
654 """
655
656 start = time.time()
657 while not self.exists():
658 self.poco.sleep_for_polling_interval()
659 if time.time() - start > timeout:
660 break
661 return self
662
663 def wait_for_appearance(self, timeout=120):
664 """

Callers

nothing calls this directly

Calls 2

existsMethod · 0.95

Tested by

no test coverage detected