Zach Dennis wrote:
XPath is merely the mechanism in which you're allowed to find
particular elements on a page. After typing:
xpath :input, :name => "foo"
xpath :input, :name => "bar"
xpath :input, :name => "baz"
I would probably write my own wrapper so I could omit the redundant
"xpa
Zach Dennis wrote:
response.body.should be_xml_with do
form :action => '/users' do
fieldset do
legend "Personal Information"
label "First name"
input :type => 'text', :name => 'user[first_name]'
end
end
end
I like this a lot.
I just thought of about 3 truly sick ways
On Sun, Mar 8, 2009 at 2:41 PM, Phlip wrote:
> David Chelimsky wrote:
>
>>> xpath :'legend[ contains(., "Personal Information") ]' and
>>> xpath :'label[ contains(., "First name") ]' and
>>> xpath :input, :type => 'text', :name => 'user[first_name]'
>
>> This is nice, but t
On Sun, Mar 8, 2009 at 1:41 PM, Phlip wrote:
> David Chelimsky wrote:
>
>>> xpath :'legend[ contains(., "Personal Information") ]' and
>>> xpath :'label[ contains(., "First name") ]' and
>>> xpath :input, :type => 'text', :name => 'user[first_name]'
>
>> This is nice, but t
Zach Dennis wrote:
response.body.should be_xml_with do
form :action => '/users' do
fieldset do
legend "Personal Information"
label "First name"
input :type => 'text', :name => 'user[first_name]'
end
end
end
I like this a lot.
Then it should be ".should be_html_with"..
David Chelimsky wrote:
xpath :'legend[ contains(., "Personal Information") ]' and
xpath :'label[ contains(., "First name") ]' and
xpath :input, :type => 'text', :name => 'user[first_name]'
This is nice, but the abstractions are operating at different levels.
The key
On Sun, Mar 8, 2009 at 2:03 PM, David Chelimsky wrote:
> On Sun, Mar 8, 2009 at 12:00 PM, Phlip wrote:
>> RSpecsters:
>>
>> I like nested XPath expressions, because the outer XPath assertion can clip
>> the diagnostic of the inner XPath assertion. You don't get the whole page
>> spewed into your
On Sun, Mar 8, 2009 at 12:00 PM, Phlip wrote:
> RSpecsters:
>
> I like nested XPath expressions, because the outer XPath assertion can clip
> the diagnostic of the inner XPath assertion. You don't get the whole page
> spewed into your face when you fault!
>
> This specification, for example, tests
RSpecsters:
I like nested XPath expressions, because the outer XPath assertion can clip the
diagnostic of the inner XPath assertion. You don't get the whole page spewed
into your face when you fault!
This specification, for example, tests Yury Kotlyarov's user login page, from:
http://gith