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

Method sibling

poco/proxy.py:172–190  ·  view source on GitHub ↗

Select the sibling(s) from the UI element(s) given by the query expression, see ``QueryCondition`` for more details about the selectors. Args: name: query expression of attribute "name", i.e. the UI elements with ``name`` name will be selected attrs:

(self, name=None, **attrs)

Source from the content-addressed store, hash-verified

170 return obj
171
172 def sibling(self, name=None, **attrs):
173 """
174 Select the sibling(s) from the UI element(s) given by the query expression, see ``QueryCondition`` for more
175 details about the selectors.
176
177 Args:
178 name: query expression of attribute "name", i.e. the UI elements with ``name`` name will be selected
179 attrs: other query expression except for the ``name``
180
181 Returns:
182 :py:class:`UIObjectProxy <poco.proxy.UIObjectProxy>`: a new UI proxy object representing the child(ren) of
183 current UI element(s)
184 """
185
186 sub_query = build_query(name, **attrs)
187 query = ('-', (self.query, sub_query))
188 obj = UIObjectProxy(self.poco)
189 obj.query = query
190 return obj
191
192 def parent(self):
193 """

Callers

nothing calls this directly

Calls 2

build_queryFunction · 0.90
UIObjectProxyClass · 0.85

Tested by

no test coverage detected