driver = webdriver.Firefox()
driver.get('https://stackoverflow.com')
element = driver.find_element_by_xpath('//div[@class="network-items"]/a')
attrs = driver.execute_script(
    'var items = {}; for (index = 0; index < arguments[0].attributes.length; ++index) { items[arguments[0].attributes[index].name] = arguments[0].attributes[index].value }; return items;'
    , element)
Selenium webdriver: как найти ВСЕ атрибуты элемента?