Method: Celerity::ClickableElement#download

Defined in:
lib/celerity/clickable_element.rb

#downloadIO

Click the element and just return the content as IO. Current page stays unchanged. This can be used to download content that normally isn’t rendered in a browser.

Returns:

  • (IO)


59
60
61
62
63
64
# File 'lib/celerity/clickable_element.rb', line 59

def download
  assert_exists_and_enabled
  @browser.disable_event_listener do
    @object.click.getWebResponse.getContentAsStream.to_io
  end
end