Match element's ID.
349969
def match_id(self, el, ids):
        """"""

        found = True
        for i in ids:
            if i != self.get_attribute_by_name(el, 'id', ''):
                found = False
                break
        return found
1229720
private static List<String> getElementsId(List<Element> elementList) {
        List<String> result = new ArrayList<String>();

        for (Element element : elementList) {
            result.add(element.getAttribute("id"));
        }

        return result;
    }
59782
def get_id2upper(objs):
    """"""
    id2upper = {}
    for obj in objs:
        _get_id2upper(id2upper, obj.item_id, obj)
    return id2upper
1288540
def match_contains(self, el, contains):
        """"""

        match = True
        content = None
        for contain_list in contains:
            if content is None:
                content = self.get_text(el, no_iframe=self.is_html)
            found = False
            for text in contain_list.text:
                if text in content:
                    found = True
                    break
            if not found:
                match = False
        return match
76457
function(el) {
                var id = el.id;

                if (!id) {
                    id = "yuievtautoid-" + counter;
                    ++counter;
                    el.id = id;
                }

                return id;
            }
1074558
def should_see_id(self, element_id):
    

    elements = ElementSelector(
        world.browser,
        'id("%s")' % element_id,
        filter_displayed=True,
    )
    if not elements:
        raise AssertionError("Expected element with given id.")
742551
static void checkId(String id) {
    if (!ID.matcher(id).matches()) {
      throw new IllegalArgumentException(String.format("not a valid js identifier: %s", id));
    }
  }
753377
def _ensure_object_id(cls, id):
        """"""
        if isinstance(id, ObjectId):
            return id

        if isinstance(id, basestring) and OBJECTIDEXPR.match(id):
            return ObjectId(id)

        return id
787173
def _get_id(self):
        """"""
        ret = None
        row = self.row
        if row:
            ret = row["id"]
        return ret
436124
def get_element_id(self, complete_name):
        """"""
        [group, name] = complete_name.split('.')
        element = self.get_element(group, name)
        if element:
            return element.ident
        else:
            logger.warning('Unable to find variable [%s]', complete_name)
            return None
714493
def _match(filtered, matcher):
    """"""

    def match_filtered_identities(x, ids, matcher):
        """Check if an identity matches a set of identities"""

        for y in ids:
            if x.uuid == y.uuid:
                return True
            if matcher.match_filtered_identities(x, y):
                return True
        return False

    # Find subsets of matches
    matched = []

    while filtered:
        candidates = []
        no_match = []

        x = filtered.pop(0)

        while matched:
            ids = matched.pop(0)

            if match_filtered_identities(x, ids, matcher):
                candidates += ids
            else:
                no_match.append(ids)

        candidates.append(x)

        # Generate the new list of matched subsets
        matched = [candidates] + no_match

    return matched
1339521
def get_element_id(element):
        
        id_attrib_key = add_ns('id')
        if id_attrib_key in element.attrib:
            return element.attrib[id_attrib_key]
        try:
            return element.getparent().attrib[id_attrib_key]
        except KeyError as e:
            raise KeyError(
                'Neither the element "{0}" nor its parent "{1}" '
                'have an ID'.format(element, element.getparent()))
639999
def match_paren(self, tokens, item):
        """"""
        match, = tokens
        return self.match(match, item)
403351
def match(tgt, opts=None):
    '''
    
    '''
    if not opts:
        return bool(re.match(tgt, __opts__['id']))
    else:
        return bool(re.match(tgt, opts['id']))
814154
def dom_id(self):
        """"""
        parameter = 'DOMID'
        if parameter not in self._by:
            self._populate(by=parameter)
        return self._by[parameter]
26922
def _ids(self):
        """"""
        for pk in self._pks:
            yield getattr(self, pk)

        for pk in self._pks:

            try:
                yield str(getattr(self, pk))
            except ValueError:
                pass
207480
def _get_by_id(collection, id):
    '''
    
    '''
    matches = [item for item in collection if item.id == id]
    if not matches:
        raise ValueError('Could not find a matching item')
    elif len(matches) > 1:
        raise ValueError('The id matched {0} items, not 1'.format(len(matches)))
    return matches[0]