Questions tagged [capybara-webkit]

A Capybara driver for headless WebKit so you can test Javascript web apps.

https://github.com/thoughtbot/capybara-webkit

470 questions
0
votes
1 answer

I am trying to install my rails app onto a Ubuntu 10.04 box running in Vagrant (Virtualbox). I'm running into the following errors

Issue I am trying to install my rails app onto a Ubuntu 10.04 box running as a guest on Vagrant (Virtualbox). I'm running into the below errors with devise and capybara-webkit. The strange thing is that it installs perfectly with my same…
Kevin Baker
  • 1,187
  • 3
  • 12
  • 22
0
votes
1 answer

How do I return the clientWidth or clientHeight with capybara?

I'm currently using capybara and capybara-webkit and can correctly render the page as a PNG and access the DOM. However, I can't seem to get the actual render width of the element. Is this possible? To be clear, I'm trying to get the width in…
Phenglei Kai
  • 413
  • 5
  • 14
0
votes
1 answer

Capybara/Webkit: 'keypress' vs 'keydown'

In my Rails app, I am using this jQuery to prevent a form from being submitted when the user presses 'enter' in an input field: $('input').on('keydown', function(e) { if(e.which == '13') { return false; } }) I wrote a test in Capybara to…
grandinero
  • 1,155
  • 11
  • 18
0
votes
1 answer

Gem::Installer:ExtensionBuildError

I keep hitting an error when running $ Bundle Install An error occurred while installing capybara-webkit (0.12.1), and Bundler cannot continue. Make sure that gem install capybara-webkit -v '0.12.1' succeeds before bundling. Is there a way to…
0
votes
3 answers

Need automated Rails gem alternative to Mechanize for non-testing purposes

I am writing a script that automates the completion a web form in my Rails app using the form entries given on the client side. However, this site uses Javascript, and so Mechanize is out of the question. However, everything I've read about…
0
votes
1 answer

Capybara "can't find" text field, yet fills it in

In my integration specs, I log users in with this: fill_in "session_email", :with => user.email fill_in "session_password", :with => password click_button "submit" Capybara fails those tests with Unable to find field "session_email". The strange…
bevanb
  • 8,201
  • 10
  • 53
  • 90
0
votes
1 answer

Capybara session or cookie not working between visits

I want to be able to login and then visit my profile page to scrape some information. The login works perfectly but when i visit the profile page it doesn't display it correctly and im asked to login again. Like as if a cookie wasn't set or session…
John Wessen
  • 5
  • 1
  • 3
0
votes
1 answer

Capybara: is it possible to tag `@javascript` only one step in a scenario? Not the whole scenario?

The example from Capybara documentation. They tag the whole scenario: You can switch to the Capybara.javascript_driver (:selenium by default) by tagging scenarios (or features) with @javascript: @javascript Scenario: do something Ajaxy When I…
Green
  • 28,742
  • 61
  • 158
  • 247
0
votes
1 answer

Unable to find xpath "/html - Capybara

I created tests for my rails application using Capybara. I have one failing test without any idea how to fix. Failures: 1) ManageController ManageController check user login to manage admin success Failure/Error: page.should…
Tini
  • 769
  • 1
  • 6
  • 7
0
votes
1 answer

Select a button having multiple classes in capybara

I want to select button inside the first div Following is the code using
I used following method to select that button' …
divz
  • 7,847
  • 23
  • 55
  • 78
0
votes
2 answers

capybara within :css syntax meaning

I'm currently working on fixing up some specs, and have found a piece of syntax that nobody seems to know what represents. In the Capybara Suite there are multiple occurrences of: within(:css, '#foo') do By removing the :css I have found this to be…
Abraham P
  • 15,029
  • 13
  • 58
  • 126
0
votes
2 answers

Ruby on Rails - RSpec Javascript Test with Capybara (new to RoR)

New to Ruby, Rails and TDD. I'm using RSpec with Capybara and Capybara webkit. Trying to test if a div element exists on a page. Test Code: require 'spec_helper' describe "Login module" do before do visit root_path end it…
Adam Waite
  • 19,175
  • 22
  • 126
  • 148
0
votes
1 answer

Capybara-Webkit: page.should have_content() not implemented?

I have recently attempted to use: Then(/^I should see "(.*?)"$/) do |arg1| page.should have_content(arg1) end To query the page and see if a text exists on the page. This worked fine with the default Capybara driver, but after setting the…
Dorian
  • 1,079
  • 11
  • 19
0
votes
0 answers

Testing ember.js application with cucumber and capybara-webkit fails to run ember code

Trying to test an Ember application with Cucumber and Capybara-webkit to run the javascript. The Ember code runs in a regular browser, and produces a welcome message. I've created a Cucumber feature which looks for the welcome message generated by…
chris_st
  • 501
  • 7
  • 19
0
votes
1 answer

test for error-text that's associated with a field

In Capybara + Webkit + Ruby 1.9.3, I have the following HTML simple_form generates the following when there's an error on a specific field. I'm having trouble "getting at" the error-text span and knowing I definitely have the one associated with…
Michael Lang
  • 1,028
  • 12
  • 21