Just a suggestion, why not make it more rubyish?
Why not extend Array class with Watir's Cookie class or something
similar so it would be something like:
browser.cookies => returns array with hashes
browser.cookies << Cookie.new(:domain => "domain") => adds new cookie
browser.cookies.clear => re
I suggest that this conversation move to the watir-development list.
We need need to ensure that Jari and the developers for other Watir
implementations are in the loop, and I'm not sure that they watch
everything here.
Bret
On Nov 19, 6:11 am, Tony wrote:
> Hi Aidy,
>
> Could you take a look a
Hi Aidy,
Could you take a look at this code that i had submitted a year back.
(regarding cookies)
http://jira.openqa.org/browse/WTR-264
Maybe you would need to change the method names, but i have tried to
include all possible cookie operations.
Thanks,
Tony
On Nov 19, 3:41 pm, aidy lewis wrot
How about this
browser.get_cookies(:domain => 'domain')
browser.get_cookies(:all)
browser.remove_cookies(:domain => 'domain')
remove_cookies(:all)
?
Aidy
2009/11/19 aidy lewis :
> Angrez et al
>
> It is unlikely that we would want to get all cookies, but get cookies
> for a particular uri.
>
Angrez et al
It is unlikely that we would want to get all cookies, but get cookies
for a particular uri.
browser.get_cookies('www.google.com')
How about
remove_cookies(:domain => 'domain')
remove_cookies(:all)
add_cookie is good.
Aidy
2009/11/19 Angrez Singh :
> Bret proposed the following s
Bret proposed the following syntax or method names via Google Wave, so we
should stick to this:
Browser#cookies (get cookies as ruby array of hashes)
Browser#add_cookie(opts) where opts is a hash of :name, :value, :path,
:secure and :name/:value will raise ArgumentError if not supplied
Browser#r
Ethan
2009/11/18 aidy lewis :
> Going to put the URI in, for #read_cookies or something
>
> 2009/11/18 Ethan :
>> That seems to be lacking the URI to set the cookie on. Would the method just
>> infer that from the current location of the browser, or should that be be
>> configurable by the user?
Going to put the URI in, for #read_cookies or something
2009/11/18 Ethan :
> That seems to be lacking the URI to set the cookie on. Would the method just
> infer that from the current location of the browser, or should that be be
> configurable by the user?
>
> On Wed, Nov 18, 2009 at 07:15, Angr
That seems to be lacking the URI to set the cookie on. Would the method just
infer that from the current location of the browser, or should that be be
configurable by the user?
On Wed, Nov 18, 2009 at 07:15, Angrez Singh wrote:
> Aidy,
>
> You can go ahead and write it. I'll write the correspond
Aidy,
You can go ahead and write it. I'll write the corresponding methods in
Watir.
-Angrez
On Wed, Nov 18, 2009 at 3:56 PM, aidy lewis wrote:
>
> Angrez,
>
> Sounds good. Would you like me to write them?
>
> I can either push them to my fork or just email them to you.
>
> I will be just doing
Angrez,
Sounds good. Would you like me to write them?
I can either push them to my fork or just email them to you.
I will be just doing the FireWatir ones, as I am unsure on what method
we should use for Watir.
Will start with and include tests.
Aidy
2009/11/18 Angrez Singh :
> How about thi
How about this:
browser.set_cookie(:name => "name", :value => "value")
browser.delete_cookie(:name => "name")
browser.delete_all_cookies()
I want these methods to be with Browser as cookies are related to browser.
Thoughts?
- Angrez
On Wed, Nov 18, 2009 at 12:28 AM, Bret Pettichord wrote:
>
> P
Please make a proposal for the method names and parameters.
Here is what we have for IE right now.
http://github.com/bret/watir/blob/master/watir/lib/watir/cookiemanager.rb
I've never used it. I would like to hear from some people who have. What
functionality do you use the cookiemanager for?
Yes, I have seen that preety interesting stuff. Need to see what all we can
make into FireWatir.
On Tue, Nov 17, 2009 at 4:57 PM, aidy lewis wrote:
>
> have you seen this by Matt
>
>
> http://sticklebackplastic.com/post/2009/10/20/Advanced-FireWatir-e28093-cheat-sheet.aspx#comment
> ?
>
> Aidy
>
have you seen this by Matt
http://sticklebackplastic.com/post/2009/10/20/Advanced-FireWatir-e28093-cheat-sheet.aspx#comment
?
Aidy
2009/11/17 Angrez Singh :
> thats what I am waiting for method names. Let me discuss with Bret and will
> let you know you can go ahead and put these methods there.
thats what I am waiting for method names. Let me discuss with Bret and will
let you know you can go ahead and put these methods there.
- Angrez
On Tue, Nov 17, 2009 at 4:50 PM, aidy lewis wrote:
>
> Are you going to take this up then, otherwise I can do it, if you
> provide your preferred method
Are you going to take this up then, otherwise I can do it, if you
provide your preferred method names.
Not sure how we are going to do it in Watir though.
Aidy
2009/11/17 Angrez Singh :
> :) correct thats the approach. Was discussing with Bret the syntax, method
> names so that its consistent w
:) correct thats the approach. Was discussing with Bret the syntax, method
names so that its consistent with IE and FF.
- Angrez
On Tue, Nov 17, 2009 at 4:44 PM, aidy lewis wrote:
>
> Angrez,
>
> Have you included cookie manipulation methods in FireWatir yet?
>
> If not I was think of using the
18 matches
Mail list logo