How to get capybara chrome headless to open sweetalert2 modals for Rspec tests












0















I'm currently using



selenium-webdriver 3.141.0
chromedriver-helper 2.1.0



gem 'rails-assets-sweetalert2', source: 'https://rails-assets.org'
gem 'sweet-alert2-rails'



With Rails 5.2



My Capybara setup:



RSpec.configure do |config| 
config.before(:each, type: :system) do
driven_by :rack_test
end
config.before(:each, type: :system, js: true) do
driven_by :selenium_chrome_headless
end
end
require "capybara-screenshot/rspec"

#Use the following to set the screen size for tests
Capybara.register_driver :selenium_chrome_headless do |app|
options = Selenium::WebDriver::Chrome::Options.new

[
"headless",
"window-size=1280x1280",
"disable-gpu" # https://developers.google.com/web/updates/2017/04/headless-chrome
].each { |arg| options.add_argument(arg) }

Capybara::Selenium::Driver.new(app, browser: :chrome, options: options)
end


I run the following test:



    require 'rails_helper'

RSpec.describe 'deleting a proofread document using ajax', js: true do

let(:job) { create(:proofreading_job, title: 'Internal Job') }
let(:user) { job.proofreader.user }

it 'can delete a proofread document' do
visit root_path
click_on 'Login'
fill_in 'Email', with: user.email
fill_in 'Password', with: user.password
click_on 'Sign In'
click_on 'Dashboard'
click_on 'Proofreading Jobs'
click_on 'Current'
click_on 'Internal Job'
click_on 'Upload Proofread Document'
attach_file(I18n.t('proofreader.proofread_document.upload'), Rails.root + 'spec/test_documents/proofread_document/1.docx' , make_visible: true)
accept_alert do
find_button('Upload', disabled: false).click
end
expect(page).to_not have_button('Delete')

end
end
end


However the test fails with Rspec informing me that:



 Capybara::ModalNotFound:
Unable to find modal dialog


However, I have manually used the webpage and the modal does show and work properly.



How can I get Capybara Selenium Chrome Headless Driver to open the modal in the tests?










