As of May 31, 2023, we have updated our Code of Conduct.

Questions tagged [capybara]

Capybara is a web-based test automation software that simulates scenarios for user stories and automates web application testing for behavior-driven software development. It is a part of the Cucumber testing framework written in the Ruby programming language that simulates various aspects of a web browser from the perspective of a real user.

Filter by
Sorted by
Tagged with
6 votes
2 answers
5k views

How can I run one spec 100 times using the command line?

We're getting intermittent failures. Hope can I run one test 100 times to see how 'stable' it is?
Michael Durrant's user avatar
6 votes
2 answers
284 views

Writing Automated tests that don't need Cucumber?

So i've been using Cucumber w/Capybara and Poltergeist to write automated tests for awhile now. It works pretty well and I enjoy it and it mostly makes sense (still learning it of course). However Im ...
Mercfh's user avatar
  • 1,706
5 votes
1 answer
216 views

PoM Design/Architecture questions

Apologies if this is an improper question, as it's actually a multi-part question (But it seems like unnecessary clogging of the site to make multiple posts). Im writing my first PoM framework, it's ...
Mercfh's user avatar
  • 1,706
3 votes
1 answer
585 views

Non-headless Automation Testing on CI Server?

So im in a bit of a conundrum. I have a Rails project which i've written Automated tests for in Capybara using ChromeDriver/Selenium. It works great, but is quite long. I also have headless chrome ...
Mercfh's user avatar
  • 1,706
3 votes
2 answers
2k views

Deleting created data from Automated Tests?

So what's the best way to go about this? Lets pretend im testing localhost, or a remote site. That either has a mysql or postgreSQL database. I have a few automated tests that create things (X,Y,Z ...
Mercfh's user avatar
  • 1,706
3 votes
3 answers
244 views

Advice for an experienced manual tester for working with Ruby automation

I am manual QA engineer with 22 years of experience. Now I need to work on automating a Web App in Cucumber/Ruby using Capybara libraries using Selenium to drive the browser (Firefox). Rspec for the ...
Doug M's user avatar
  • 31
2 votes
1 answer
1k views

How to use capybara against an external site without rails or rspec?

I want to use capybara to drive a web browser for an application I have written. I don't want to run rspec tests, I want to use the browser to navigate and perform actions. How do I set this up to ...
Michael Durrant's user avatar
2 votes
2 answers
1k views

Check that an element does not exist *after* a button is clicked

