Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- irb(main):002:0> File.exist?('/modify_header_value_http_headers-0.1.3-an+fx.xpi')
- => true
- irb(main):003:0> require 'selenium-webdriver'
- => true
- irb(main):004:0> profile = Selenium::WebDriver::Firefox::Profile.new
- => #<Selenium::WebDriver::Firefox::Profile:0x2ecf008 @model=nil, @native_events=true,
- @secure_ssl=false, @untrusted_issuer=true, @load_no_focus_lib=false,
- @additional_prefs={}, @extensions={}>
- irb(main):005:0>proifle.add_extension('/modify_header_value_http_headers-0.1.3-an+fx.xpi')
- => #<Selenium::WebDriver::Firefox::Extension:0x2dc82c8
- @path="/modify_header_value_http_headers-0.1.3-an+fx.xpi", @should_reap_root=false>
- irb(main):006:0> options = Selenium::WebDriver::Firefox::Options.new
- => #<Selenium::WebDriver::Firefox::Options:0x2b9a190 @args=[], @binary=nil,
- @profile=nil, @log_level=nil, @prefs={}, @options={}>
- irb(main):007:0> options.profile = profile
- => #<Selenium::WebDriver::Firefox::Profile:0x2ecf008 @model=nil, @native_events=true,
- @secure_ssl=false, @untrusted_issuer=true, @load_no_focus_lib=false, @additional_prefs={},
- @extensions={"modify_header_value_http_headers-0.1.3-an+fx"=>#<
- Selenium::WebDriver::Firefox::Extension:0x2dc82c8
- @path="/modify_header_value_http_headers-0.1.3-an+fx.xpi", @should_reap_root=false>}>
- irb(main):008:0> driver = Selenium::WebDriver.for :firefox, options: options
- driver.navigate.to 'about:addons'
Add Comment
Please, Sign In to add comment