Hello,
i'm trying to intercept and stub https requests from capybara-webkit
driver to external site pages, which are resided in internet. I see that currently by default webmock can't intercept them.
So my question is how to intercept calls from capybara-webkit
surfing visits.
I got exactly the same question
There is no way to do that with webmock
capybara-webkit runs webkit engine which is an independent headless browser.
WebMock operates on server side only.
You could perhaps load additional js code in test environment which uses https://github.com/node-nock/nock to stub js requests.
or use something like https://github.com/hashrocket/capybara-webmock but that doesn't work with capybara-webkit.
https://github.com/oesmith/puffing-billy seems to support webkit.
Hello @bblimke! Over at vcr we were asked a very similar question and I gave a suggestion for how to approach this, but yeah, we agree that this is not webmock's job. Good luck!
@krainboltgreene Thanks for letting me know!
Most helpful comment
There is no way to do that with webmock
capybara-webkit runs webkit engine which is an independent headless browser.
WebMock operates on server side only.
You could perhaps load additional js code in test environment which uses https://github.com/node-nock/nock to stub js requests.
or use something like https://github.com/hashrocket/capybara-webmock but that doesn't work with capybara-webkit.
https://github.com/oesmith/puffing-billy seems to support webkit.