daily pastebin goal
48%
SHARE
TWEET

Untitled

a guest Apr 16th, 2018 41 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. irb(main):002:0> File.exist?('/modify_header_value_http_headers-0.1.3-an+fx.xpi')
  2. => true
  3.  
  4. irb(main):003:0> require 'selenium-webdriver'
  5. => true
  6.  
  7. irb(main):004:0> profile = Selenium::WebDriver::Firefox::Profile.new
  8. => #<Selenium::WebDriver::Firefox::Profile:0x2ecf008 @model=nil, @native_events=true,
  9. @secure_ssl=false, @untrusted_issuer=true, @load_no_focus_lib=false,
  10. @additional_prefs={}, @extensions={}>
  11.  
  12. irb(main):005:0>proifle.add_extension('/modify_header_value_http_headers-0.1.3-an+fx.xpi')
  13. => #<Selenium::WebDriver::Firefox::Extension:0x2dc82c8
  14. @path="/modify_header_value_http_headers-0.1.3-an+fx.xpi", @should_reap_root=false>
  15.  
  16. irb(main):006:0> options = Selenium::WebDriver::Firefox::Options.new
  17. => #<Selenium::WebDriver::Firefox::Options:0x2b9a190 @args=[], @binary=nil,
  18. @profile=nil, @log_level=nil, @prefs={}, @options={}>
  19.  
  20. irb(main):007:0> options.profile = profile
  21. => #<Selenium::WebDriver::Firefox::Profile:0x2ecf008 @model=nil, @native_events=true,
  22.  @secure_ssl=false, @untrusted_issuer=true, @load_no_focus_lib=false, @additional_prefs={},
  23. @extensions={"modify_header_value_http_headers-0.1.3-an+fx"=>#<
  24. Selenium::WebDriver::Firefox::Extension:0x2dc82c8
  25. @path="/modify_header_value_http_headers-0.1.3-an+fx.xpi", @should_reap_root=false>}>
  26.  
  27. irb(main):008:0> driver = Selenium::WebDriver.for :firefox, options: options
  28.    
  29. driver.navigate.to 'about:addons'
RAW Paste Data
Top