capybara Questions

3

Solved

Learning 'capybara' and bumped into issue of finding the hidden elements through capybara. In HTML, we have an file field which is 'display: none' by default. HTML element is: <input class="so...
Uncommitted asked 11/5, 2017 at 7:9

4

I have a simple link_to_function in my view template <%= link_to_function "add new category", "$('#category_name').focus()" %> and I want to test this with capybara using request specs. Ba...
Stormie asked 29/10, 2011 at 17:34

6

Solved

Chrome version: 59.0.3071.104 I am using Cucumber, Capybara, Selenium to implement automation testing with Headless Chrome. features/support/env.rb require 'rubygems' require 'capybara/cucumber' ...

8

Solved

While accessing driver.manage.logs.get(:browser) on chromedriver 75.0.3770.8 I'm getting this error: undefined method `log' for #<Selenium::WebDriver::Remote::W3C::Bridge:0x0000562dc661c250> ...
Regolith asked 10/6, 2019 at 7:49

4

Solved

I am using Rspec in my project where I would like to print the time taken by each testcase, Is there any way Rspec is providing any prebuilt function? I can take the starting time of the testcase b...
Bugbee asked 3/12, 2018 at 6:56

4

Solved

I'm new to writing tests in capybara and I'm having trouble getting the current URL of a page. I wrote it like this: url = page.current_url + page.current_path Somehow its just returning the bas...
Markley asked 11/12, 2013 at 14:56

3

I wish to switch between browser tabs for a feature I am testing. However I have not been able to do this. Have tried using the following: page.driver.browser.switch_to.window(page.driver.browser....
Stannwood asked 14/7, 2014 at 20:45

7

How can I write a capybara integration test with a form using jquery.selectize? I'd like to test a user entering a couple of values.
Augusto asked 29/4, 2014 at 17:55

4

I am using Cocoon to add records. IDs look like workshop_instance_sessions_attributes_1477654140_start_time . At the moment I am traversing the DOM and grabbing the dynamically generated IDs (this ...
Synovitis asked 28/10, 2016 at 11:53

4

Solved

Working on a new Rails 3.2.9 app with rspec and capybara. I have the following in the Gemfile: gem 'rspec-rails' gem 'capybara' and the following in spec/spec_helper.rb: require 'rspec/rails' ...
Minh asked 6/12, 2012 at 16:0

2

Solved

I am testing file upload i.e CSV. In my code as well as browser HTML I found file field but while testing the capybara is unable to find the file field. I tried hard and different approaches but un...
Nuzzi asked 13/8, 2014 at 5:33

2

Using Rails 6.1.4, the following works locally to fill in a Rich Text (Action Text) in a system test: find("trix-editor").set("Something") However, running on a GitHub action, ...
Magistracy asked 19/10, 2021 at 6:56

5

Solved

I have a special listbox that I could automate best by sending a down arrow and pressing enter. I can press enter like so: listbox_example = find(input, "listbox-example") listbox-example.set("st...
Lacedaemon asked 17/12, 2012 at 15:8

4

Solved

I have a reservation search form that contains the following date_field helper: <%= date_field(:reservation, :arrival_date) %> How do I select a specific date for this date_field tag using...
Vouge asked 18/2, 2014 at 9:56

15

Solved

I'm using Rspec and Capybara. How can I write a step to check a checkbox? I've tried check by value but it can't find my checkbox. I'm not sure what to do, as I have in fact same ID with different...
Tad asked 28/11, 2011 at 14:52

8

Solved

I am trying to submit a form without button using just Capybara and Rspec (no Cucumber or Selenium, I know there is already a question about that). I've seen there is a gist to add a method to sub...
Heterocyclic asked 6/1, 2012 at 11:58

6

I need to capture the console logs (category: info) of a browser using Ruby & Capybara. Until now I have tried using driver.manage.logs.get(:browser) or (:client) but, using this, the result is...
Latimore asked 18/9, 2017 at 11:48

7

Solved

I can't get capybara working with rspec. It gives me this error: undefined method `visit' for #<RSpec::Core::ExampleGroup::Nested_1:0x16529f8 @example=nil> I know there are lots of posts a...
Monkey asked 1/3, 2013 at 0:53

7

Solved

I have the following spec: it "deletes post", :js => true do ... ... page.status_code.should = '404' end The page.status_code line is giving me this error: Capybara::NotSupportedByDriverE...
Roberge asked 26/10, 2011 at 21:4

5

I am using cucumber/capybara/selenium/firefox on Mac. All working great except for d&d. Drag and drop is available via drag_node.drag_to(drop_node). When called, it does not raise any errors bu...
Nashua asked 17/10, 2011 at 16:10

2

Solved

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 i...

12

Solved

I'm attempting to set the request header 'Referer' to spoof a request coming from another site. We need the ability test that a specific referrer is used, which returns a specific form to the user,...
Retrorocket asked 26/3, 2013 at 18:51

7

I have a form_tag that generates the following HTML: <form accept-charset="UTF-8" action="http://www.example.com/product_page" id="dates_form" method="get"><div style="margin:0;padding:0;...
Sheasheaf asked 17/4, 2013 at 2:28

4

Solved

I have a JavaScript component (e.g. a date picker) that heavily depends on - The current system time The current system time zone In Ruby and Capybara it's possible to stub any time with the he...
Polack asked 27/3, 2018 at 4:18

7

I have the following helper method to input a string into an input field and press the enter key, but it seems the enter key is never pressed. I see the string entered into the input field, but the...

© 2022 - 2025 — McMap. All rights reserved.