[wtr-general] Re: FireWatir bug/anomaly

2009-04-13 Thread Alex Collins


On 13 Apr 2009, at 19:59, Bret Pettichord wrote:
> I think there are 2 bugs here.
>
> 1. Firewatir does not issue an error when users use undefined methods.

Agree with this. I had a quick look but my trivial catch-all patch  
breaks various tests. I'll have a look tomorrow at fitting this into  
element.rb's method_missing call.

> 2. SelectList#set needs to be defined as an alias for  
> SelectList#select
> (as it is in IE-Watir).

I checked this morning - this is already fixed in the firewatir on  
GitHub in Bret's Watir repository.

Alex

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: FireWatir bug/anomaly

2009-04-13 Thread Bret Pettichord

I think there are 2 bugs here.

1. Firewatir does not issue an error when users use undefined methods.

2. SelectList#set needs to be defined as an alias for SelectList#select 
(as it is in IE-Watir).

Bret

Angrez Singh wrote:
> Can somebody put this in JIRA so that we can make Firewatir/Watir more 
> compatible?
>
> - Angrez
>
> On Sun, Apr 12, 2009 at 3:32 PM, Alex Collins 
> mailto:a.j.collins...@gmail.com>> wrote:
>
>
> I've just had a quick look, also on FF3/Mac.
>
> The issue is not that the select_list element is invisible - you can
> address it correctly as show by calling:
> @browser.select_lists
> or
> @browser.select_list(:id, 'cAbb')
>
> Calling the "methods" method on the element reveals that the "set"
> method you are calling is not present. I was surprised to see that
> this method exists - I've always used the "select" method, which works
> fine. The RDoc reveals that set should be an alias for select.
>
> I would suggest using the select method for the time being:
> @browser.select_list(:id,"cAbb").select("software jobs")
>
> However, if you wish to use the set method, add the following code to
> your firewatir/htmlelements.rb file in the SelectList class beneath
> the select method's definition:
> alias :set :select
>
> Best wishes,
>
> Alex
>
> On 12 Apr 2009, at 00:07, Jarmo Pertman wrote:
>
> >
> > Try to print out html for that select_list to make sure that you are
> > really dealing with the correct select_list and there aren't any
> > hidden ones or whatsoever. Or try just plain old .flash method
> to see
> > if correct list is flashing :)
> >
> > Jarmo
> >
> > On Apr 5, 7:07 am, Chris  > wrote:
> >> This snippet show the issue on FF3/Mac.  select_list on craigslist
> >> seems to be invisible.  FWIW, Selenium IDE can address the
> >> select_list
> >> with no problem
> >>
> >> require 'rubygems'
> >> require 'firewatir'
> >>
> >> @browser = Watir::Browser.new
> >> @browser.goto("http://newyork.craigslist.org/jjj/";)
> >>
> >> #CAN'T ADDRESS BY INDEX
> >> @browser.select_list(:index,1).set("software jobs")
> >> #CAN'T ADDRESS BY ID
> >> @browser.select_list(:id,"cAbb").set("software jobs")
> >> #CAN'T SET THE select_list VIA 'value=foo'
> >> @browser.select_list(:id,"cAbb").set("sof")
> >>
> >> FireWatir generates no error for any of these calls.
> > >
>
>
>
>
>
> >


-- 
Bret Pettichord
CTO, WatirCraft LLC, www.watircraft.com
Lead Developer, Watir, www.watir.com
Blog, www.io.com/~wazmo/blog
Twitter, www.twitter.com/bpettichord

Watir Training: Portland/Beaverton April 16-17
www.watircraft.com/training


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: FireWatir bug/anomaly

2009-04-13 Thread Angrez Singh
Can somebody put this in JIRA so that we can make Firewatir/Watir more
compatible?

- Angrez

On Sun, Apr 12, 2009 at 3:32 PM, Alex Collins wrote:

>
> I've just had a quick look, also on FF3/Mac.
>
> The issue is not that the select_list element is invisible - you can
> address it correctly as show by calling:
> @browser.select_lists
> or
> @browser.select_list(:id, 'cAbb')
>
> Calling the "methods" method on the element reveals that the "set"
> method you are calling is not present. I was surprised to see that
> this method exists - I've always used the "select" method, which works
> fine. The RDoc reveals that set should be an alias for select.
>
> I would suggest using the select method for the time being:
> @browser.select_list(:id,"cAbb").select("software jobs")
>
> However, if you wish to use the set method, add the following code to
> your firewatir/htmlelements.rb file in the SelectList class beneath
> the select method's definition:
> alias :set :select
>
> Best wishes,
>
> Alex
>
> On 12 Apr 2009, at 00:07, Jarmo Pertman wrote:
>
> >
> > Try to print out html for that select_list to make sure that you are
> > really dealing with the correct select_list and there aren't any
> > hidden ones or whatsoever. Or try just plain old .flash method to see
> > if correct list is flashing :)
> >
> > Jarmo
> >
> > On Apr 5, 7:07 am, Chris  wrote:
> >> This snippet show the issue on FF3/Mac.  select_list on craigslist
> >> seems to be invisible.  FWIW, Selenium IDE can address the
> >> select_list
> >> with no problem
> >>
> >> require 'rubygems'
> >> require 'firewatir'
> >>
> >> @browser = Watir::Browser.new
> >> @browser.goto("http://newyork.craigslist.org/jjj/";)
> >>
> >> #CAN'T ADDRESS BY INDEX
> >> @browser.select_list(:index,1).set("software jobs")
> >> #CAN'T ADDRESS BY ID
> >> @browser.select_list(:id,"cAbb").set("software jobs")
> >> #CAN'T SET THE select_list VIA 'value=foo'
> >> @browser.select_list(:id,"cAbb").set("sof")
> >>
> >> FireWatir generates no error for any of these calls.
> > >
>
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: FireWatir bug/anomaly

