Module: Selenium::WebDriver::ProfileHelper::ClassMethods Private

Defined in:
rb/lib/selenium/webdriver/common/profile_helper.rb

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Instance Method Summary collapse

Instance Method Details

#from_json(json) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



73
74
75
76
77
78
79
80
81
# File 'rb/lib/selenium/webdriver/common/profile_helper.rb', line 73

def from_json(json)
  data = decoded(json)

  Tempfile.create do |zip_path|
    File.open(zip_path, 'wb') { |zip_file| zip_file << Base64.decode64(data) }

    new Zipper.unzip(zip_path)
  end
end