share|improve this question



























    0















    I'm currently using



    selenium-webdriver 3.141.0
    chromedriver-helper 2.1.0



    gem 'rails-assets-sweetalert2', source: 'https://rails-assets.org'
    gem 'sweet-alert2-rails'



    With Rails 5.2



    My Capybara setup:



    RSpec.configure do |config| 
    config.before(:each, type: :system) do
    driven_by :rack_test
    end
    config.before(:each, type: :system, js: true) do
    driven_by :selenium_chrome_headless
    end
    end
    require "capybara-screenshot/rspec"

    #Use the following to set the screen size for tests
    Capybara.register_driver :selenium_chrome_headless do |app|
    options = Selenium::WebDriver::Chrome::Options.new

    [
    "headless",
    "window-size=1280x1280",
    "disable-gpu" # https://developers.google.com/web/updates/2017/04/headless-chrome
    ].each { |arg| options.add_argument(arg) }

    Capybara::Selenium::Driver.new(app, browser: :chrome, options: options)
    end


    I run the following test:



        require 'rails_helper'

    RSpec.describe 'deleting a proofread document using ajax', js: true do

    let(:job) { create(:proofreading_job, title: 'Internal Job') }
    let(:user) { job.proofreader.user }

    it 'can delete a proofread document' do
    visit root_path
    click_on 'Login'
    fill_in 'Email', with: user.email
    fill_in 'Password', with: user.password
    click_on 'Sign In'
    click_on 'Dashboard'
    click_on 'Proofreading Jobs'
    click_on 'Current'
    click_on 'Internal Job'
    click_on 'Upload Proofread Document'
    attach_file(I18n.t('proofreader.proofread_document.upload'), Rails.root + 'spec/test_documents/proofread_document/1.docx' , make_visible: true)
    accept_alert do
    find_button('Upload', disabled: false).click
    end
    expect(page).to_not have_button('Delete')

    end
    end
    end


    However the test fails with Rspec informing me that:



     Capybara::ModalNotFound:
    Unable to find modal dialog


    However, I have manually used the webpage and the modal does show and work properly.



    How can I get Capybara Selenium Chrome Headless Driver to open the modal in the tests?










    share|improve this question

























      0












      0








      0








      I'm currently using



      selenium-webdriver 3.141.0
      chromedriver-helper 2.1.0



      gem 'rails-assets-sweetalert2', source: 'https://rails-assets.org'
      gem 'sweet-alert2-rails'



      With Rails 5.2



      My Capybara setup:



      RSpec.configure do |config| 
      config.before(:each, type: :system) do
      driven_by :rack_test
      end
      config.before(:each, type: :system, js: true) do
      driven_by :selenium_chrome_headless
      end
      end
      require "capybara-screenshot/rspec"

      #Use the following to set the screen size for tests
      Capybara.register_driver :selenium_chrome_headless do |app|
      options = Selenium::WebDriver::Chrome::Options.new

      [
      "headless",
      "window-size=1280x1280",
      "disable-gpu" # https://developers.google.com/web/updates/2017/04/headless-chrome
      ].each { |arg| options.add_argument(arg) }

      Capybara::Selenium::Driver.new(app, browser: :chrome, options: options)
      end


      I run the following test:



          require 'rails_helper'

      RSpec.describe 'deleting a proofread document using ajax', js: true do

      let(:job) { create(:proofreading_job, title: 'Internal Job') }
      let(:user) { job.proofreader.user }

      it 'can delete a proofread document' do
      visit root_path
      click_on 'Login'
      fill_in 'Email', with: user.email
      fill_in 'Password', with: user.password
      click_on 'Sign In'
      click_on 'Dashboard'
      click_on 'Proofreading Jobs'
      click_on 'Current'
      click_on 'Internal Job'
      click_on 'Upload Proofread Document'
      attach_file(I18n.t('proofreader.proofread_document.upload'), Rails.root + 'spec/test_documents/proofread_document/1.docx' , make_visible: true)
      accept_alert do
      find_button('Upload', disabled: false).click
      end
      expect(page).to_not have_button('Delete')

      end
      end
      end


      However the test fails with Rspec informing me that:



       Capybara::ModalNotFound:
      Unable to find modal dialog


      However, I have manually used the webpage and the modal does show and work properly.



      How can I get Capybara Selenium Chrome Headless Driver to open the modal in the tests?










      share|improve this question














      I'm currently using



      selenium-webdriver 3.141.0
      chromedriver-helper 2.1.0



      gem 'rails-assets-sweetalert2', source: 'https://rails-assets.org'
      gem 'sweet-alert2-rails'



      With Rails 5.2



      My Capybara setup:



      RSpec.configure do |config| 
      config.before(:each, type: :system) do
      driven_by :rack_test
      end
      config.before(:each, type: :system, js: true) do
      driven_by :selenium_chrome_headless
      end
      end
      require "capybara-screenshot/rspec"

      #Use the following to set the screen size for tests
      Capybara.register_driver :selenium_chrome_headless do |app|
      options = Selenium::WebDriver::Chrome::Options.new

      [
      "headless",
      "window-size=1280x1280",
      "disable-gpu" # https://developers.google.com/web/updates/2017/04/headless-chrome
      ].each { |arg| options.add_argument(arg) }

      Capybara::Selenium::Driver.new(app, browser: :chrome, options: options)
      end


      I run the following test:



          require 'rails_helper'

      RSpec.describe 'deleting a proofread document using ajax', js: true do

      let(:job) { create(:proofreading_job, title: 'Internal Job') }
      let(:user) { job.proofreader.user }

      it 'can delete a proofread document' do
      visit root_path
      click_on 'Login'
      fill_in 'Email', with: user.email
      fill_in 'Password', with: user.password
      click_on 'Sign In'
      click_on 'Dashboard'
      click_on 'Proofreading Jobs'
      click_on 'Current'
      click_on 'Internal Job'
      click_on 'Upload Proofread Document'
      attach_file(I18n.t('proofreader.proofread_document.upload'), Rails.root + 'spec/test_documents/proofread_document/1.docx' , make_visible: true)
      accept_alert do
      find_button('Upload', disabled: false).click
      end
      expect(page).to_not have_button('Delete')

      end
      end
      end


      However the test fails with Rspec informing me that:



       Capybara::ModalNotFound:
      Unable to find modal dialog


      However, I have manually used the webpage and the modal does show and work properly.



      How can I get Capybara Selenium Chrome Headless Driver to open the modal in the tests?







      selenium capybara selenium-chromedriver rspec-rails






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 14 '18 at 6:09









      chellchell

      2,3941357110




      2,3941357110
























          1 Answer
          1






          active

          oldest

          votes


















          0














          accept_alert is for dealing with system modals (those the browser creates by default when calling window.alert that don't actually add elements to the page). Sweetalert2 is a JS library that inserts elements to the page to create more stylish "modals". You don't use accept_alert with those, you just interact with them as if they were any other HTML elements on the page. That would mean something along the lines of



          ....
          attach_file(...)
          click_button('Upload', disabled: false) # Not sure why you're passing `disabled: false` here since that's the default
          within('.swal2-actions') { click_button('the text of the button to accept the "modal"') }
          expect(page)....


          Update: As discovered in the comments - an additional cause of this issue was the assets not being compiled, in the OPs setup, so the JS wasn't firing at all. This would be immediately clear when running in non-headless mode and seeing that no "modal" was ever being displayed. The fix for that depends on what asset pipeline is being used and how it's configured, which goes beyond the scope of this question.






          share|improve this answer


























          • I tried your solution and I get the error 'Unable to find visible css ".swal2-actions"'. It's as if the modal is not being shown at all. BTW I need to put disabled:false because the button is disabled until the user adds a file to upload.

            – chell
            Nov 15 '18 at 4:42











          • @chell disabled: false is the default setting for find_button, passing it in will make no difference. As for .swal2-actions I took that class from the default examples shown at sweetalert2.github.io - if you've customized anything then you'd have to change the class to match whatever you've customized to. If the modal isn't being shown at all then you need to check the browser console for JS errors and fix them.

            – Thomas Walpole
            Nov 15 '18 at 5:09











          • @chell Also are you sure the test type is set to :system - otherwise it would be running with rack_test which doesn't support any JS at all (and you might as well run in non-headless while debugging so you can see what's actually happening)

            – Thomas Walpole
            Nov 15 '18 at 5:11













          • As per @ThomasWalpole suggestion I used non-headless to see what was happening. In deed there modal was not opening as it should. In environment/test.rb I turned of asset precompile and the modal opened in the test. So something with the way the assets are being compiled is causing the issue.

            – chell
            Nov 15 '18 at 7:11











          • Ok I had to precompile my assets and now it works in test, development and production. Also what you told me about the accept_alert and interacting with the .swal2-actions was spot on. So if you could update your answer to include making sure the assets are precompiled properly then I can accept the answer.

            – chell
            Nov 15 '18 at 7:28











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53294101%2fhow-to-get-capybara-chrome-headless-to-open-sweetalert2-modals-for-rspec-tests%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          accept_alert is for dealing with system modals (those the browser creates by default when calling window.alert that don't actually add elements to the page). Sweetalert2 is a JS library that inserts elements to the page to create more stylish "modals". You don't use accept_alert with those, you just interact with them as if they were any other HTML elements on the page. That would mean something along the lines of



          ....
          attach_file(...)
          click_button('Upload', disabled: false) # Not sure why you're passing `disabled: false` here since that's the default
          within('.swal2-actions') { click_button('the text of the button to accept the "modal"') }
          expect(page)....


          Update: As discovered in the comments - an additional cause of this issue was the assets not being compiled, in the OPs setup, so the JS wasn't firing at all. This would be immediately clear when running in non-headless mode and seeing that no "modal" was ever being displayed. The fix for that depends on what asset pipeline is being used and how it's configured, which goes beyond the scope of this question.






          share|improve this answer


























          • I tried your solution and I get the error 'Unable to find visible css ".swal2-actions"'. It's as if the modal is not being shown at all. BTW I need to put disabled:false because the button is disabled until the user adds a file to upload.

            – chell
            Nov 15 '18 at 4:42











          • @chell disabled: false is the default setting for find_button, passing it in will make no difference. As for .swal2-actions I took that class from the default examples shown at sweetalert2.github.io - if you've customized anything then you'd have to change the class to match whatever you've customized to. If the modal isn't being shown at all then you need to check the browser console for JS errors and fix them.

            – Thomas Walpole
            Nov 15 '18 at 5:09











          • @chell Also are you sure the test type is set to :system - otherwise it would be running with rack_test which doesn't support any JS at all (and you might as well run in non-headless while debugging so you can see what's actually happening)

            – Thomas Walpole
            Nov 15 '18 at 5:11













          • As per @ThomasWalpole suggestion I used non-headless to see what was happening. In deed there modal was not opening as it should. In environment/test.rb I turned of asset precompile and the modal opened in the test. So something with the way the assets are being compiled is causing the issue.

            – chell
            Nov 15 '18 at 7:11











          • Ok I had to precompile my assets and now it works in test, development and production. Also what you told me about the accept_alert and interacting with the .swal2-actions was spot on. So if you could update your answer to include making sure the assets are precompiled properly then I can accept the answer.

            – chell
            Nov 15 '18 at 7:28
















          0














          accept_alert is for dealing with system modals (those the browser creates by default when calling window.alert that don't actually add elements to the page). Sweetalert2 is a JS library that inserts elements to the page to create more stylish "modals". You don't use accept_alert with those, you just interact with them as if they were any other HTML elements on the page. That would mean something along the lines of



          ....
          attach_file(...)
          click_button('Upload', disabled: false) # Not sure why you're passing `disabled: false` here since that's the default
          within('.swal2-actions') { click_button('the text of the button to accept the "modal"') }
          expect(page)....


          Update: As discovered in the comments - an additional cause of this issue was the assets not being compiled, in the OPs setup, so the JS wasn't firing at all. This would be immediately clear when running in non-headless mode and seeing that no "modal" was ever being displayed. The fix for that depends on what asset pipeline is being used and how it's configured, which goes beyond the scope of this question.






          share|improve this answer


























          • I tried your solution and I get the error 'Unable to find visible css ".swal2-actions"'. It's as if the modal is not being shown at all. BTW I need to put disabled:false because the button is disabled until the user adds a file to upload.

            – chell
            Nov 15 '18 at 4:42











          • @chell disabled: false is the default setting for find_button, passing it in will make no difference. As for .swal2-actions I took that class from the default examples shown at sweetalert2.github.io - if you've customized anything then you'd have to change the class to match whatever you've customized to. If the modal isn't being shown at all then you need to check the browser console for JS errors and fix them.

            – Thomas Walpole
            Nov 15 '18 at 5:09











          • @chell Also are you sure the test type is set to :system - otherwise it would be running with rack_test which doesn't support any JS at all (and you might as well run in non-headless while debugging so you can see what's actually happening)

            – Thomas Walpole
            Nov 15 '18 at 5:11













          • As per @ThomasWalpole suggestion I used non-headless to see what was happening. In deed there modal was not opening as it should. In environment/test.rb I turned of asset precompile and the modal opened in the test. So something with the way the assets are being compiled is causing the issue.

            – chell
            Nov 15 '18 at 7:11











          • Ok I had to precompile my assets and now it works in test, development and production. Also what you told me about the accept_alert and interacting with the .swal2-actions was spot on. So if you could update your answer to include making sure the assets are precompiled properly then I can accept the answer.

            – chell
            Nov 15 '18 at 7:28














          0












          0








          0







          accept_alert is for dealing with system modals (those the browser creates by default when calling window.alert that don't actually add elements to the page). Sweetalert2 is a JS library that inserts elements to the page to create more stylish "modals". You don't use accept_alert with those, you just interact with them as if they were any other HTML elements on the page. That would mean something along the lines of



          ....
          attach_file(...)
          click_button('Upload', disabled: false) # Not sure why you're passing `disabled: false` here since that's the default
          within('.swal2-actions') { click_button('the text of the button to accept the "modal"') }
          expect(page)....


          Update: As discovered in the comments - an additional cause of this issue was the assets not being compiled, in the OPs setup, so the JS wasn't firing at all. This would be immediately clear when running in non-headless mode and seeing that no "modal" was ever being displayed. The fix for that depends on what asset pipeline is being used and how it's configured, which goes beyond the scope of this question.






          share|improve this answer















          accept_alert is for dealing with system modals (those the browser creates by default when calling window.alert that don't actually add elements to the page). Sweetalert2 is a JS library that inserts elements to the page to create more stylish "modals". You don't use accept_alert with those, you just interact with them as if they were any other HTML elements on the page. That would mean something along the lines of



          ....
          attach_file(...)
          click_button('Upload', disabled: false) # Not sure why you're passing `disabled: false` here since that's the default
          within('.swal2-actions') { click_button('the text of the button to accept the "modal"') }
          expect(page)....


          Update: As discovered in the comments - an additional cause of this issue was the assets not being compiled, in the OPs setup, so the JS wasn't firing at all. This would be immediately clear when running in non-headless mode and seeing that no "modal" was ever being displayed. The fix for that depends on what asset pipeline is being used and how it's configured, which goes beyond the scope of this question.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Nov 15 '18 at 16:21

























          answered Nov 14 '18 at 6:38









          Thomas WalpoleThomas Walpole

          30.9k32950




          30.9k32950













          • I tried your solution and I get the error 'Unable to find visible css ".swal2-actions"'. It's as if the modal is not being shown at all. BTW I need to put disabled:false because the button is disabled until the user adds a file to upload.

            – chell
            Nov 15 '18 at 4:42











          • @chell disabled: false is the default setting for find_button, passing it in will make no difference. As for .swal2-actions I took that class from the default examples shown at sweetalert2.github.io - if you've customized anything then you'd have to change the class to match whatever you've customized to. If the modal isn't being shown at all then you need to check the browser console for JS errors and fix them.

            – Thomas Walpole
            Nov 15 '18 at 5:09











          • @chell Also are you sure the test type is set to :system - otherwise it would be running with rack_test which doesn't support any JS at all (and you might as well run in non-headless while debugging so you can see what's actually happening)

            – Thomas Walpole
            Nov 15 '18 at 5:11













          • As per @ThomasWalpole suggestion I used non-headless to see what was happening. In deed there modal was not opening as it should. In environment/test.rb I turned of asset precompile and the modal opened in the test. So something with the way the assets are being compiled is causing the issue.

            – chell
            Nov 15 '18 at 7:11











          • Ok I had to precompile my assets and now it works in test, development and production. Also what you told me about the accept_alert and interacting with the .swal2-actions was spot on. So if you could update your answer to include making sure the assets are precompiled properly then I can accept the answer.

            – chell
            Nov 15 '18 at 7:28



















          • I tried your solution and I get the error 'Unable to find visible css ".swal2-actions"'. It's as if the modal is not being shown at all. BTW I need to put disabled:false because the button is disabled until the user adds a file to upload.

            – chell
            Nov 15 '18 at 4:42











          • @chell disabled: false is the default setting for find_button, passing it in will make no difference. As for .swal2-actions I took that class from the default examples shown at sweetalert2.github.io - if you've customized anything then you'd have to change the class to match whatever you've customized to. If the modal isn't being shown at all then you need to check the browser console for JS errors and fix them.

            – Thomas Walpole
            Nov 15 '18 at 5:09











          • @chell Also are you sure the test type is set to :system - otherwise it would be running with rack_test which doesn't support any JS at all (and you might as well run in non-headless while debugging so you can see what's actually happening)

            – Thomas Walpole
            Nov 15 '18 at 5:11













          • As per @ThomasWalpole suggestion I used non-headless to see what was happening. In deed there modal was not opening as it should. In environment/test.rb I turned of asset precompile and the modal opened in the test. So something with the way the assets are being compiled is causing the issue.

            – chell
            Nov 15 '18 at 7:11











          • Ok I had to precompile my assets and now it works in test, development and production. Also what you told me about the accept_alert and interacting with the .swal2-actions was spot on. So if you could update your answer to include making sure the assets are precompiled properly then I can accept the answer.

            – chell
            Nov 15 '18 at 7:28

















          I tried your solution and I get the error 'Unable to find visible css ".swal2-actions"'. It's as if the modal is not being shown at all. BTW I need to put disabled:false because the button is disabled until the user adds a file to upload.

          – chell
          Nov 15 '18 at 4:42





          I tried your solution and I get the error 'Unable to find visible css ".swal2-actions"'. It's as if the modal is not being shown at all. BTW I need to put disabled:false because the button is disabled until the user adds a file to upload.

          – chell
          Nov 15 '18 at 4:42













          @chell disabled: false is the default setting for find_button, passing it in will make no difference. As for .swal2-actions I took that class from the default examples shown at sweetalert2.github.io - if you've customized anything then you'd have to change the class to match whatever you've customized to. If the modal isn't being shown at all then you need to check the browser console for JS errors and fix them.

          – Thomas Walpole
          Nov 15 '18 at 5:09





          @chell disabled: false is the default setting for find_button, passing it in will make no difference. As for .swal2-actions I took that class from the default examples shown at sweetalert2.github.io - if you've customized anything then you'd have to change the class to match whatever you've customized to. If the modal isn't being shown at all then you need to check the browser console for JS errors and fix them.

          – Thomas Walpole
          Nov 15 '18 at 5:09













          @chell Also are you sure the test type is set to :system - otherwise it would be running with rack_test which doesn't support any JS at all (and you might as well run in non-headless while debugging so you can see what's actually happening)

          – Thomas Walpole
          Nov 15 '18 at 5:11







          @chell Also are you sure the test type is set to :system - otherwise it would be running with rack_test which doesn't support any JS at all (and you might as well run in non-headless while debugging so you can see what's actually happening)

          – Thomas Walpole
          Nov 15 '18 at 5:11















          As per @ThomasWalpole suggestion I used non-headless to see what was happening. In deed there modal was not opening as it should. In environment/test.rb I turned of asset precompile and the modal opened in the test. So something with the way the assets are being compiled is causing the issue.

          – chell
          Nov 15 '18 at 7:11





          As per @ThomasWalpole suggestion I used non-headless to see what was happening. In deed there modal was not opening as it should. In environment/test.rb I turned of asset precompile and the modal opened in the test. So something with the way the assets are being compiled is causing the issue.

          – chell
          Nov 15 '18 at 7:11













          Ok I had to precompile my assets and now it works in test, development and production. Also what you told me about the accept_alert and interacting with the .swal2-actions was spot on. So if you could update your answer to include making sure the assets are precompiled properly then I can accept the answer.

          – chell
          Nov 15 '18 at 7:28





          Ok I had to precompile my assets and now it works in test, development and production. Also what you told me about the accept_alert and interacting with the .swal2-actions was spot on. So if you could update your answer to include making sure the assets are precompiled properly then I can accept the answer.

          – chell
          Nov 15 '18 at 7:28




















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53294101%2fhow-to-get-capybara-chrome-headless-to-open-sweetalert2-modals-for-rspec-tests%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Florida Star v. B. J. F.

          Danny Elfman

          Lugert, Oklahoma