2009-04-12 Thread Paul Rogers
there is some functionality in firewatir ( at least the version that I had
been using) that doesnt generate exceptions when there is a javascript
exception. Id fixed this some where once ( probably in a local copy of
firewatir) , but I guess the code got lost

Paul

On Sun, Apr 12, 2009 at 8:16 AM, Chris McMahon <
christopher.mcma...@gmail.com> wrote:

>
>
> > Calling the "methods" method on the element reveals that the "set"
> > method you are calling is not present. I was surprised to see that
> > this method exists - I've always used the "select" method, which works
> > fine. The RDoc reveals that set should be an alias for select.
> >
> > I would suggest using the select method for the time being:
> > @browser.select_list(:id,"cAbb").select("software jobs")
> >
> > However, if you wish to use the set method, add the following code to
> > your firewatir/htmlelements.rb file in the SelectList class beneath
> > the select method's definition:
> > alias :set :select
>
> Alex, thanks very much.  I should have thought of some of that
> myself-- it has been some time since I've worked closely with Watir.
>
> Seems like I should have gotten a NoMethodError trying what I did, but
> I'm glad that there *is* a right method.
>
> -Chris
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: FireWatir bug/anomaly

2009-04-12 Thread Chris McMahon


> Calling the "methods" method on the element reveals that the "set"  
> method you are calling is not present. I was surprised to see that  
> this method exists - I've always used the "select" method, which works  
> fine. The RDoc reveals that set should be an alias for select.
>
> I would suggest using the select method for the time being:
> @browser.select_list(:id,"cAbb").select("software jobs")
>
> However, if you wish to use the set method, add the following code to  
> your firewatir/htmlelements.rb file in the SelectList class beneath  
> the select method's definition:
> alias :set :select

Alex, thanks very much.  I should have thought of some of that
myself-- it has been some time since I've worked closely with Watir.

Seems like I should have gotten a NoMethodError trying what I did, but
I'm glad that there *is* a right method.

-Chris
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: FireWatir bug/anomaly

2009-04-12 Thread Alex Collins

I've just had a quick look, also on FF3/Mac.

The issue is not that the select_list element is invisible - you can  
address it correctly as show by calling:
@browser.select_lists
or
@browser.select_list(:id, 'cAbb')

Calling the "methods" method on the element reveals that the "set"  
method you are calling is not present. I was surprised to see that  
this method exists - I've always used the "select" method, which works  
fine. The RDoc reveals that set should be an alias for select.

I would suggest using the select method for the time being:
@browser.select_list(:id,"cAbb").select("software jobs")

However, if you wish to use the set method, add the following code to  
your firewatir/htmlelements.rb file in the SelectList class beneath  
the select method's definition:
alias :set :select

Best wishes,

Alex

On 12 Apr 2009, at 00:07, Jarmo Pertman wrote:

>
> Try to print out html for that select_list to make sure that you are
> really dealing with the correct select_list and there aren't any
> hidden ones or whatsoever. Or try just plain old .flash method to see
> if correct list is flashing :)
>
> Jarmo
>
> On Apr 5, 7:07 am, Chris  wrote:
>> This snippet show the issue on FF3/Mac.  select_list on craigslist
>> seems to be invisible.  FWIW, Selenium IDE can address the  
>> select_list
>> with no problem
>>
>> require 'rubygems'
>> require 'firewatir'
>>
>> @browser = Watir::Browser.new
>> @browser.goto("http://newyork.craigslist.org/jjj/";)
>>
>> #CAN'T ADDRESS BY INDEX
>> @browser.select_list(:index,1).set("software jobs")
>> #CAN'T ADDRESS BY ID
>> @browser.select_list(:id,"cAbb").set("software jobs")
>> #CAN'T SET THE select_list VIA 'value=foo'
>> @browser.select_list(:id,"cAbb").set("sof")
>>
>> FireWatir generates no error for any of these calls.
> >


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: FireWatir bug/anomaly

2009-04-11 Thread Jarmo Pertman

Try to print out html for that select_list to make sure that you are
really dealing with the correct select_list and there aren't any
hidden ones or whatsoever. Or try just plain old .flash method to see
if correct list is flashing :)

Jarmo

On Apr 5, 7:07 am, Chris  wrote:
> This snippet show the issue on FF3/Mac.  select_list on craigslist
> seems to be invisible.  FWIW, Selenium IDE can address the select_list
> with no problem
>
> require 'rubygems'
> require 'firewatir'
>
> @browser = Watir::Browser.new
> @browser.goto("http://newyork.craigslist.org/jjj/";)
>
> #CAN'T ADDRESS BY INDEX
> @browser.select_list(:index,1).set("software jobs")
> #CAN'T ADDRESS BY ID
> @browser.select_list(:id,"cAbb").set("software jobs")
> #CAN'T SET THE select_list VIA 'value=foo'
> @browser.select_list(:id,"cAbb").set("sof")
>
> FireWatir generates no error for any of these calls.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---