0

Is it possible that if I write in my integration test:

all("a")[0]

the test goes well but when writing:

click_on(all("a")[0])

I get the error message "unable to find link or button"?

The has

href="javascript:void(0)"
TakeMeToTheMoon
  • 527
  • 1
  • 8
  • 25

1 Answers1

0

The element return by all("a")[0] have a .click function.

all("a")[0].click

Or instead find by the name

all("#name_of_link").click
Pedro Ivan
  • 322
  • 1
  • 14