Questions tagged [webrat]

Webrat is an acceptance testing library for Web applications written in Ruby.

Webrat is an acceptance testing tool for Ruby, which simulates a browser without JavaScript support. But it can also be combined with a web automation framework like Watir to implement browser based web automation tests.

183 questions
0
votes
3 answers

Annoying Webrat/Selenium Warning when changing domain names

When I'm working with AJAX + Webrat in Selenium mode, I'll often have to specify real domains and subdomains. Consequentially I'll get this message a lot: 14:00:45.222 WARN - you appear to be changing domains from http://test.host:3001 to …
kfitzpatrick
  • 2,425
  • 4
  • 19
  • 11
0
votes
1 answer

Error in webrat installation

I'm getting the following error when I'm trying to install webrat in my OS X, please suggest me how can i solve this problem. ERROR: Error installing webrat: ERROR: Failed to build gem native…
user200755
0
votes
1 answer

'visit *_path' doesn't work while testing user model

I've searched around and this seems like a common enough issue, but nothing has worked for me. Here goes! Firstly, I'm working through the Hartl RoR tutorial. I'm towards the end of section 9 (video 905) and I'm trying to test a failing user…
dax
  • 10,779
  • 8
  • 51
  • 86
0
votes
1 answer

New to Rails -- Webrat methods not working in integration test

I have a Gemfile: source 'https://rubygems.org' gem 'rails', '3.2.11' gem 'omniauth' gem 'omniauth-facebook' gem 'thin' # Bundle edge Rails instead: # gem 'rails', :git => 'git://github.com/rails/rails.git' …
wjandali
  • 112
  • 2
  • 10
0
votes
0 answers

Undefined Method 'visit' after migrating to capybara from webrat in rails 3.2.12

We are migrating rails integration test to capybara from webrat. Replace response.should with response.body.should. Also added require 'capybara/rails' to spec_helper.rb. However there is an error saying undefined method 'visit'. Every visit causes…
user938363
  • 9,990
  • 38
  • 137
  • 303
0
votes
1 answer

Solve (Capybara::ElementNotFound) with simple form and cucumber

I'm using cucumber to test and I'm using simple_form for the contact form. I get the following error: Given I am on the login page And I fill in "student_name" with "sadik" Unable to find field "student_name" (Capybara::ElementNotFound) my…
Sadık
  • 4,249
  • 7
  • 53
  • 89
0
votes
2 answers

selecting page elements with webrat

There is a list of products (html table). Each row has got product name and ends with 'add to cart' button. How to add 2 'coffee' and 3 'tea' in the cart from webrat? Corresponding html:
artemave
  • 6,786
  • 7
  • 47
  • 71
0
votes
2 answers

Making sure a box is checked with Capybara?

I'm new to using Cucumber and Capybara. I've set up a test on a webpage, and run into this error when attempting to run. undefined method `locate' for # (NoMethodError) ./Documents/Work:etc./Raster…
Deankh2
  • 1
  • 1
0
votes
1 answer

Rails webrat gem - render method missing

I am using rspec and webrat for behavior driven development. This is the first time I am using webrat. I followed webrat's instructions on how to use the gem, so I think it is installed correctly (the gem shows when I use bundle show). The problem…
Dennis Hackethal
  • 13,662
  • 12
  • 66
  • 115
0
votes
1 answer

how should I get webrat to test the contents of a textarea

I'm trying to work out the right syntax to have webrat check the contents of a textarea in a form. I can check the presence of a textarea with response.should have_selector('textarea') but the contains method appears to only check the visible text…
Sam Joseph
  • 4,584
  • 4
  • 31
  • 47
0
votes
2 answers

How do I get webrat / selenium to "wait for" the CSS of the page to load?

When I use webrat in selenium mode, visit returns quickly, as expected. No prob. I am trying to assert that my styles get applied correctly (by looking at background images on different elements). I am able to get this information via JS, but it…
ndp
  • 21,546
  • 5
  • 36
  • 52
0
votes
2 answers

File uploads using the selenium-client gem

I am using the selenium-client gem with Webrat and Cucumber to test a rails project. I have Cucumber set up pretty much as described here: https://github.com/cucumber/cucumber/wiki/Setting-up-Selenium My problem is that Selenium is prevented from…
Rodreegez
  • 576
  • 5
  • 15
0
votes
1 answer

How can I get webrat to follow redirects

I have the following in my scenario: And I click the link Log out Then I should see the login page Clicking the Log out link sends the user to /log_out, which redirects back to the log in page. Webrat is failing because it's looking for "Login" but…
Zen
  • 7,197
  • 8
  • 35
  • 57
0
votes
1 answer

Check links on external websites?

I need to check reciprocal links on external websites - are the best options webrat or capybara in a Rails app? Or something else? Users will submit the URL of the page where the link back to us has been placed, so we don't need a crawl of the whole…
A4J
  • 879
  • 10
  • 24
0
votes
0 answers

Modify html attributes in Webrat?

Can I modify the html in a page using Webrat? To be specific, I want to change the name attribute in an input in a form before I submit the form.
Max Williams
  • 32,435
  • 31
  • 130
  • 197
1 2 3
12
13