get attribut href code example Example: get attribute href document.find_element_by_xpath("//example").getAttribute('href')