File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed
lib/selenium/webdriver/firefox
spec/integration/selenium/webdriver/firefox Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,11 @@ def commands(command)
35
35
end
36
36
37
37
def install_addon ( path , temporary )
38
+ if @file_detector
39
+ local_file = @file_detector . call ( path )
40
+ path = upload ( local_file ) if local_file
41
+ end
42
+
38
43
payload = { path : path }
39
44
payload [ :temporary ] = temporary unless temporary . nil?
40
45
execute :install_addon , { } , payload
Original file line number Diff line number Diff line change @@ -42,6 +42,12 @@ module Firefox
42
42
page : { width : 30 } ) ) . to include ( magic_number )
43
43
end
44
44
45
+ it 'can add and remove addons' do
46
+ ext = File . expand_path ( '../../../../../../third_party/firebug/favourite_colour-1.1-an+fx.xpi' , __dir__ )
47
+ driver . install_addon ( ext )
48
+ driver . uninstall_addon ( 'favourite-colour-examples@mozilla.org' )
49
+ end
50
+
45
51
it 'should print full page' do
46
52
path = "#{ Dir . tmpdir } /test#{ SecureRandom . urlsafe_base64 } .png"
47
53
screenshot = driver . save_full_page_screenshot ( path )
You can’t perform that action at this time.
0 commit comments