Method: Celerity::Browser#asynchronized
- Defined in:
- lib/celerity/browser.rb
#asynchronized {|browser| ... } ⇒ Object
Allows you to temporarliy switch to HtmlUnit’s default AjaxController, so ajax calls are performed asynchronously. This is useful if you have created the Browser with :resynchronize => true, but want to switch it off temporarily.
485 486 487 488 489 490 |
# File 'lib/celerity/browser.rb', line 485 def asynchronized(&block) old_controller = @webclient.ajaxController @webclient.setAjaxController(::HtmlUnit::AjaxController.new) yield self @webclient.setAjaxController(old_controller) end |