Class: Aranha::Selenium::Session::Downloads

Inherits:
Object
  • Object
show all
Defined in:
lib/aranha/selenium/session/downloads.rb

Instance Method Summary collapse

Instance Method Details

#currentEnumerable<Pathname>

Returns:

  • (Enumerable<Pathname>)


12
13
14
15
16
17
18
# File 'lib/aranha/selenium/session/downloads.rb', line 12

def current
  dir.glob('**/*').select do |path|
    !::EacFs::FileInfo.new(path).open? && path.size.positive?
  rescue Errno::ENOENT
    false
  end
end

#dirPathname

Returns:

  • (Pathname)


21
22
23
# File 'lib/aranha/selenium/session/downloads.rb', line 21

def dir
  @dir ||= ::Dir.mktmpdir.to_pathname
end