Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does Capybara has_selector? wait like

Tags:

ruby

capybara

When I use Capybara's has_selector? does it wait and retry to try to find the dom node like the find() method does? I'm not finding any useful information in the docs below. I'm interested in the answer, but I'm really more interested in how I would deduce that information from the ruby docs (which always give me problems navigating).

http://rubydoc.info/github/jnicklas/capybara/master/Capybara/Node/Matchers#has_selector%3F-instance_method

http://rubydoc.info/github/jnicklas/capybara/master/Capybara/Node/Finders#find-instance_method

like image 733
Jazzepi Avatar asked Sep 12 '13 14:09

Jazzepi


1 Answers

Yes. If you look at the assert_selector source, it calls synchronize.

http://rubydoc.info/github/jnicklas/capybara/master/Capybara/Node/Base#synchronize-instance_method

"Show source" is your friend, most rendered docs will have it. And then there is always the actual source code. Which, many times, will trump any rendered documentation.

like image 180
nowk Avatar answered Nov 12 '22 06:11

nowk