#105 ✓resolved
Zach Dennis

Scope is not locating / caching field properly ie: #within

Reported by Zach Dennis | December 29th, 2008 @ 05:07 PM | in 0.4

With the latest webrat the below would fail because of how Scope#scoped_dom worked to locate elements:


    within "form[@action='/form2']" do 
      fill_in "Email", :with => "test@example.com"
      click_button "Add"
    end

When filling in the Email text field it would find:


/html/body/div/div/form/input

When clicking the submit button the form would find:


/html/body/form/input

Because the XPath locations differed for the same element Webrat would construct and cache two separate TextField objects (and it wasn't limited to TextFields. Attached is a patch with examples which fixes this.

We believe it also fixes #49 since the pending / failing example now passes.

Comments and changes to this ticket

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

People watching this ticket

Attachments

Referenced by

Pages