Method: Selenium::WebDriver::Chromium::Profile#as_json
- Defined in:
- lib/selenium/webdriver/chromium/profile.rb
#as_json ⇒ Object
76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/selenium/webdriver/chromium/profile.rb', line 76 def as_json(*) extensions = @extensions.map do |crx_path| File.open(crx_path, 'rb') { |crx_file| Base64.strict_encode64 crx_file.read } end extensions.concat(@encoded_extensions) opts = {'directory' => directory || layout_on_disk} opts['extensions'] = extensions if extensions.any? opts end |