With ruby, I'm doing some cucumber tests with capybara to test a Shiny application (shiny is a R package to do web applications). But I'm a newbie with ruby and cucumber (and this is my first post ...
Stéphane Laurent's user avatar
2 votes
1 answer
217 views

What would switching from ruby rspec to minitest involve?

I see that minitest is now included in Ruby, just require the file. Replaces unittest. I'm still using rspec everywhere 'cos I came from Ruby on Rails. minitest looks just like rspec witht the ...
Michael Durrant's user avatar
2 votes
1 answer
1k views

Why do rspec-capybara chrome tests run headless fail on my mac and how to diagnose/fix it?

My colleague with a windows machine doesn't have this issue with the same code. All my tests that pass normally when run in chrome - fail when run headless at the point where the user presses save ...
Michael Durrant's user avatar
2 votes
1 answer
27 views

Where should 'requires' be kept with regards to rails Automated testing?

I've seen both usages: As in say im testing a web app using Capybara/Rspec? I seen it edited in the spec_helper.rb file: 'require capybara/rspec' require 'capybara/poltergeist' Capybara....
Mercfh's user avatar
  • 1,706
2 votes
2 answers
2k views

What is the use of section in siteprism? Is it similar to page object model of selenium webdriver?

I have been doing selenium automation in C# for almost 1 year. I need to learn siteprism using capybara. When I was going through the documentation of siteprism i can't relate section with page ...
Ghost's user avatar
  • 135
1 vote
2 answers
1k views

Page Object Model with Ruby and Selenium(Capybara)?

So I've written a good amount of scripts using Capybara with Selenium Web-driver. It's going well but my automation tests feel more like step by steps scripts, without much Object Oriented design or ...
Mercfh's user avatar
  • 1,706
1 vote
1 answer
367 views

How to emulate right click options by Capybara?

I want to be stand on a specific element in the page then I make right click and choose one option from the menu appears
SallyDeveloper's user avatar
1 vote
1 answer
195 views

Why are intermittent browser automation failures hard to fix and how to overcome that?

They seem to pop up almost randomly and with varying amounts of frequency. How to avoid them and fix the ones we have?
Michael Durrant's user avatar
1 vote
2 answers
1k views

Preferred methods of finding elements using Capybara + Poltergeist

Is there sort of a hierarchy as far as "good automation test design"? Especially when it comes to finding elements. Since sometimes "click_button" or "choose" (for radio buttons) just does not work (...
Mercfh's user avatar
  • 1,706
1 vote
2 answers
4k views

Stop page load, or visit page without waiting for full page load -Capybara

Background: A web page takes about 2+ minutes to load. Problem: I am currently automating acceptance test using Capybara, Rspec, Selenium. Visit(URL) -- waits for all the way until the page is ...
Estefania's user avatar
1 vote
1 answer
877 views

Display scenario/test names in Browserstack

I've got a set of cucumber tests I'm running using ruby/capybara. I have the tests outputting to Browserstack but it only outputs the session ID which isn't of much use to me and want to replace with ...
QABoy's user avatar
  • 11
1 vote
1 answer
703 views

How to use xvfb to run my automated rspec-capybara chromedriver tests?

I read through this and I don't quite get it. If I currently run my rspec capybara tests using chromedriver, how will I change that to xvfb ? I see the examples like Xvfb :1 -screen 0 1600x1200x32 ...
Michael Durrant's user avatar
1 vote
1 answer
47 views

ERROR at the time of capybara installation

I am trying to setup environment for Web Testing using Capybara & Cucumber. I am hitting command "gem install capybara" to install but getting an error on the terminal is: ERROR: Could not find a ...
Narendra Chandratre's user avatar
1 vote
1 answer
527 views

Are there advantages to using Capybara with RSpec + Selenium?

I want to create some front-end automation for our web application. My plan is to use RSpec as the framework and Selenium to drive the browser. I see a lot of information (blog posts) around using ...
Chris Kenst's user avatar
  • 3,721
1 vote
1 answer
904 views

AWS EC2 - Cucumber, Selenium-Webdriver, Capybara, Ruby, **Jenkins** - Not a File "/usr/bin/chromedriver"

I was hoping to get a web automation test script working on an AWS EC2 instance running Ubuntu 16.04 LTS with Ruby; Capybara and Cucumber frameworks. I am intending to use Selenium-Webdriver as my ...
Raisus's user avatar
  • 151
1 vote
1 answer
503 views

How do I stop my rspec capybara tests failing intermittently

The intermittent failures are hard to pin down and they can be in many different tests. Often you can see the element you are targeting in the browser but the program just doesn't seem to be in sync ...
Michael Durrant's user avatar
0 votes
1 answer
253 views

Selenium integration testing on Node?

So im pretty used to Automated integration testing on Rails, however i've been trying to move into learning Node.js and getting used to writing integration tests on that. Im used to using Capybara, ...
Mercfh's user avatar
  • 1,706
0 votes
1 answer
1k views

Why does my capybara element.click not work in Safari?

I am using rspec-capybara for my tests and I am clicking on a button which had been placed there through Javascript (ajax). Clicking on the button works when using WebDrivers for Chrome, Firefox and ...
Michael Durrant's user avatar
0 votes
2 answers
981 views

Easy way to switch to headless automated testing after normal browser test?

Sorry for the confusing title, i've been really trying to find a good solution to writing automated tests for maintenance projects (To identify areas that potentially break after doing upgrades to ...
Mercfh's user avatar
  • 1,706
0 votes
1 answer
29 views

Running tests in chrome but just getting data;. in every browser window

My test suite (ruby, rspec, capybara) was able to run browser based feature tests before but they somehow are broken now, and none pass. This only happens on my Ubuntu machine. On other machines ...
Michael Durrant's user avatar
0 votes
1 answer
439 views

send_keys option do not work in firefox headless mode using Capybara

<span class="Select-some-wrapper" id=“id—value"> <div class="Select-placeholder">Name</div> <div role=“xx” aria-expanded="false" aria-owns="" aria- activedescendant=“id—value" ...
tech11's user avatar
  • 1
-1 votes
2 answers
65 views

Using existing framework for new PoM framework bad practice? [duplicate]

So I am implementing my own Page Object Model framework for a web application. It's my first time writing my own framework but I think I for the most part understand how I need to write it. The ...
Mercfh's user avatar
  • 1,706