Retrieve the element name and type of element based on the href.
    You may have a href that is within another element reference and
    want more information on that reference.

    :param str href: href of element
    :return: tuple (name, type)
542563
def element_name_and_type_by_href(href):
    
    if href:
        element = fetch_json_by_href(href)
        if element.json:
            for entries in element.json.get('link'):
                if entries.get('rel') == 'self':
                    typeof = entries.get('type')

            return (element.json.get('name'),
                    typeof)
1224462
def get_elements_attributes(parent_to_parse, element_path=None, attrib_name=None):
    

    attrs = _get_elements_property(parent_to_parse, element_path, 'attrib')

    if not attrib_name:
        return attrs

    return [attr[attrib_name] for attr in attrs if attrib_name in attr]
750629
def element_href(name):
    
    if name:
        element = fetch_meta_by_name(name)
        if element.href:
            return element.href
1317696
def web_elements(self):
        
        if not self._web_elements or not self.config.getboolean_optional('Driver', 'save_web_element'):
            if self.parent:
                self._web_elements = self.utils.get_web_element(self.parent).find_elements(*self.locator)
            else:
                self._web_elements = self.driver.find_elements(*self.locator)
        return self._web_elements
597494
def find_element(self, name, type=ElementType.ANY):
        

        for e in self.e_list:
            # if a type is specified and this isn't it, move to the next loop.
            if type.value and not e['elementType'] == type:
                continue
            if e["name"] == name:
                uri = self.uri
                uri.eid = e["id"]
                return uri
112715
def element_type(self):
        
        if not self.is_pointer:
            raise ValueError("Type {} is not a pointer".format(self))
        return TypeRef(ffi.lib.LLVMPY_GetElementType(self))
421520
def etag(self, href):
        
        if self and self._etag is None:
            self._etag = LoadElement(href, only_etag=True)
        return self._etag
999255
def get_choice_href(self):
        
        if 'choiceInfo' not in self.dto[self.name]:
            raise GPException('not a choice parameter')

        return self.dto[self.name]['choiceInfo']['href']
330138
def _get_links(self,):
        
        res = ''
        if self.links:
            for l in self.links:
                res += ' links = ' + str(l[0]) + '\n'
                if l[0].child_nodes:
                    for chld in l[0].child_nodes:
                        res += '   child = ' + str(chld) + '\n'
                if l[0].links:
                    for lnk in l[0].links:
                        res += '   sublink = ' + str(lnk[0]) + '\n'
        else:
            res += ' links = None\n'
            
        return res
471980
def _get_link(element: Element) -> Optional[str]:
    
    link = get_text(element, 'link')
    if link is not None:
        return link

    guid = get_child(element, 'guid')
    if guid is not None and guid.attrib.get('isPermaLink') == 'true':
        return get_text(element, 'guid')

    return None
1145749
def _hlink(self):
        
        if self._hover:
            return self._element.hlinkHover
        return self._element.hlinkClick
1321476
public function getArcroleTypes( $href = null )
	{
		if ( $href === null )
			return $this->arcroleTypes;
		else
		{
			$taxonomy = $this->getTaxonomyForXSD( $href );
			return ( $taxonomy === false )
				? false
				: $taxonomy->getArcroleTypes();
		}
	}
844513
def name(self):
        
        if hasattr(self._element, "name"):
            return self._element.name
        else:
            return str(self._element)
806278
def by_type(self, type_name):
        '''
        
        '''
        if IRestorator.providedBy(type_name):
            type_name = type_name.type_name
        return (x[1] for x in self._links if x[0] == type_name)
132767
def should_include_link_text(self, link_text, link_url):
    

    elements = ElementSelector(
        world.browser,
        str('//a[@href="%s"][contains(., %s)]' %
            (link_url, string_literal(link_text))),
        filter_displayed=True,
    )
    if not elements:
        raise AssertionError("Expected link not found.")
1287735
def iter_links_param_element(cls, element):
        ''''''
        valuetype = element.attrib.get('valuetype', '')

        if valuetype.lower() == 'ref' and 'value' in element.attrib:
            link_type = identify_link_type(element.attrib.get('value'))

            yield LinkInfo(
                element=element, tag=element.tag, attrib='value',
                link=element.attrib.get('value'),
                inline=True, linked=False,
                base_link=None,
                value_type='plain',
                link_type=link_type
            )
453019
def _get_elements(self, site):
        
        try:
            if isinstance(site.specie, Element):
                return [site.specie]
            return [Element(site.specie)]
        except:
            return site.species.elements