get href attribute of element code example
Example 1: get href attribute javascript
document.getElementById("link")[0].getAttribute("href");
Example 2: get attribute href
document.find_element_by_xpath("//example").getAttribute('href')
document.getElementById("link")[0].getAttribute("href");
document.find_element_by_xpath("//example").getAttribute('href')