
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
-
gaffo January 6th, 2009 @ 07:48 PM
- Tag changed from bug, patch, scope, within to bug, patch, scope, verify, within
Zach Dennis: It's be helpful if you could submit this as a branch called lh_105_scope_is_not_locating_caching_field on a fork of webrat/master on github.
-
Bryan Helmkamp January 17th, 2009 @ 11:11 AM
- Milestone set to 0.4
- State changed from new to awaiting-merge
-
Bryan Helmkamp January 17th, 2009 @ 05:01 PM
- State changed from awaiting-merge to resolved
(from [cdf9908f9e14cea7fda4f429c25dc6b40856dca2]) Fixed bug where Scope was creating a new DOM rather than re-using the existing DOM. [#105 state:resolved] http://github.com/brynary/webrat...
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.
People watching this ticket
Attachments
Referenced by
-
131 within { click_button } fails in some cases This is closed by #105 - http://webrat.lighthouseapp.com...
-
131 within { click_button } fails in some cases This is closed by #105 - http://webrat.lighthouseapp.com...
-
105 Scope is not locating / caching field properly ie: #within (from [cdf9908f9e14cea7fda4f429c25dc6b40856dca2]) Fixed b...