#212 awaiting-merge
T.J. VanSlyke

Selenium fill_in raises Selenium exception when driving Internet Explorer

Reported by T.J. VanSlyke | March 31st, 2009 @ 06:42 PM

We have a large suite of Cucumber tests driven by Webrat. Until now, we've been running them within a Firefox Selenium environment. When we attempted to run the suite through Internet Explorer, we found that several (but not all) calls to fill_in raised the following Selenium error:


      OR: Selenium failure. Please report to the Selenium Users forum at http://forums.openqa.org, with error details from the log window.  The error message is: Object doesn't support this property or method (Selenium::CommandError)
      /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/timeout.rb:56:in `timeout'
      /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/timeout.rb:76:in `timeout'
      (eval):2:in `fill_in'
      ./features/step_definitions/webrat_steps.rb:15:in `/^I fill in "(.*)" with "(.*)"$/'

Our interim solution was to replace the steps calling fill_in with explicit selenium.type calls. Looking at the implementation of SeleniumSession#fill_in, I notice it is pushing the message "webrat=field_identifier" to the Selenium server. I'm unaware of what Selenium knows about Webrat, so any information toward that end might help in resolving this.

Comments and changes to this ticket

  • Bryan Helmkamp

    Bryan Helmkamp April 6th, 2009 @ 12:24 PM

    Hey T.J.,

    In selenium mode, Webrat registers a "webrat=" locator strategy with its logic for using label elements to find input fields. You can see their implementation in the "lib/webrat/selenium/location_strategy_javascript" directory.

    I've never ran Selenium in IE before, so it's hard to say if this is a Webrat bug, or a Selenium+IE bug.

    -Bryan

  • gaffo

    gaffo May 7th, 2009 @ 06:31 PM

    • State changed from “new” to “open”

    TJ does this help?

  • Brian Takita

    Brian Takita May 12th, 2009 @ 05:55 PM

    We have an untested fix for this.

    http://github.com/honkster/webra...

    http://github.com/honkster/webra...

    There is a good amount of logic within the Webrat Selenium matchers. We probably should unit test them using Screw Unit (or equivalent) and have Selenium integration tests in an example project.

  • gaffo

    gaffo June 15th, 2009 @ 12:46 AM

    • State changed from “open” to “awaiting-merge”

    Need to test out these patches. There has been some work done on this front lately so they may not apply cleanly.

  • wesmaldonado

    wesmaldonado September 28th, 2009 @ 12:55 PM

    Does more work need to be done on this patch? I'd like to see it make it out in the next release and am willing to add tests/etc.

  • Jeroen van Dijk

    Jeroen van Dijk November 3rd, 2009 @ 09:08 AM

    I was just wondering whether it might be a good idea to use JQuery as a locator strategy instead of how they are currently defined in webrat.js. This probably solves browser compatibility issues and might be even faster. I tried to accomplish this without changing the selenium.jar by placing the jquery code in selenium_extensions.js, but for some reason I got a parse error (I guess I didn't copy-paste the jquery code properly).

    This blogpost inspired me to try it.

  • Rob Aldred

    Rob Aldred December 17th, 2009 @ 11:16 AM

    • Assigned user set to “gaffo”

    Is there any progress with this?
    The fill_in method uses the webrat locator (0.5.3), only looking for elements with id,name,label matching the locator value, it needs to work with the label.js and the webrat.js locators with some sort of conditional here similar to that of the field_element method of Webrat::Element::Label

  • Rob Aldred

    Rob Aldred December 17th, 2009 @ 11:21 AM

    • Assigned user cleared.

    time to upgrade my bad :)

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.

New-ticket Create new ticket

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.

Shared Ticket Bins

Pages