How do I get a link from Google? I tried the following ways, but none of them worked:
find_elements_by_xpath("//*[@class='r']/@href")
driver.find_element_by_xpath("//a").get_attribute("href")
driver.find_element_by_xpath("//a").get_attribute(("href")[2])
I am receiving "none"
I need to get google link, not link to the site (e.g. not www.stackoverflow.com). It's highlighted on this image: