Module: Async::WebDriver::Installer

Defined in:
lib/async/webdriver/installer.rb,
lib/async/webdriver/installer/chrome.rb,
lib/async/webdriver/installer/chrome/platform.rb,
lib/async/webdriver/installer/chrome/releases.rb,
lib/async/webdriver/installer/chrome/installation.rb

Overview

Browser installation and management for automated testing.

Each browser has its own sub-module with browser-specific platform detection, version resolution, and download logic:

  • Chrome — Chrome for Testing, via the Chrome for Testing JSON API.

Defined Under Namespace

Modules: Chrome

Class Method Summary collapse

Class Method Details

.cache_path(subdirectory = nil, env = ENV) ⇒ Object

Resolve the cache path for the given sub-directory.

Follows the XDG Base Directory Specification, using ‘$XDG_CACHE_HOME` (default: `~/.cache`) as the root, with `async-webdriver.rb` as the application directory.



26
27
28
29
30
31
32
33
34
# File 'lib/async/webdriver/installer.rb', line 26

def self.cache_path(subdirectory = nil, env = ENV)
	path = File.expand_path("async-webdriver.rb", env.fetch("XDG_CACHE_HOME", "~/.cache"))
	
	if subdirectory
		path = File.join(path, subdirectory)
	end
	
	return path
end