A Capybara driver for headless WebKit so you can test Javascript web apps.
Questions tagged [capybara-webkit]
470 questions
0
votes
1 answer
Problems with authentication in Capybara
I am testing a feature on a staging server that requires a basic authentication in order to access the site. I got it running by using the following:
Capybara.app_host = "http://user:password@this.isanexample.com"
At one point in the scenario I…

TrashyMcTrash
- 1,234
- 2
- 15
- 39
0
votes
1 answer
Rspec capybara spec fails when invoked via 'rake spec' but passes when invoked via 'rspec spec'
I've tried the answers to these questions: 1, 2. The first one indicates it might be a caching issue (and suggests running rake tmp:clear). The second one suggests forcing ENV['RAILS_ENV'] = 'test' in spec_helper.rb since rake is run in…

Luke Grecki
- 11
- 3
0
votes
1 answer
Get image file using ruby & capybara
It is image tag on the page accessed by capybara via HTTPS protocol:
Is it any way to get image file from the page using capybara with any kind of driver?
I can not use something like File.read('path') because image is also…

FUT
- 373
- 2
- 17
0
votes
1 answer
Cannot connect to X server error capybara-webkit in ubuntu
Need help. Scripted in ruby (Not rails) and capybara-webkit gem used. Checked both on EC2 and Linode and this error persists.
webkit_server: cannot connect to X server
…

naveed
- 251
- 3
- 12
0
votes
2 answers
Bamboo + Cucumber + Webkit driver
I'm having a lot of trouble running my cuke test cases that use capybara-webkit driver. Because this is a headless server, I'm trying to run xvfb-run to run the tests, but keep running into roadblocks.
If I try to run
xvfb-run rake…

Dave Sanders
- 3,135
- 4
- 33
- 43
0
votes
2 answers
Reconfiguring Capybara-webkit when redirecting all subdomains to 'www'
I have a Rails 3.2 app using a naked domain (e.g. doma.in) and I'd like to redirect all subdomains (including root) to www.doma.in.
The gem rack-www does this nicely. However, now all of my integration tests are breaking. I'm using Capybara-webkit…

adarsh
- 396
- 3
- 12
0
votes
0 answers
Error installing capybara 0.8.0 on Windows 7
I'm quite new using Ruby and I need to install a rails server on Windows 7 in order to test few application in IE.
I did everything good (I hope) but now when I try to run bundle install on cmd I receive this error:
An error occured while installing…

Andrea Turri
- 6,480
- 7
- 37
- 63
0
votes
2 answers
Unable to install capybara-webkit
When I run
abhay$ gem install capybara-webkit
I get the following error messages.
Building native extensions. This could take a while...
ERROR: Error installing capybara-webkit:
ERROR: Failed to build gem native extension.
…

Abhay Kumar
- 1,582
- 1
- 19
- 45
0
votes
1 answer
Capybara-webkit, javascript integration test not working
Hi I am having issues when running my specs, it seems that I cannot log in when I turn on javascript for my tests.
describe "logging in" do
let!(:user) { FactoryGirl.create(:user) }
before do
visit new_user_session_path
fill_in…

trev9065
- 3,371
- 4
- 30
- 45
0
votes
1 answer
Capybara doesn't execute Backbone model's fetch()
I'm attempting to write an integration test for my single page app written in Backbone and Rails 3.2
Things seem to be working on the client side when using an actual browser (Chrome)
However, when testing using client-side code using Capybara (with…
0
votes
1 answer
RSpec + Sinatra + Capybara (+ webkit) for js textarea testing
I'm trying to test a sinatra (1.3.2) application with fields that are updated using data-bind's through Knockout.js to concatenate on client-side and I need to run some tests on this. However I can't seem to get it to work. I have configured RSpec…

Jake
- 66
- 2
- 5
0
votes
1 answer
"Failure/Error: Unable to find matching line from backtrace" when running capybara with webkit
When I run with :focus => true like this it works fine:
it "should send by email to new user", :js => true, :focus => true do
...
end
However, when I remove the :focus => true and run the full test suite I get this error on that…

Brian Armstrong
- 19,707
- 17
- 115
- 144
-1
votes
1 answer
Capybara & RSPEC: ActionController::UnknownFormat: Error. How do i fix this error?
This is the error when i run the capybara test:
Failure/Error:
respond_to do |format|
#format.html
format.js
end
ActionController::UnknownFormat:
ActionController::UnknownFormat
This is from the…

Moeeee100
- 1
- 2
-1
votes
3 answers
How to find an element that doesn't match a specific text with Capybara?
With Capybara I am used to searching first('div', text: 'asdf'), but is there a way to search for elements that do not have the text?
I tried first('div', text: /^(?!asdf)/) and it still matches on div with 'asdf' text.
I checked to make sure my…

chasethesunnn
- 2,149
- 5
- 25
- 42
-1
votes
1 answer
Capybara-webkit: Can not reset session
I am using capybara-webkit with capybara and ruby for these tests. And I have a feature file with 3 scenarios. After the 2nd scenario it just hanged up and show me error
Request timed out after -1 second(s) (Capybara::Webkit::TimeoutError)
…

waqas
- 1,115
- 5
- 19
- 32