Questions tagged [capybara]

Capybara is a web application testing framework for Rack applications, such as Rails, Sinatra and Merb.

Capybara aims to simplify the process of integration testing Rack applications, such as Rails, Sinatra or Merb. Capybara simulates how a real user would interact with a web application. It is agnostic about the driver running your tests and currently comes bundled with rack-test, Culerity, Celerity and Selenium support built in.

A complete reference is available at rubydoc.info.
A great capybara cheat sheet is available here.

5916 questions
2
votes
1 answer

Rails 6, minitest system test: password reset fails in tests, but works when I manually change it

I'm using Rails 6 and minitest with the built-in system tests (which use Capybara I think) and using FactoryBot as well to generate my test records. I have a pretty standard password rest feature I'm trying to implement. I've verified that when I go…
Dan L
  • 4,319
  • 5
  • 41
  • 74
2
votes
0 answers

Capybara Docker Headless Chrome - unknown error: DevToolsActivePort file doesn't exist

Running tests within Docker using capybara and headless chrome. I can see a bunch of defunct processes which is from the chromedriver trying to start chrome. sh-4.2# google-chrome --version Google Chrome 79.0.3945.117 sh-4.2# chromedriver…
2
votes
0 answers

How do I select a web element that doesn't have any unique value using Capybara

I am trying to enter value to a textbox email that doesn't have any unique attribute value using Capybara. How can I select an element without a unique class, label or attribute?
Poo M
  • 31
  • 3
2
votes
1 answer

How to use Capybara to match dynamic image file names?

I have been trying to use Capybara to match actual image file name with expected file name. I have images that are stored in app/assets/images, e.g. image01.png. The file name of these images are stored in the image_file_name field of one or more…
Waihon Yew
  • 65
  • 6
2
votes
1 answer

Cucumber, Capybara, Rails 3, 302 Found Redirect Issue

I am new to capybara but I am trying to use it to test (with cucumber) an app I am converting from rails 2 to rails 3. However, I am getting strange behavior when testing log in. I have a cucumber login step that does the following: visit…
2
votes
2 answers

Testing destroy methods with capybara

I've written some tests using Capybara, but I'm not using selenium and neither any other JS drivers. But my doubt is if I can test a destroy method this way? Since I need to confirm a JS confirmation and the data-method = "delete" can't be…
AndreDurao
  • 5,600
  • 7
  • 41
  • 61
2
votes
2 answers

How can I switch Frame using Capybara and Ruby?

I'm developing an atomation test using Capybara and Ruby. I need to switch frame to acess the webelement in the Report page, but I don't know how can I do it. HTML code: