Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Capybara 2.0.0
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  15 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
jnicklas  
View profile  
 More options Nov 14 2012, 5:28 am
From: jnicklas <jonas.nick...@gmail.com>
Date: Wed, 14 Nov 2012 02:28:59 -0800 (PST)
Local: Wed, Nov 14 2012 5:28 am
Subject: [ANN] Capybara 2.0.0

Hi everyone,

I'm very proud and pleased to finally release Capybara 2.0, many thanks to
the many, many contributors who made this release possible.

First things first, this release is NOT BACKWARDS COMPATIBLE with Capybara
1.x in a few important ways. We've taken this opportunity to make a couple
of changes which were long overdue and which hopefully will improve the
experience of using Capybara. Upon upgrade though, you will likely find
that your tests break. We understand that this is going to cause you
frustration and lost time. We are not making these changes lightly, and
there aren't likely to be any further changes for a long time after this.
We are committed to a stable API.

That being said, here's what you need to watch out for.

When finding and interacting with elements through methods such as
`click_link` and `fill_in`, if there were more than one element which
matched, previously Capybara would try to guess which one you meant. From
now on, Capybara will raise an exception instead. For example, if you have
two fields named "Password" and "Password confirmation", then `fill_in
"Password", :with => "test"` will raise an exception.

I wrote a blog post about some techniques we use at Elabs to mitigate this
problem:

http://www.elabs.se/admin/posts/51-simple-tricks-to-clean-up-your-cap...

For those who use RSpec with Capybara, the `:type` metadata used by
Capybara tests has been changed from `:request` to `:feature`. This was
done to avoid confusion with Rails' built in integration tests. Make sure
you are using at least version `2.12.0` of `rspec-rails` if you are on
Rails, as it enables these changes. You will probably need to move your
Capybara tests to `spec/features`, as well as including all modules you
previously included in request spec in your feature specs instead.

Andy Lindeman from the RSpec team wrote a blog post, explaining this change
in more detail:

http://alindeman.github.com/2012/11/11/rspec-rails-and-capybara-2.0-w...

This release also drops official support for Ruby 1.8.x.

There are a few other major changes, which might affect you. Make sure to
review the changes listed in the History file:

https://github.com/jnicklas/capybara/blob/master/History.md

Please note that it will probably take a little while for other drivers,
like capybara-webkit and Poltergeist to be available for Capybara 2. For
now, only the bundled Selenium and RackTest drivers will work.

I hope you like this release, if you have any problems, please let us know
as soon as possible!

/Jonas


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "[ANN] Capybara 2.0.0" by Phillip Koebbe
Phillip Koebbe  
View profile  
 More options Nov 14 2012, 6:40 am
From: Phillip Koebbe <phillip.koe...@gmail.com>
Date: Wed, 14 Nov 2012 05:39:57 -0600
Local: Wed, Nov 14 2012 6:39 am
Subject: Re: [Capybara] [ANN] Capybara 2.0.0

On Nov 14, 2012, at 4:28 AM, jnicklas wrote:

> Hi everyone,

> I'm very proud and pleased to finally release Capybara 2.0, many thanks to the many, many contributors who made this release possible.

Great news! Congratulations Jonas and team!

> First things first, this release is NOT BACKWARDS COMPATIBLE with Capybara 1.x in a few important ways. We've taken this opportunity to make a couple of changes which were long overdue and which hopefully will improve the experience of using Capybara. Upon upgrade though, you will likely find that your tests break. We understand that this is going to cause you frustration and lost time. We are not making these changes lightly, and there aren't likely to be any further changes for a long time after this. We are committed to a stable API.

> That being said, here's what you need to watch out for.

> When finding and interacting with elements through methods such as `click_link` and `fill_in`, if there were more than one element which matched, previously Capybara would try to guess which one you meant. From now on, Capybara will raise an exception instead. For example, if you have two fields named "Password" and "Password confirmation", then `fill_in "Password", :with => "test"` will raise an exception.

I'm all for being more precise, and it's a very good idea to not guess which element Capybara should use. However, I'd really like to see an option to use the exact phrase passed in to the finder. Since I like precision so much, I would *never* use just "Password" when I really wanted "Password confirmation". Has this possibility ever been discussed?

Phillip


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
jnicklas  
View profile  
 More options Nov 14 2012, 6:50 am
From: jnicklas <jonas.nick...@gmail.com>
Date: Wed, 14 Nov 2012 03:50:26 -0800 (PST)
Local: Wed, Nov 14 2012 6:50 am
Subject: Re: [Capybara] [ANN] Capybara 2.0.0

