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

Method get_text

poco/proxy.py:778–789  ·  view source on GitHub ↗

Get the text attribute of the UI element. Return None if no such attribute. Similar to :py:meth:`.attr('text') `. Returns: :obj:`str`: None if the UI element does not have the text element, otherwise the utf-8 encoded text value.

(self)

Source from the content-addressed store, hash-verified

776 return False
777
778 def get_text(self):
779 """
780 Get the text attribute of the UI element. Return None if no such attribute. Similar to :py:meth:`.attr('text')
781 <poco.proxy.UIObjectProxy.attr>`.
782
783 Returns:
784 :obj:`str`: None if the UI element does not have the text element, otherwise the utf-8 encoded text value.
785 In both py2 and py3, the return value type will be :obj:`str`.
786 """
787
788 text = self.attr('text')
789 return text
790
791 def set_text(self, text):
792 """

Callers 6

runTestMethod · 0.80
using_freezingMethod · 0.80
no_using_freezingMethod · 0.80
runTestMethod · 0.80
test_set_textMethod · 0.80
test_clear_textMethod · 0.80

Calls 1

attrMethod · 0.95

Tested by 2

test_set_textMethod · 0.64
test_clear_textMethod · 0.64