click on links from an array

HI,
I have an array that has hrefs :

arr=["https://demo.massbrc.com/applicants/57/applicant_identity_documents/new", "https://demo.massbrc.com/applicants/47/applicant_identity_documents/new"]

arr.each do |link|
  driver.find_element(xpath: "//*[@href='#{link}']").  click
driver.navigate.back
end

when I run it I got :

Unable to locate element: //*[@href="#{link}"] (Selenium::WebDriver::Error::NoSuchElementError)

Thanks, your help is appreciated.