Chrome switch fixes
This commit is contained in:
parent
b217fef4ee
commit
a83023b812
@ -21,13 +21,13 @@ module PersistentSelenium
|
|||||||
|
|
||||||
options = { :profile => profile }
|
options = { :profile => profile }
|
||||||
when :chrome
|
when :chrome
|
||||||
profile = Selenium::WebDriver::Chrome::Profile.new
|
switches = %w{--disk-cache-size=1 --media-cache-size=1}
|
||||||
|
|
||||||
PersistentSelenium.chrome_extensions.each do |extension|
|
PersistentSelenium.chrome_extensions.each do |extension|
|
||||||
profile.add_extension extension
|
switches.push("--load-extension=#{extension}")
|
||||||
end
|
end
|
||||||
|
|
||||||
options = { :profile => profile, :switches => %w{--disk-cache-size=1 --media-cache-size=1} }
|
options = { switches: switches }
|
||||||
end
|
end
|
||||||
|
|
||||||
@browser ||= Selenium::WebDriver.for(@browser_type, options)
|
@browser ||= Selenium::WebDriver.for(@browser_type, options)
|
||||||
|
Loading…
Reference in New Issue
Block a user