Lines Matching defs:selector

42     // During a pattern selector search, the recursive pattern search
47 // These help show each selector's search context as it relates to the previous sub selector
48 // matched. When a compound selector fails, it is hard to tell which part of it is failing.
49 // Seeing how a selector is being parsed and which sub selector failed within a long list
120 * Counts the instances of the selector group. The selector must be in the following
124 * @param selector
127 public int getPatternCount(UiSelector selector) {
128 findAccessibilityNodeInfo(selector, true /*counting*/);
134 * @param selector
137 public AccessibilityNodeInfo findAccessibilityNodeInfo(UiSelector selector) {
138 return findAccessibilityNodeInfo(selector, false);
141 protected AccessibilityNodeInfo findAccessibilityNodeInfo(UiSelector selector,
147 Log.d(LOG_TAG, "Searching: " + selector);
157 UiSelector uiSelector = new UiSelector(selector);
205 * top most selector is processed as regular_selector within the context of the previous
206 * CONTAINER and its PATTERN information. If neither is present then the top selector is
208 * a selector simply dictates that the selector matching will be constraint to the sub tree
210 * @param selector
215 private AccessibilityNodeInfo translateCompoundSelector(UiSelector selector,
221 if(selector.hasContainerSelector())
223 if(selector.getContainerSelector().hasContainerSelector()) {
225 selector.getContainerSelector(), fromNode, false);
228 fromNode = translateReqularSelector(selector.getContainerSelector(), fromNode);
230 fromNode = translateReqularSelector(selector, fromNode);
234 Log.d(LOG_TAG, "Container selector not found: " + selector.dumpToString(false));
238 if(selector.hasPatternSelector()) {
239 fromNode = translatePatternSelector(selector.getPatternSelector(),
244 "Counted %d instances of: %s", mPatternCounter, selector));
249 Log.d(LOG_TAG, "Pattern selector not found: " +
250 selector.dumpToString(false));
256 // translate any additions to the selector that may have been added by tests
257 // with getChild(By selector) after a container and pattern selectors
258 if(selector.hasContainerSelector() || selector.hasPatternSelector()) {
259 if(selector.hasChildSelector() || selector.hasParentSelector())
260 fromNode = translateReqularSelector(selector, fromNode);
265 Log.d(LOG_TAG, "Object Not Found for selector " + selector);
268 Log.i(LOG_TAG, String.format("Matched selector: %s <<==>> [%s]", selector, fromNode));
281 * @param selector
285 private AccessibilityNodeInfo translateReqularSelector(UiSelector selector,
288 return findNodeRegularRecursive(selector, fromNode, 0);
303 mLogIndent++; // next selector
306 Log.e(LOG_TAG, "Error: A child selector without content");
310 mLogIndent++; // next selector
313 Log.e(LOG_TAG, "Error: A parent selector without content");
316 // the selector requested we start at this level from
389 Log.e(LOG_TAG, "Pattern portion of the selector is null or not defined");
398 Log.e(LOG_TAG, "Selector must have a pattern selector defined"); // implementation fault?
420 // At a leaf selector within a group and still not instance matched
421 // then reset the selector to continue search from current position
434 mLogIndent++; // next selector
437 Log.e(LOG_TAG, "Error: A child selector without content");
441 mLogIndent++; // next selector
444 Log.e(LOG_TAG, "Error: A parent selector without content");