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
8
votes
1 answer

Comparison of capybara-webkit vs selenium-webdriver

I want to write test cases for my rails application. I have already written a lot of test cases in Rails built-in framework Minitest. Now I want to test javascript functionality of my web app. I came across these two tools 1: Selenium…
Zia Qamar
  • 1,694
  • 1
  • 15
  • 35
8
votes
2 answers

Capybara Webkit Capybara::Webkit::ConnectionError failed to start

I'm using capybara webkit on Ubuntu (14.04 LTS) and I'm getting the following error when trying to use it: Capybara::Webkit::ConnectionError: /srv/www/app/shared/bundle/ruby/2.1.0/gems/capybara-webkit-1.3.1/bin/webkit_server failed to start. from…
roinir
  • 300
  • 2
  • 9
8
votes
3 answers

How to wait till an element appears after an AJAX call using capybara-webkit?

The capybara method, wait_until doesn't seems to work for capybara-webkit. Is there any alternate solution for that, or any Javascript implementations? Intentionally need some replacement for sleep, e.g. sleep 2.
Prashanth Sams
  • 19,677
  • 20
  • 102
  • 125
8
votes
2 answers

Error building capybara-webkit

I am trying to install capybara-webkit on ubuntu 12.04, but I get this error: $ gem install capybara-webkit -v '1.0.0' Building native extensions. This could take a while... ERROR: Error installing capybara-webkit: ERROR: Failed to build gem…
simo
  • 23,342
  • 38
  • 121
  • 218
8
votes
2 answers

Does Capybara require sleep to work?

Apparently, sleep or wait_until are not valid using recent versions of Capybara, according to the webpage updates. However, I have a set of tests that only work on fast machines if I add a sleep(1) call to the test. That is, a test that looks…
mmr
  • 14,781
  • 29
  • 95
  • 145
8
votes
2 answers

Check why ruby script hangs

Sometimes my specs can just hang and I have to kill the corresponding ruby process. It's quite common when I run integration specs written with capybara and webkit driver. Is it possible to inspect given ruby's process and see where it hangs? Which…
luacassus
  • 6,540
  • 2
  • 40
  • 58
7
votes
5 answers

Mac OS 10.14 Mojave + qt5.5 + gem capybara-webkit

My config is MAC Mojave v10.14. I try to install gem Capybara-webkit -v '1.15.0' which need qt5.5, but qt5.5 has been dropped of the homebrew and it is not compatible with Xcode v10. I try this : Uninstall Xcode v10 Install Xcode 9.4.1, found in…
t.0hm
  • 93
  • 1
  • 7
7
votes
2 answers

ActionCable not connecting during capybara-webkit feature spec

I have a problem using actioncable with feature specs using Capybara-webkit. Actioncable is working perfectly on my development server, but when testing the javascript cant seem to connect. This is the output from the javascript console which is…
7
votes
2 answers

Why does adding "sleep 1" in an after hook cause this Rspec/Capybara test to pass?

I'm using rails 4.0.5, rspec 2.14.1, capybara 2.2.1, capybara-webkit 1.1.0 and database_cleaner 1.2.0. I'm seeing some weird behavior with the following feature test (which simulates a user viewing a comment on a post, hovering over an icon to make…
Dave Urban
  • 310
  • 4
  • 7
7
votes
4 answers

deadlock detected with capybara-webkit

I'm trying to pass this spec : scenario "Edit a service", js: true do service = create_service_for(provider, title: "First service") fill_edit_service_form(service) expect(page).to have_css('#price', text: '10,00 $') end This is a standard…
Dougui
  • 7,142
  • 7
  • 52
  • 87
7
votes
4 answers

Cucumber tests suddenly stops

I have feature like this: Feature: Searching chats In order to find chats As an user I want to find different chats by username or ad name Background: Given System prepares for chats And There is a few machines with names: | machine_1 | …
7
votes
2 answers

Href link click using capybara

How can i click a link using capybara.I need to click the graduation link Graduation I used following code .but showing error message undefined method click …
divz
  • 7,847
  • 23
  • 55
  • 78
7
votes
2 answers

Display @font-face Fonts in Capybara-Webkit

When I test my website using capybara-webkit and I take a screenshot, @font-face declarations in CSS are ignored. This is especially bad because I am using FontAwesome, so there will be major differences to how the page is displayed in a real…
user1252065
6
votes
2 answers

Fill in Editor textarea using capybara-webkit

I'm using a markdown editor on my page, which I'm trying to target, and fill in, using capybara-webkit, but without any luck. My template looks like this <%= simple_form_for form, url: url, method: :put do |f| %> <%= f.input :notes, as: :text %> …
Daniel Hollands
  • 6,281
  • 4
  • 24
  • 42
6
votes
1 answer

Need to check that text appears on a page once and only once

I'm using RSpec/Capybara for Rails app testing and I need to check that one element in the view appears once and only once. For example, in the following code, i need to make sure that task.title will appear only once in the page. As shown, I can…
1 2
3
31 32