click on links from an array

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

click on links from an array

Abdel Latif
I have an array that has hrefs :

arr=["", ""]

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

when I run it I got :

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

Thanks, your help is appreciated.

You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit
For more options, visit