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

cucumber test in rails application does not seem to be submitting a form to log a user in

I am trying to test my rails app using cucumber and webrat. I'm trying to get the test to login as a user who is already created and stored in the database, and I'm getting the following error: Then I see a login error message #…
Rich Gray
  • 191
  • 2
  • 11
0
votes
1 answer

Receiving an 'undefined local variable or method' error on a visit method, when trying to use webrat for my cucumber tests

I have checked all previous questions and the whole of google for an answer to this, but still not solved. I am receiving the following error when running my cucumber tests: ps.rb:1 When I attempt to login with my details #…
Rich Gray
  • 191
  • 2
  • 11
0
votes
1 answer

How to deal with hidden field with cucumber and webrat?

I have to set a select date field with the month and day discarded. So Month and day are hidden in the form which caused a "undefined method `options' for # (NoMethodError)" when executing the cucumber scenario. How can i solve this issue and get…
user318722
  • 215
  • 3
  • 11
0
votes
1 answer

selenium cannot find element with class in IE

I'm using selenium_client with cucumber, webrat + IE As you'd expect, Firefox works fine. I've tried the following: selenium.is_visible("css=#flash…
Rob
  • 7,039
  • 4
  • 44
  • 75
0
votes
0 answers

I am trying to run the integration testing in Ruby on rails using capybara but when i run the test i am getting a java script error

HTML code for Issue Slip <%= simple_nested_form_for @issue_slip do |f| %> <%= f.error_messages %>

<%= f.hidden_field :user_id, :value => current_user.id %> From Store:
<%= f.label :store_location_id %> <% if…

0
votes
1 answer

Tools to write Integration tests with rspec 1, rails 2.3, ruby 1.8.7

I've an application running with this setup: Ruby 1.8.7 Rails 2.3.18 Rspec 1.3.0 I want to write some integration tests and wanted to use capybara, unfortunally as far as I've researched it is not compatible with that setup. The latest capybara…
Arnold Roa
  • 7,335
  • 5
  • 50
  • 69
0
votes
1 answer

Record id with cucumber and pickle [Rails]

I am using Cucumber, Webrat, and Pickle in conjunction. When I write a scenario, I can do something like this: Given a product exists with title: "Bread" When I go to the edit page for that product And I fill in "Title" with "Milk" And I press "Save…
Yuval Karmi
  • 26,277
  • 39
  • 124
  • 175
0
votes
1 answer

Can webrat browser-automation tests be parallelised?

Is there a facility similar to SeleniumGrid that I can use to run webrat (or other, similar framework) browser automation tests in parallel across a farm of coordinated agents? Coordinated via TeamCity with rake? Edit: We're looking at using…
Peter Mounce
  • 4,105
  • 3
  • 34
  • 65
0
votes
2 answers

Rails/Cucumber/Webrat: redirect_to, flash[:notice] not working

I'm new to Cucumber and have been stepping through a railscast by Ryan Bates. http://railscasts.com/episodes/155-beginning-with-cucumber Unfortunately my scenario is failing where the railscast passes. Specifically it is failing on the step: Then I…
Evan
  • 1,316
  • 2
  • 14
  • 19
0
votes
1 answer

Switch between a headed and headless server when integration testing with capybara

Let's say I have web-rat and selenium installed. How do I test my rails app quickly with web-rat (using capybara) , and then, do one final integration test with selenium?
Starkers
  • 10,273
  • 21
  • 95
  • 158
0
votes
1 answer

assert_response doesn't work with webrat in selenium mode

Anyone know how to get assert_response to work with webrat using selenium? I keep getting NoMethodError: undefined method `response_code' for nil:NilClass Here's my test: def test_basic_page_load visit root_path click_link "register" …
bmaddy
  • 876
  • 9
  • 16
0
votes
3 answers

Webrat verify content in iframe or frameset

I am using Cucumber + Webrat + Mechanize adapter and want to test contents of pages that are iframed or framed into the selected page. In other words: Scenario: View header on webpage Given I visit a page containing a frameset When there is a…
Jesper Rønn-Jensen
  • 106,591
  • 44
  • 118
  • 155
0
votes
1 answer

WebRat page not loaded (you are being redirected)

I have setup Webrat according to https://github.com/brynary/webrat But when I want to: "vist 'new' then the "fill_in" method doesn't work. This is because response.body has the contents: "You are being
Continuity
  • 59
  • 1
  • 7
0
votes
1 answer

Cucumber/webrat test fails after adding Subdomain-fu and redirection functionality

I added Subdomain-fu in my project. In ApplicationController I have before_filter which checks url and redirects app.com to www.app.com, www.subdomain.app.com to subdomain.app.com and checks account existence (redirects to home if not exists): …
Voldy
  • 12,829
  • 8
  • 51
  • 67
0
votes
1 answer

Using environment vars in non-rails cucumber test

I created a simple smoketest for a portal running java/tomcat/jahia (cms) fronted by cache servers and big ip. Cucumber + Webrat + Mechanize is a good fit for a simple smoketest of this setup. (and it has been very easy to get started). Right now I…
Jesper Rønn-Jensen
  • 106,591
  • 44
  • 118
  • 155