「aqqin」という名前のfirefox-add-onをインストールする必要があるスクリプトを作成する必要があります。どうすればいいですか
6870 次
2 に答える
4
カスタム プロファイルを作成してドライバに渡すことで、アドオンを追加できます。
FirefoxProfile profile = new FirefoxProfile();
File extension = new File("<path>"/aqqin.xpi");
profile.addExtension(extension);
WebDriver driver = new FirefoxDriver(profile);
于 2013-03-19T07:26:57.130 に答える
1
Rubyコードを使用したセレン:
RSpec.configure do |config|
profile = Selenium::WebDriver::Firefox::Profile.new
profile.assume_untrusted_certificate_issuer = true
#profile.add_extension "/usr/lib/firefox-addons/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}"
Capybara.register_driver :selenium do |app|
Capybara::Selenium::Driver.new(app, {:browser => :firefox, :profile => "default"} )
#Capybara::Selenium::Driver.new(app, {:browser => :firefox, :profile => profile} )
end
end
于 2013-03-19T11:36:23.690 に答える