poltergeist
How can I use “includeJs” function of phantomjs with poltergeist?
Is there a bridge between native phantomjs functions and the one available with poltergeist ? I would like to use the phantomjs "includeJs"
Poltergeist doesn't provide any access to PhantomJS' includeJS, but its extensions feature is implemented via injectJS which provides similar functionality, allowing you to specify JS files that get loaded at page creation time, allowing you to polyfill missing features, etc. http://www.rubydoc.info/gems/capybara/Capybara/Node/Actions#attach_file-instance_method . You can specify the files at driver registration time. Capybara.register_driver :poltergeist do |app| Capybara::Poltergeist::Driver.new(app, extensions: ['file1.js', 'file2.js']) end
Related Links
How can I use “includeJs” function of phantomjs with poltergeist?
Poltergeist ruby gem fails to process `:shift` modifier in `send_keys`
Using Poltergiest to give user of app a screenshot of their page
Poltergeist 1.9.0 w/Ruby 1.9.3
Post via Capybara and Poltergiest for API testing
Poltergeist current_url command is returning page_info hash instead of a URL
How does one test the content of confirm dialogs using poltergeist?
Using Poltergeist, Phantom JS instances are not exiting during every rspec run
Render page element with padding in Poltergeist
Can I monkey patch the phantomjs browser api with execute_script?
send_keys support for Poltergeist?