> However, I'd really like to see an option to use the exact phrase passed

in to the finder. Since I like precision so much, I would *never* use just
"Password" when I really wanted "Password confirmation". Has this
possibility ever been discussed?

We've discussed it before, yes. I would like that kind of option too. It's
tricky to implement it correctly though, especially for labels. Consider
that select tags and textareas contain text which we would have to exclude
somehow, not to mention comments, script tags, inline styles and all other
kinds of shenanigans someone could conceivably put in there. It would also
be cumbersome when the labels or links contain additional characters, such
as an asterisk to indicate that a field is required. So since it would be
very difficult to be strict in all cases, we chose instead to be loose in
all cases, that way, at least it's consistent.

/Jonas


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "Capybara 2.0.0" by pietia
pietia  
View profile  
 More options Nov 14 2012, 7:20 am
From: pietia <pietia....@gmail.com>
Date: Wed, 14 Nov 2012 04:20:19 -0800 (PST)
Local: Wed, Nov 14 2012 7:20 am
Subject: Re: [ANN] Capybara 2.0.0
Hi !

Quick feedback / question: has anything changed in handling remote
servers? We have a simple test suite that tests remote app. I've
quickly changed capybara version in Gemfile  and now we get that:
https://gist.github.com/a1a5fe787dfc698e05ba
After quick debugging, it seems that capybara doesn't pass full path
to the driver.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "[ANN] Capybara 2.0.0" by Jonas Nicklas
Jonas Nicklas  
View profile  
 More options Nov 14 2012, 8:01 am
From: Jonas Nicklas <jonas.nick...@gmail.com>
Date: Wed, 14 Nov 2012 14:01:13 +0100
Local: Wed, Nov 14 2012 8:01 am
Subject: Re: [Capybara] [ANN] Capybara 2.0.0

Piotr: I've confirmed the issue. It seems like this only manifests when
Capybara has not started a web server, but is instead running against a
remote app and visit is given a relative URL. In that case, Capybara
doesn't seem to add the app_host to the URL. It seems that this particular
combination isn't tested in our test suite. I will make sure to add tests
for it and push out a bug fix release as soon as possible.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "Capybara 2.0.0" by Steve Tipton
Steve Tipton  
View profile  
 More options Nov 14 2012, 9:11 am
From: Steve Tipton <slaatipto...@gmail.com>
Date: Wed, 14 Nov 2012 06:11:19 -0800 (PST)
Local: Wed, Nov 14 2012 9:11 am
Subject: Re: [ANN] Capybara 2.0.0

Jonas, could you provide the correct link to the 51 simple tips?  That link
is going to admin and forcing login.  Removing admin from the url results
in a 404.

Thanks!


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Μάκης Χατζημιχάλης  
View profile  
 More options Nov 14 2012, 9:20 am
From: Μάκης Χατζημιχάλης <kosm...@gmail.com>
Date: Wed, 14 Nov 2012 06:20:02 -0800 (PST)
Local: Wed, Nov 14 2012 9:20 am
Subject: Re: [ANN] Capybara 2.0.0

Nice Jonas,

There is a mistake with one of your links though

|
http://www.elabs.se/admin/posts/51-simple-tricks-to-clean-up-your-cap...<http://www.elabs.se/admin/posts/51-simple-tricks-to-clean-up-your-cap...>

Should be:

http://www.elabs.se/blog/51-simple-tricks-to-clean-up-your-capybara-t... <http://www.elabs.se/admin/posts/51-simple-tricks-to-clean-up-your-cap...
Jonas your link leads to a login page, because you are using the admin
part. Should be:
http://www.elabs.se/blog/51-simple-tricks-to-clean-up-your-capybara-t...>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "[ANN] Capybara 2.0.0" by Jonas Nicklas
Jonas Nicklas  
View profile  
 More options Nov 14 2012, 10:17 am
From: Jonas Nicklas <jonas.nick...@gmail.com>
Date: Wed, 14 Nov 2012 16:16:45 +0100
Local: Wed, Nov 14 2012 10:16 am
Subject: Re: [Capybara] Re: [ANN] Capybara 2.0.0

Damn it, I always do that. Need to remember to check all links in an
incognito session.

On Wed, Nov 14, 2012 at 3:20 PM, Μάκης Χατζημιχάλης <kosm...@gmail.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jonas Nicklas  
View profile  
 More options Nov 14 2012, 10:49 am
