
field_with_id not working in Selenium
Reported by Danie Roux | December 13th, 2008 @ 05:00 PM
... field_with_id was not working for me.
Comments and changes to this ticket
-
gaffo January 6th, 2009 @ 07:28 PM
- Tag set to incomplete
Danie, Could you provide a bit more info?
Version of webrat? Version of Rails/Sinatra/Merb? Test::Unit or Rspec or Cucumber?
Maybe example html and field_with_id code use?
-
Bryan Helmkamp January 7th, 2009 @ 12:40 PM
- Title changed from SeleniumSession needs to inherit from Session to field_with_id not working in Selenium
SeleniumSession definitely shouldn't be inheriting from Session, so I'm updating the title. :-)
Cheers,
-Bryan
-
Bryan Helmkamp February 8th, 2009 @ 11:46 PM
- Tag changed from incomplete to featurerequest, incomplete
- State changed from new to open
We need to figure out what it means to use a field locator directly in Selenium mode. Perhaps we should start with the use cases.
Danie -- What were you trying to accomplish?
-
zlu March 16th, 2009 @ 07:26 PM
Bryan, I think I have a similar or same problem. I'm using webrat 0.4.1 with Selenium (1.1.14) and selenium-client (1.2.14). The Then step fails on field_with_id:
When /^I click on the image$/ do visit new_message_path click_link "Brad Sucks - Dropping out of School", :javascript => true end
Then /^the image should show up as selected gift$/ do puts response.body response.should contain("Brad Sucks - Dropping out of School") response.should have_selector("span.small")#, :content => "Brad Sucks - Dropping out of School") field_with_id("message_gift_id").value.should == @ringtone_gift.name end
The error is:
undefined method `field_with_id' for #<Webrat::SeleniumSession:0x370aec4> (NoMethodError) (eval):2:in `field_with_id' ./features/step_definitions/send_gifts_steps.rb:19:in `Then /^the image should show up as selected gift$/' features/enhanced/send_gifts.feature:10:in `Then the image should show up as selected gift'
So when I click on the link ("Brad Sucks..."), it invokes a javascript call which should populate a hidden field. The test runs fine as I can see from the puts that the hidden field has been set correctly:
I've also tried to use field_named but failed the same way.
-
-
-
Bill Kirtley May 28th, 2009 @ 04:39 PM
- Tag changed from featurerequest, incomplete to featurerequest, incomplete, selenium
-
gaffo June 5th, 2009 @ 03:13 PM
- State changed from open to awaiting-patch
This feature needs to be implemented. Marking as awaiting patch.
-
gaffo June 5th, 2009 @ 03:13 PM
- Tag changed from featurerequest, incomplete, selenium to featurerequest, selenium
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
Ruby Acceptance Testing for Web applications.