For my acceptance tests I use Steak and Capybara (+ Envjs).
When trying to find an element like this find("#ticker").find("li:eq(0)") it tells me Unable to find 'li:eq(0)', but find("#ticker").find("li:eq(1)") return the correct first li element in the list.
I am used to that eq selector starts with 0 (jQuery). Why does eq selector in Capybara starts with 1? Bug or feature?
It seems that it is some unofficial selector which works like nth-child. What does Capybara (/Envjs) use under the hood for selectors? It doesn't seem to be jQuery as it would start with eq(0) as mentioned above.
Capybara uses Nokogiri under the hood.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With