From: Jonas Nicklas <jonas.nick...@gmail.com>
Date: Wed, 14 Nov 2012 16:49:21 +0100
Local: Wed, Nov 14 2012 10:49 am
Subject: Re: [Capybara] Re: [ANN] Capybara 2.0.0
 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ryan Bates  
View profile  
 More options Nov 14 2012, 1:11 pm
From: Ryan Bates <railsca...@gmail.com>
Date: Wed, 14 Nov 2012 10:11:31 -0800 (PST)
Local: Wed, Nov 14 2012 1:11 pm
Subject: Re: [Capybara] Re: [ANN] Capybara 2.0.0

Congratulations on the release, and thank you for your work on this!

Regarding the Password vs Password confirmation field, what is the best way
to handle this? You mention using "within" on the blog post but the
password field may not be within a separate element than the password
confirmation. Would using the id of the field work?

fill_in 'user_password', with: 'secret'

Or will that also catch the user_password_confirmation id?

Ryan


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
jnicklas  
View profile  
 More options Nov 14 2012, 2:41 pm
From: jnicklas <jonas.nick...@gmail.com>
Date: Wed, 14 Nov 2012 11:41:03 -0800 (PST)
Local: Wed, Nov 14 2012 2:41 pm
Subject: Re: [Capybara] Re: [ANN] Capybara 2.0.0

Ryan: Using the id would indeed work, since matches on `id` and `name` need
to be exact, and are not allowed to be substrings. If you don't want to use
ids, there are two sensible alternatives, you could change the labels to be
less ambiguous, ("Enter password", "Confirm password", maybe?), or you
could do something like: `all(:field, "Password").each { |field|
field.set("value") }`. If you encapsulate that in some kind of method, it
could actually looks somewhat decent `fill_in_all "Password", :with =>
"value"`, or something.

/Jonas


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "Capybara 2.0.0" by Kevin McCaughey
Kevin McCaughey  
View profile  
 More options Nov 20 2012, 1:50 pm
From: Kevin McCaughey <ke...@tentimes.org>
Date: Tue, 20 Nov 2012 10:50:49 -0800 (PST)
Local: Tues, Nov 20 2012 1:50 pm
Subject: Re: [ANN] Capybara 2.0.0

Maybe I am reading it wrong, but are you saying that on a page with
password and password confirmation, "click_link "Password" will fail? I
would have thought it correct that this click password as it matches
exactly, and requires click_link "password confirmation" for the other one
for disambiguation? Perhaps I am reading this wrong and being incredibly
stupid (more likely ;)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "[ANN] Capybara 2.0.0" by Jonas Nicklas
Jonas Nicklas  
View profile  
 More options Nov 20 2012, 1:57 pm
From: Jonas Nicklas <jonas.nick...@gmail.com>
Date: Tue, 20 Nov 2012 19:57:10 +0100
Local: Tues, Nov 20 2012 1:57 pm
Subject: Re: [Capybara] Re: [ANN] Capybara 2.0.0

Kevin: no, you are quite correct, see my reply to Ryan, above.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "Capybara 2.0.0" by sushma B
sushma B  
View profile  
 More options Nov 27 2012, 8:34 am
From: sushma B <sushma...@gmail.com>
Date: Tue, 27 Nov 2012 05:34:24 -0800 (PST)
Local: Tues, Nov 27 2012 8:34 am
Subject: Re: [ANN] Capybara 2.0.0

Hi All,

I am trying to do below operation with sending text with open and close
braces as below but capybara escapes "(" always.

Input : fill_in('edit-field-bbcgf-ingredients-und-1-target-id', :with =>
"2-3 garlic cloves, peeled and chopped (4637)")

I have tried with below combination. But non of the option seems working

1. "2-3 garlic cloves, peeled and chopped \(4637)"
2. '2-3 garlic cloves, peeled and chopped (4637)'

Output: "2-3 garlic cloves, peeled and chopped 4637)"

Any solution for this issue? Please share

Regards,
Sushma


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "[ANN] Capybara 2.0.0" by Siva Kandasamy
Siva Kandasamy  
View profile  
 More options Nov 27 2012, 10:43 am
From: Siva Kandasamy <sivajan...@gmail.com>
Date: Tue, 27 Nov 2012 10:43:52 -0500
Local: Tues, Nov 27 2012 10:43 am
Subject: Re: [Capybara] Re: [ANN] Capybara 2.0.0

Did you try html safe replace for "("  .
Please refer: http://www.ascii.cl/htmlcodes.htm

Siva

--
------------------------------------------
Sivakumar P Kandasamy,

Software Engineer
M2S (www.m2s.com)
------------------------------------------


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »