[QA] Running browser tests against firefox with addons installed?
Dan Duvall
dduvall at wikimedia.org
Wed Mar 18 17:17:03 UTC 2015
On Wed, Mar 18, 2015 at 7:25 AM, Željko Filipin <zfilipin at wikimedia.org> wrote:
>
> On Wed, Mar 18, 2015 at 10:33 AM, Gilles Dubuc <gilles at wikimedia.org> wrote:
>>
>> How difficult would it be to set that up (profile to run firefox with that addon) for a specific cucumber feature in the UploadWizard test suite?
>
>
> It should not be hard to do. You do not have to set up a profile, you can just point to the extension that needs to be installed.
This may be the perfect opportunity to refactor the UW test suite to
make use of mediawiki_selenium 1.0.x features—it provides a dependency
injection system for easily setting custom Watir/Selenium browser
options.[0][1] It would go something like this:
Before('@use-some-extension') do
browser_factory(:firefox).bind do |options|
options[:profile].add_extension('/path/to/extension.xpi')
end
end
Željko/Gilles, maybe we could all pair on the refactoring.
[0] https://www.mediawiki.org/wiki/Quality_Assurance/Browser_testing/Environment_abstraction_layer#Customization
[1] https://doc.wikimedia.org/rubygems/mediawiki-selenium/MediawikiSelenium/BrowserFactory/Base.html#bind-instance_method
--
Dan Duvall
Automation Engineer
Wikimedia Foundation
More information about the QA
mailing list