A Capybara driver for headless WebKit so you can test Javascript web apps.
Questions tagged [capybara-webkit]
470 questions
6
votes
3 answers
How can I count list elements in unordered list? (RSpec/Capybara)
In my site I have this list:

Tanapat Sainak
- 734
- 1
- 10
- 22
6
votes
1 answer
"The gem ... has been deleted. It was installed at" Error. Bundle install doesn't install gems. How to re-install gems?
I'm trying to build capybara-webkit on XP. I follow this instruction. I says:
8) Clone latest version of capybara-webkit from Github:
$ git clone git://github.com/thoughtbot/capybara-webkit.git
9) Bundle/Install capybara-webkit version:
$ cd…

Green
- 28,742
- 61
- 158
- 247
6
votes
2 answers
Why is RSpec/Capybara not showing where errors occured
I'm using Capybara with webkit for my testing, but for some reason when a test fails it shows the error, but not where it actually occurred in the code.
Failures:
1) online shopping - sign up
Failure/Error: page.should have_content 'Payment…

Constant Meiring
- 3,285
- 3
- 40
- 52
6
votes
4 answers
Why do I get blank pages with Capybara-webkit, but not with the standard (non-JS) driver
My Rspec + Capybara integration tests were working fine until I started trying to interact with Javascript-dependent interface elements using Capybara-Webkit.
When I try to use Capybara-Webkit, I get blank pages at the save_and_open_line below.…

steven_noble
- 4,133
- 10
- 44
- 77
5
votes
3 answers
RSpec+Capybara request specs w/ JS not working
I cannot get request specs working when using Javascript.
My specs pass if I run them without Javascript (the page is built to work with or without JS).
Specifically, the specs fail when I do assertions like Post.should have(1).record.
Capybara just…

cabgfx
- 189
- 4
- 11
5
votes
4 answers
Capybara-webkit raises Capybara::Driver::Webkit::WebkitInvalidResponseError
I got following message from webkit driver in my rspec:
Capybara::Driver::Webkit::WebkitInvalidResponseError:
Unable to load URL: http://127.0.0.1:44923/posts
Few days ago it worked. The problem is with save_page method.
What could be wrong?

Sławosz
- 11,187
- 15
- 73
- 106
5
votes
1 answer
Cucumber (rails 2) isn't loading jQuery
I have a cucumber scenario tagged with @javascript and i'm testing it with some really basic inline js calls. I'm running this using
Capybara.javascript_driver = :webkit
If i do this on the page, after the element in question (which has…

Max Williams
- 32,435
- 31
- 130
- 197
5
votes
2 answers
Install capyabara-webkit gem on Amazon Linux AMI
I am trying to install the capybara-webkit gem on Amazon Linux AMI release 2017.09.
I tried following the install instructions for CentOS (maybe the wrong approach):
sudo yum install -y epel-release
sudo yum install -y qt5-qtwebkit-devel
The first…

Tom Aranda
- 5,919
- 11
- 35
- 51
5
votes
4 answers
How to use capybara to select a select2 drop-down field
There is help online for using select2 with capybara (see links below), but no help in particular as far as I have seen for select2 drop-down fields. I have tried all kinds of things, including trying to fill in the field when :js => false (using…

RyanQuey
- 705
- 1
- 9
- 29
5
votes
1 answer
Capybara unable to find hidden element with text
In my app I have a page that pops up a modal that will update some content in it and dismiss itself (and become invisible) after uncertain amount of time. In my spec, I am trying to wait until the modal dismisses. My strategy is to have Capybara…

322896
- 956
- 1
- 9
- 19
5
votes
1 answer
Why Capypara + Rspect tests still pass even though I delete application.js file?
I have rails app and have some ajax call in application.js file. O have rspec, capybara, webkit, factorygirl and databasecleaner for testing. I wrote feature tests which all pass. Then accidentally delete application.js file and run the tests, they…

tkhuynh
- 941
- 7
- 15
5
votes
1 answer
ActionView::Template::Error: unexpected token at '{{2+2}}'
I'm having trouble integrating JS tests into my rails/angular application. In particular, my test setup is choking on the 8th and final occurrence of {{handlebars}} in this html file, and I cant' figure out what's special about this occurrence.
The…

Dave Morse
- 717
- 9
- 16
5
votes
4 answers
Capybara-webkit cannot handle link with bootstrap glyphicon
I have a link:
link_to %q().html_safe, feed_item, data: {confirm: 'Are you sure?',toggle: 'tooltip'}, method: :delete, title: 'Delete', id: 'delete_post'
and the following feature spec…

Obromios
- 15,408
- 15
- 72
- 127
5
votes
1 answer
Unstable Sidekiq job behavior with capybara-webkit
I'm maintaining a suite of feature specs with lots of sidekiq jobs being run within tests. Everything was quite fine until there's been a need to enable javascript for all feature specs, and things suddenly got ugly. I'm not sure I understand…

Roman
- 389
- 1
- 13
5
votes
2 answers
Capybara config for a single test
I'm trying to
describe "test", :js => true do
it "test" do
Capybara.default_max_wait_time = 3
Capybara::Webkit.configure do |config|
config.allow_unknown_urls
end
my test
end
it "test2" do
...
end
end
to replace the capybara…

fabdurso
- 2,366
- 5
- 29
- 55