def __filter_params(params):
    """Filter the params and return the way to find the object (by_element or by_attribute).

    Parameters:
    - params [dict] : A dict that contains elements to search the element for
    Returns: 
    - by_element [dict] : A dict that contains Selenium filters
    - by_attribute [dict] : A dict that contains attributes filters
    """
    params = params.copy()
    by_element_list = ['id', 'name', 'xpath', 'link_text',
        'partial_link_text', 'tag_name', 'class_name', 'css_selector']
    by_element = {}
    by_attribute = {}
    while len(params) > 0:
        key = next(iter(params))
        if key in by_element_list:
            by_element[key] = params.get(key)
        else:
            by_attribute[key] = params.get(key)
        del params[key]
    return by_element, by_attribute
