site-prism

how do you set the implicit wait time in site-prism?


Left to it's own devices Site-prism does not use implicit waits. On the website it shows that you can allow implicit waits by setting use_implicit_waits = true. The site does not however show how to actually set the implicit wait value and the ruby doc does not show anything that was helpful. Any help would be appreciated.


Solution

  • The way to set this is to set the value of Capybara.default_wait_time

    If using cucumber, set it in env.rb as Capybara.default_wait_time = 3 or

    Capybara.configure do |config|
      config.default_wait_time = 3
    end
    

    If using rspec purely, set it in spec_helper.rb

    The previous answer by clancey from above was only existent for about half of the 2.x revision, and is no longer present in V3 of the API. See https://github.com/natritmeyer/site_prism/blob/master/UPGRADING.md for more information