From kcampos at bioiq.com Mon Oct 6 17:37:45 2008 From: kcampos at bioiq.com (Kyle Campos) Date: Mon, 6 Oct 2008 14:37:45 -0700 Subject: [SafariWatir-general] opening a URL with post data Message-ID: <331BE270-7BCE-4A69-B7DD-816592EB8A1F@bioiq.com> I need to open a URL with post data that's not coming from a UI request. So what would normally be done in ruby like: post 'URL' { :key => 'post_value' } I don't see anything built in that would allow for this. Anyone done this or have any hints? -Kyle From dave.hoover at gmail.com Tue Oct 7 07:01:06 2008 From: dave.hoover at gmail.com (Dave Hoover) Date: Tue, 7 Oct 2008 06:01:06 -0500 Subject: [SafariWatir-general] opening a URL with post data In-Reply-To: <331BE270-7BCE-4A69-B7DD-816592EB8A1F@bioiq.com> References: <331BE270-7BCE-4A69-B7DD-816592EB8A1F@bioiq.com> Message-ID: <11c8704e0810070401waa2b2a5l47480b66675fbab9@mail.gmail.com> Kyle, Is this a (Safari)Watir question? Or are you asking a net/http question? On Mon, Oct 6, 2008 at 4:37 PM, Kyle Campos wrote: > I need to open a URL with post data that's not coming from a UI request. So > what would normally be done in ruby like: > > post 'URL' { > :key => 'post_value' > } > > I don't see anything built in that would allow for this. Anyone done this or > have any hints? > > -Kyle > _______________________________________________ > SafariWatir-general mailing list > SafariWatir-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/safariwatir-general > -- Dave Hoover //obtiva: Agility applied. Software delivered. From kcampos at bioiq.com Tue Oct 7 12:47:52 2008 From: kcampos at bioiq.com (Kyle Campos) Date: Tue, 7 Oct 2008 09:47:52 -0700 Subject: [SafariWatir-general] opening a URL with post data In-Reply-To: <11c8704e0810070401waa2b2a5l47480b66675fbab9@mail.gmail.com> References: <331BE270-7BCE-4A69-B7DD-816592EB8A1F@bioiq.com> <11c8704e0810070401waa2b2a5l47480b66675fbab9@mail.gmail.com> Message-ID: I'm asking if there's any method in safari-watir, or watir in general, that allows for this kind of thing. I don't see it, but maybe I'm missing it. -Kyle On Oct 7, 2008, at 4:01 AM, Dave Hoover wrote: > Kyle, > > Is this a (Safari)Watir question? Or are you asking a net/http > question? > > > On Mon, Oct 6, 2008 at 4:37 PM, Kyle Campos wrote: >> I need to open a URL with post data that's not coming from a UI >> request. So >> what would normally be done in ruby like: >> >> post 'URL' { >> :key => 'post_value' >> } >> >> I don't see anything built in that would allow for this. Anyone >> done this or >> have any hints? >> >> -Kyle >> _______________________________________________ >> SafariWatir-general mailing list >> SafariWatir-general at rubyforge.org >> http://rubyforge.org/mailman/listinfo/safariwatir-general >> > > > > -- > Dave Hoover > //obtiva: Agility applied. Software delivered. From dave.hoover at gmail.com Wed Oct 8 06:52:07 2008 From: dave.hoover at gmail.com (Dave Hoover) Date: Wed, 8 Oct 2008 05:52:07 -0500 Subject: [SafariWatir-general] opening a URL with post data In-Reply-To: References: <331BE270-7BCE-4A69-B7DD-816592EB8A1F@bioiq.com> <11c8704e0810070401waa2b2a5l47480b66675fbab9@mail.gmail.com> Message-ID: <11c8704e0810080352x75f928a7k4d7cadd0f052c36e@mail.gmail.com> I don't think there is anything in Watir that would allow you to do this. Watir is all about the UI. If you want to open a URL in Watir with post data, your best bet would be to create a local HTML file with a form in it pointing to the URL you want and have Watir submit the form. On Tue, Oct 7, 2008 at 11:47 AM, Kyle Campos wrote: > I'm asking if there's any method in safari-watir, or watir in general, that > allows for this kind of thing. I don't see it, but maybe I'm missing it. > > -Kyle > > On Oct 7, 2008, at 4:01 AM, Dave Hoover wrote: > >> Kyle, >> >> Is this a (Safari)Watir question? Or are you asking a net/http question? >> >> >> On Mon, Oct 6, 2008 at 4:37 PM, Kyle Campos wrote: >>> >>> I need to open a URL with post data that's not coming from a UI request. >>> So >>> what would normally be done in ruby like: >>> >>> post 'URL' { >>> :key => 'post_value' >>> } >>> >>> I don't see anything built in that would allow for this. Anyone done this >>> or >>> have any hints? >>> >>> -Kyle >>> _______________________________________________ >>> SafariWatir-general mailing list >>> SafariWatir-general at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/safariwatir-general >>> >> >> >> >> -- >> Dave Hoover >> //obtiva: Agility applied. Software delivered. From del_dr at yahoo.com Thu Oct 9 12:09:56 2008 From: del_dr at yahoo.com (D P) Date: Thu, 9 Oct 2008 09:09:56 -0700 (PDT) Subject: [SafariWatir-general] how can I click a link ? Message-ID: <273180.47133.qm@web57705.mail.re3.yahoo.com> Hi all, How can I do link click from safariwatir? I'm using safariwatir version 0.2.8 but I can't see a method like $object.link().click. Thanks for helping! From bptremblay at avaya.com Thu Oct 9 12:45:57 2008 From: bptremblay at avaya.com (Tremblay, Benjamin P. (Ben)) Date: Thu, 9 Oct 2008 10:45:57 -0600 Subject: [SafariWatir-general] how can I click a link ? In-Reply-To: <273180.47133.qm@web57705.mail.re3.yahoo.com> References: <273180.47133.qm@web57705.mail.re3.yahoo.com> Message-ID: DP, It's there. You've got to crack open the gem and look at the source. See Mr. Hoover's functional test, safariwatir_script.rb and there are several examples of locating links and clicking them. The static method link() returns a reference to a link. Links are almost always identified by their readable text. >From the script: safari = Watir::Safari.new def safari.google_to_prag goto("http://google.com") text_field(:name, "q").set("pickaxe") button(:name, "btnG").click link(:text, "Programming Ruby, 2nd Ed.").click link(:url, "http://www.pragmaticprogrammer.com/titles/ruby/code/index.html").click link(:text, "Catalog").click link(:text, "All Books").click link(:text, /Agile Retrospectives/).click puts "FAILURE prag" unless contains_text("Dave Hoover") End ( The great weakness of these types of tools is no binding between unique id's in html and unique id's in AppleScript... So we have to use all sorts of stupid tricks to locate things like links (HREFs) that normally never have a name or id attribute in HTML... If we just all started to use the id attribute for every HTML element, Watir would really be easy to use. It's perfectly possible to reference ANY UI elements in ANY Mac application via 'chunk expressions' in AppleScript but there's no way to use AppleScript to find elements in a window according to some search criteria much the same way that the DOM let's us call document.getElementsByTagName()... So we have to waste a lot of time analyzing every dang page of a large website trying to figure out which stupid trick to use to identify a simple link or table cell. ) Ben -----Original Message----- From: safariwatir-general-bounces at rubyforge.org [mailto:safariwatir-general-bounces at rubyforge.org] On Behalf Of D P Sent: Thursday, October 09, 2008 10:10 AM To: safariwatir-general at rubyforge.org Subject: [SafariWatir-general] how can I click a link ? Hi all, How can I do link click from safariwatir? I'm using safariwatir version 0.2.8 but I can't see a method like $object.link().click. Thanks for helping! _______________________________________________ SafariWatir-general mailing list SafariWatir-general at rubyforge.org http://rubyforge.org/mailman/listinfo/safariwatir-general From del_dr at yahoo.com Fri Oct 10 04:32:07 2008 From: del_dr at yahoo.com (D P) Date: Fri, 10 Oct 2008 01:32:07 -0700 (PDT) Subject: [SafariWatir-general] how can I click a link ? In-Reply-To: Message-ID: <549743.64162.qm@web57704.mail.re3.yahoo.com> Hi Ben, Thanks for the answer. I found the libs and tried to execute the safariwatir_script.rb but I have this: -------------------------------------------- /Library/Ruby/Gems/1.8/gems/safariwatir-0.2.8/./safariwatir.rb:101:in `send': undefined method `operate_by_on_link' for # (NoMethodError) from /Library/Ruby/Gems/1.8/gems/safariwatir-0.2.8/./safariwatir.rb:101:in `operate' from /Library/Ruby/Gems/1.8/gems/safariwatir-0.2.8/./safariwatir/scripter.rb:160:in `highlight' from /Library/Ruby/Gems/1.8/gems/safariwatir-0.2.8/./safariwatir.rb:204:in `click' from /Users/del/NetBeansProjects/test-denver/lib/main.rb:10:in `google_to_prag' from /Users/del/NetBeansProjects/test-denver/lib/main.rb:121 ---------------------------------------------- Sorry but I'm very new to watir and I really don't know where is the problem. I tried with Safari 3.x and Safari 4.x developement edition without success. I'm running on Leopard 10.5.5 on Intel. I try to test safariwatir and watir, I would like to replace my web tests currently running from WinRunner. Thanks for helping, Del --- On Thu, 10/9/08, Tremblay, Benjamin P. (Ben) wrote: > From: Tremblay, Benjamin P. (Ben) > Subject: RE: [SafariWatir-general] how can I click a link ? > To: del_dr at yahoo.com, safariwatir-general at rubyforge.org > Date: Thursday, October 9, 2008, 6:45 PM > DP, > > It's there. You've got to crack open the gem and > look at the source. See > Mr. Hoover's functional test, safariwatir_script.rb and > there are > several examples of locating links and clicking them. > > The static method link() returns a reference to a link. > Links are almost always identified by their readable text. > > From the script: > > safari = Watir::Safari.new > > def safari.google_to_prag > goto("http://google.com") > text_field(:name, "q").set("pickaxe") > button(:name, "btnG").click > link(:text, "Programming Ruby, 2nd Ed.").click > link(:url, > "http://www.pragmaticprogrammer.com/titles/ruby/code/index.html").click > link(:text, "Catalog").click > link(:text, "All Books").click > link(:text, /Agile Retrospectives/).click > puts "FAILURE prag" unless > contains_text("Dave Hoover") > End > > ( The great weakness of these types of tools is no binding > between > unique id's in html and unique id's in > AppleScript... So we have to use > all sorts of stupid tricks to locate things like links > (HREFs) that > normally never have a name or id attribute in HTML... If we > just all > started to use the id attribute for every HTML element, > Watir would > really be easy to use. It's perfectly possible to > reference ANY UI > elements in ANY Mac application via 'chunk > expressions' in AppleScript > but there's no way to use AppleScript to find elements > in a window > according to some search criteria much the same way that > the DOM let's > us call document.getElementsByTagName()... So we have to > waste a lot of > time analyzing every dang page of a large website trying to > figure out > which stupid trick to use to identify a simple link or > table cell. ) > > Ben > > > -----Original Message----- > From: safariwatir-general-bounces at rubyforge.org > [mailto:safariwatir-general-bounces at rubyforge.org] On > Behalf Of D P > Sent: Thursday, October 09, 2008 10:10 AM > To: safariwatir-general at rubyforge.org > Subject: [SafariWatir-general] how can I click a link ? > > Hi all, > > How can I do link click from safariwatir? > I'm using safariwatir version 0.2.8 but I can't see > a method like > $object.link().click. > > Thanks for helping! > > > > > > _______________________________________________ > SafariWatir-general mailing list > SafariWatir-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/safariwatir-general From dave at obtiva.com Fri Oct 10 06:27:41 2008 From: dave at obtiva.com (Dave Hoover) Date: Fri, 10 Oct 2008 05:27:41 -0500 Subject: [SafariWatir-general] how can I click a link ? In-Reply-To: <549743.64162.qm@web57704.mail.re3.yahoo.com> References: <549743.64162.qm@web57704.mail.re3.yahoo.com> Message-ID: <11c8704e0810100327n6a76b61er1dd66ffafd795c52@mail.gmail.com> Del, Thanks for speaking up. It turns out you discovered a bug in SafariWatir 0.2.8. Please install the gem I just released (0.2.9) and let us know if that fixes your link clicking issues. Best, Dave Hoover //obtiva: Agility applied. Software delivered. On Fri, Oct 10, 2008 at 3:32 AM, D P wrote: > Hi Ben, > > Thanks for the answer. I found the libs and tried to execute the safariwatir_script.rb but I have this: > -------------------------------------------- > /Library/Ruby/Gems/1.8/gems/safariwatir-0.2.8/./safariwatir.rb:101:in `send': undefined method `operate_by_on_link' for # (NoMethodError) > from /Library/Ruby/Gems/1.8/gems/safariwatir-0.2.8/./safariwatir.rb:101:in `operate' > from /Library/Ruby/Gems/1.8/gems/safariwatir-0.2.8/./safariwatir/scripter.rb:160:in `highlight' > from /Library/Ruby/Gems/1.8/gems/safariwatir-0.2.8/./safariwatir.rb:204:in `click' > from /Users/del/NetBeansProjects/test-denver/lib/main.rb:10:in `google_to_prag' > from /Users/del/NetBeansProjects/test-denver/lib/main.rb:121 > ---------------------------------------------- > > Sorry but I'm very new to watir and I really don't know where is the problem. I tried with Safari 3.x and Safari 4.x developement edition without success. I'm running on Leopard 10.5.5 on Intel. > > I try to test safariwatir and watir, I would like to replace my web tests currently running from WinRunner. > > Thanks for helping, > Del > > > > > --- On Thu, 10/9/08, Tremblay, Benjamin P. (Ben) wrote: > >> From: Tremblay, Benjamin P. (Ben) >> Subject: RE: [SafariWatir-general] how can I click a link ? >> To: del_dr at yahoo.com, safariwatir-general at rubyforge.org >> Date: Thursday, October 9, 2008, 6:45 PM >> DP, >> >> It's there. You've got to crack open the gem and >> look at the source. See >> Mr. Hoover's functional test, safariwatir_script.rb and >> there are >> several examples of locating links and clicking them. >> >> The static method link() returns a reference to a link. >> Links are almost always identified by their readable text. >> >> From the script: >> >> safari = Watir::Safari.new >> >> def safari.google_to_prag >> goto("http://google.com") >> text_field(:name, "q").set("pickaxe") >> button(:name, "btnG").click >> link(:text, "Programming Ruby, 2nd Ed.").click >> link(:url, >> "http://www.pragmaticprogrammer.com/titles/ruby/code/index.html").click >> link(:text, "Catalog").click >> link(:text, "All Books").click >> link(:text, /Agile Retrospectives/).click >> puts "FAILURE prag" unless >> contains_text("Dave Hoover") >> End >> >> ( The great weakness of these types of tools is no binding >> between >> unique id's in html and unique id's in >> AppleScript... So we have to use >> all sorts of stupid tricks to locate things like links >> (HREFs) that >> normally never have a name or id attribute in HTML... If we >> just all >> started to use the id attribute for every HTML element, >> Watir would >> really be easy to use. It's perfectly possible to >> reference ANY UI >> elements in ANY Mac application via 'chunk >> expressions' in AppleScript >> but there's no way to use AppleScript to find elements >> in a window >> according to some search criteria much the same way that >> the DOM let's >> us call document.getElementsByTagName()... So we have to >> waste a lot of >> time analyzing every dang page of a large website trying to >> figure out >> which stupid trick to use to identify a simple link or >> table cell. ) >> >> Ben >> >> >> -----Original Message----- >> From: safariwatir-general-bounces at rubyforge.org >> [mailto:safariwatir-general-bounces at rubyforge.org] On >> Behalf Of D P >> Sent: Thursday, October 09, 2008 10:10 AM >> To: safariwatir-general at rubyforge.org >> Subject: [SafariWatir-general] how can I click a link ? >> >> Hi all, >> >> How can I do link click from safariwatir? >> I'm using safariwatir version 0.2.8 but I can't see >> a method like >> $object.link().click. >> >> Thanks for helping! >> >> >> >> >> >> _______________________________________________ >> SafariWatir-general mailing list >> SafariWatir-general at rubyforge.org >> http://rubyforge.org/mailman/listinfo/safariwatir-general > > > > _______________________________________________ > SafariWatir-general mailing list > SafariWatir-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/safariwatir-general From del_dr at yahoo.com Fri Oct 10 07:30:34 2008 From: del_dr at yahoo.com (D P) Date: Fri, 10 Oct 2008 04:30:34 -0700 (PDT) Subject: [SafariWatir-general] how can I click a link ? In-Reply-To: <11c8704e0810100327n6a76b61er1dd66ffafd795c52@mail.gmail.com> Message-ID: <869504.47147.qm@web57705.mail.re3.yahoo.com> Dave, Thanks a lot!!! It works!! Best Regards, Del --- On Fri, 10/10/08, Dave Hoover wrote: > From: Dave Hoover > Subject: Re: [SafariWatir-general] how can I click a link ? > To: del_dr at yahoo.com > Cc: safariwatir-general at rubyforge.org, "Tremblay, Benjamin P. (Ben)" > Date: Friday, October 10, 2008, 12:27 PM > Del, > > Thanks for speaking up. It turns out you discovered a bug > in SafariWatir 0.2.8. > > Please install the gem I just released (0.2.9) and let us > know if that > fixes your link clicking issues. > > Best, > > Dave Hoover > //obtiva: Agility applied. Software delivered. > > > > On Fri, Oct 10, 2008 at 3:32 AM, D P > wrote: > > Hi Ben, > > > > Thanks for the answer. I found the libs and tried to > execute the safariwatir_script.rb but I have this: > > -------------------------------------------- > > > /Library/Ruby/Gems/1.8/gems/safariwatir-0.2.8/./safariwatir.rb:101:in > `send': undefined method `operate_by_on_link' for > # (NoMethodError) > > from > /Library/Ruby/Gems/1.8/gems/safariwatir-0.2.8/./safariwatir.rb:101:in > `operate' > > from > /Library/Ruby/Gems/1.8/gems/safariwatir-0.2.8/./safariwatir/scripter.rb:160:in > `highlight' > > from > /Library/Ruby/Gems/1.8/gems/safariwatir-0.2.8/./safariwatir.rb:204:in > `click' > > from > /Users/del/NetBeansProjects/test-denver/lib/main.rb:10:in > `google_to_prag' > > from > /Users/del/NetBeansProjects/test-denver/lib/main.rb:121 > > ---------------------------------------------- > > > > Sorry but I'm very new to watir and I really > don't know where is the problem. I tried with Safari 3.x > and Safari 4.x developement edition without success. I'm > running on Leopard 10.5.5 on Intel. > > > > I try to test safariwatir and watir, I would like to > replace my web tests currently running from WinRunner. > > > > Thanks for helping, > > Del > > > > > > > > > > --- On Thu, 10/9/08, Tremblay, Benjamin P. (Ben) > wrote: > > > >> From: Tremblay, Benjamin P. (Ben) > > >> Subject: RE: [SafariWatir-general] how can I click > a link ? > >> To: del_dr at yahoo.com, > safariwatir-general at rubyforge.org > >> Date: Thursday, October 9, 2008, 6:45 PM > >> DP, > >> > >> It's there. You've got to crack open the > gem and > >> look at the source. See > >> Mr. Hoover's functional test, > safariwatir_script.rb and > >> there are > >> several examples of locating links and clicking > them. > >> > >> The static method link() returns a reference to a > link. > >> Links are almost always identified by their > readable text. > >> > >> From the script: > >> > >> safari = Watir::Safari.new > >> > >> def safari.google_to_prag > >> goto("http://google.com") > >> text_field(:name, > "q").set("pickaxe") > >> button(:name, "btnG").click > >> link(:text, "Programming Ruby, 2nd > Ed.").click > >> link(:url, > >> > "http://www.pragmaticprogrammer.com/titles/ruby/code/index.html").click > >> link(:text, "Catalog").click > >> link(:text, "All Books").click > >> link(:text, /Agile Retrospectives/).click > >> puts "FAILURE prag" unless > >> contains_text("Dave Hoover") > >> End > >> > >> ( The great weakness of these types of tools is no > binding > >> between > >> unique id's in html and unique id's in > >> AppleScript... So we have to use > >> all sorts of stupid tricks to locate things like > links > >> (HREFs) that > >> normally never have a name or id attribute in > HTML... If we > >> just all > >> started to use the id attribute for every HTML > element, > >> Watir would > >> really be easy to use. It's perfectly possible > to > >> reference ANY UI > >> elements in ANY Mac application via 'chunk > >> expressions' in AppleScript > >> but there's no way to use AppleScript to find > elements > >> in a window > >> according to some search criteria much the same > way that > >> the DOM let's > >> us call document.getElementsByTagName()... So we > have to > >> waste a lot of > >> time analyzing every dang page of a large website > trying to > >> figure out > >> which stupid trick to use to identify a simple > link or > >> table cell. ) > >> > >> Ben > >> > >> > >> -----Original Message----- > >> From: safariwatir-general-bounces at rubyforge.org > >> [mailto:safariwatir-general-bounces at rubyforge.org] > On > >> Behalf Of D P > >> Sent: Thursday, October 09, 2008 10:10 AM > >> To: safariwatir-general at rubyforge.org > >> Subject: [SafariWatir-general] how can I click a > link ? > >> > >> Hi all, > >> > >> How can I do link click from safariwatir? > >> I'm using safariwatir version 0.2.8 but I > can't see > >> a method like > >> $object.link().click. > >> > >> Thanks for helping! > >> > >> > >> > >> > >> > >> _______________________________________________ > >> SafariWatir-general mailing list > >> SafariWatir-general at rubyforge.org > >> > http://rubyforge.org/mailman/listinfo/safariwatir-general > > > > > > > > _______________________________________________ > > SafariWatir-general mailing list > > SafariWatir-general at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/safariwatir-general From antony_cyriac at hotmail.com Fri Oct 10 11:45:53 2008 From: antony_cyriac at hotmail.com (antony cyriac) Date: Fri, 10 Oct 2008 08:45:53 -0700 Subject: [SafariWatir-general] select_list not working Message-ID: Hi, I am using safaraiwatir 0.2.9. I have two problems First, i cannot get the values from the select_list. Also, iam not able to select any values. The code : $browser.select_list(:name, "prod_0").select("Black") didn't complain about anything, it just executed the line and went to the next line without selecting the value. Also, it is complaining that getAllContents() method is not yet implemented. My second problem is, my website has all 'image buttons' and how can we click on them. I don't see an 'image' class implemented. Any help would be appreciated.
 
_________________________________________________________________ Stay up to date on your PC, the Web, and your mobile phone with Windows Live. http://clk.atdmt.com/MRT/go/msnnkwxp1020093185mrt/direct/01/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From antony_cyriac at hotmail.com Wed Oct 15 13:15:35 2008 From: antony_cyriac at hotmail.com (antony cyriac) Date: Wed, 15 Oct 2008 10:15:35 -0700 Subject: [SafariWatir-general] select_list not working Message-ID: This is regarding my original question about select_list. I was able to work with other select_lists. So i think it is the underlying code which is causing problem. The select_list which i am not able to select is as follows: And one of the select_list i am able to select is coded like this; I couldn't find any difference here, except the fact that the non-working select_list has a option_value="". Did anybody encounter such a problem? From: antony_cyriac at hotmail.comTo: safariwatir-general at rubyforge.orgSubject: select_list not workingDate: Fri, 10 Oct 2008 08:45:53 -0700 Hi, I am using safaraiwatir 0.2.9. I have two problems First, i cannot get the values from the select_list. Also, iam not able to select any values. The code : $browser.select_list(:name, "prod_0").select("Black") didn't complain about anything, it just executed the line and went to the next line without selecting the value. Also, it is complaining that getAllContents() method is not yet implemented. My second problem is, my website has all 'image buttons' and how can we click on them. I don't see an 'image' class implemented. Any help would be appreciated.
 
Stay up to date on your PC, the Web, and your mobile phone with Windows Live. See Now _________________________________________________________________ Get more out of the Web. Learn 10 hidden secrets of Windows Live. http://windowslive.com/connect/post/jamiethomson.spaces.live.com-Blog-cns!550F681DAD532637!5295.entry?ocid=TXT_TAGLM_WL_domore_092008 -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.hoover at gmail.com Wed Oct 15 22:54:42 2008 From: dave.hoover at gmail.com (Dave Hoover) Date: Wed, 15 Oct 2008 21:54:42 -0500 Subject: [SafariWatir-general] select_list not working In-Reply-To: References: Message-ID: <11c8704e0810151954w3317eaedy111dddd27a75a3f4@mail.gmail.com> Antony, I pasted your select list markup into an empty HTML file. I then launched irb and ran... require 'rubygems' require 'safariwatir' $browser = Watir::Safari.new I then loaded the HTML file in the browser (Safari 3.1.2) and ran... $browser.select_list(:name, "prod_0").select("Black") ...and it worked for me. Have you tried removing everything in the document other than the select element? If not, can you provide us with the whole document? Best, Dave Hoover //obtiva: Agility applied. Software delivered. On Wed, Oct 15, 2008 at 12:15 PM, antony cyriac wrote: > > > This is regarding my original question about select_list. > > I was able to work with other select_lists. So i think it is the underlying > code which is causing problem. > > The select_list which i am not able to select is as follows: > > > > And one of the select_list i am able to select is coded like this; > > > > I couldn't find any difference here, except the fact that the non-working > select_list has a option_value="". > > > Did anybody encounter such a problem? > > > > > > ________________________________ > From: antony_cyriac at hotmail.com > To: safariwatir-general at rubyforge.org > Subject: select_list not working > Date: Fri, 10 Oct 2008 08:45:53 -0700 > > > > Hi, > > > I am using safaraiwatir 0.2.9. > > I have two problems > First, i cannot get the values from the select_list. Also, iam not able > to select any values. > The code : > $browser.select_list(:name, "prod_0").select("Black") > didn't complain about anything, it just executed the line and went to the > next line without selecting the value. > Also, it is complaining that getAllContents() method is not yet > implemented. > > My second problem is, my website has all 'image buttons' and how can we > click on them. I don't see an 'image' class implemented. > > Any help would be appreciated. > > >
 
> > > ________________________________ > Stay up to date on your PC, the Web, and your mobile phone with Windows > Live. See Now > > ________________________________ > Get more out of the Web. Learn 10 hidden secrets of Windows Live. Learn Now > _______________________________________________ > SafariWatir-general mailing list > SafariWatir-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/safariwatir-general > From antony_cyriac at hotmail.com Thu Oct 16 11:24:44 2008 From: antony_cyriac at hotmail.com (antony cyriac) Date: Thu, 16 Oct 2008 08:24:44 -0700 Subject: [SafariWatir-general] How to handle security popup? Message-ID: Hi, I have a security popup (the one which shows up when you go to https) in my workflow. How do you guys handle it? I don't have an idea to handle that. I just want to click on the 'Continue' button to dismiss it and move on. I tried $browser.alert.ok. But i think this one is not an alert. Any ideas? _________________________________________________________________ Get more out of the Web. Learn 10 hidden secrets of Windows Live. http://windowslive.com/connect/post/jamiethomson.spaces.live.com-Blog-cns!550F681DAD532637!5295.entry?ocid=TXT_TAGLM_WL_domore_092008 -------------- next part -------------- An HTML attachment was scrubbed... URL: From antony_cyriac at hotmail.com Thu Oct 16 11:34:41 2008 From: antony_cyriac at hotmail.com (antony cyriac) Date: Thu, 16 Oct 2008 08:34:41 -0700 Subject: [SafariWatir-general] How to handle security popup? Message-ID: Hi, I have a security popup (the one which shows up when you go to https) in my workflow. How do you guys handle it? I don't have an idea to handle that. I just want to click on the 'Continue' button to dismiss it and move on. I tried $browser.alert.ok. But i think this one is not an alert. Any ideas? _________________________________________________________________ See how Windows connects the people, information, and fun that are part of your life. http://clk.atdmt.com/MRT/go/msnnkwxp1020093175mrt/direct/01/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave at obtiva.com Fri Oct 17 10:09:37 2008 From: dave at obtiva.com (Dave Hoover) Date: Fri, 17 Oct 2008 09:09:37 -0500 Subject: [SafariWatir-general] select_list not working In-Reply-To: References: Message-ID: <11c8704e0810170709k390c737ev2db7636c5411d4d0@mail.gmail.com> FYI: I just released SafariWatir 0.3.0, which fixes Antony's issue. Dave Hoover //obtiva: Agility applied. Software delivered. On Wed, Oct 15, 2008 at 12:15 PM, antony cyriac wrote: > > > This is regarding my original question about select_list. > > I was able to work with other select_lists. So i think it is the underlying > code which is causing problem. > > The select_list which i am not able to select is as follows: > > > > And one of the select_list i am able to select is coded like this; > > > > I couldn't find any difference here, except the fact that the non-working > select_list has a option_value="". > > > Did anybody encounter such a problem? > > > > > > ________________________________ > From: antony_cyriac at hotmail.com > To: safariwatir-general at rubyforge.org > Subject: select_list not working > Date: Fri, 10 Oct 2008 08:45:53 -0700 > > > > Hi, > > > I am using safaraiwatir 0.2.9. > > I have two problems > First, i cannot get the values from the select_list. Also, iam not able > to select any values. > The code : > $browser.select_list(:name, "prod_0").select("Black") > didn't complain about anything, it just executed the line and went to the > next line without selecting the value. > Also, it is complaining that getAllContents() method is not yet > implemented. > > My second problem is, my website has all 'image buttons' and how can we > click on them. I don't see an 'image' class implemented. > > Any help would be appreciated. > > >
 
> > > ________________________________ > Stay up to date on your PC, the Web, and your mobile phone with Windows > Live. See Now > > ________________________________ > Get more out of the Web. Learn 10 hidden secrets of Windows Live. Learn Now > _______________________________________________ > SafariWatir-general mailing list > SafariWatir-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/safariwatir-general > From hari.visolve at gmail.com Mon Oct 20 02:16:00 2008 From: hari.visolve at gmail.com (Hari Nattamai) Date: Mon, 20 Oct 2008 11:46:00 +0530 Subject: [SafariWatir-general] SafariWatir Image click support Message-ID: Is there a way to use the click event on a image object? With the below script, require 'rubygems' require 'safariwatir' browser = Watir::Safari.new img = browser.image(:src, "http://images.apple.com/support/_images/hero_safari.jpg") I tried using img .click img.fire_event("onclick") but both did not workout. Any suggestions? thanks, Hari. From dave at obtiva.com Wed Oct 22 20:03:18 2008 From: dave at obtiva.com (Dave Hoover) Date: Wed, 22 Oct 2008 19:03:18 -0500 Subject: [SafariWatir-general] How to handle security popup? In-Reply-To: References: Message-ID: <11c8704e0810221703v2def1f34ge0e78850316fc1eb@mail.gmail.com> Antony, I've just release support for SSL security dialogs. Grab the 0.3.1 gem. b = Watir::Safari.new b.security_warning.continue or b.security_warning.cancel Let me know if that works for you. Best, Dave Hoover //obtiva: Agility applied. Software delivered. On Thu, Oct 16, 2008 at 10:24 AM, antony cyriac wrote: > > Hi, > > I have a security popup (the one which shows up when you go to https) in > my workflow. How do you guys handle it? > I don't have an idea to handle that. I just want to click on the 'Continue' > button to dismiss it and move on. > > I tried $browser.alert.ok. But i think this one is not an alert. > > > Any ideas? From nolane at gmail.com Thu Oct 23 20:07:13 2008 From: nolane at gmail.com (nolan evans) Date: Thu, 23 Oct 2008 17:07:13 -0700 Subject: [SafariWatir-general] .value not supported on text_field in safari watir? Message-ID: <51cd30de0810231707h35efce80uf18a9079aa77aed@mail.gmail.com> Hello, I tried to get the value of a text_field and got: undefined method `value' for #. I believe this is the syntax used in iewatir/firewatir? Cheers, -Nolan -------------- next part -------------- An HTML attachment was scrubbed... URL: From charley.baker at gmail.com Fri Oct 24 11:27:53 2008 From: charley.baker at gmail.com (Charley Baker) Date: Fri, 24 Oct 2008 09:27:53 -0600 Subject: [SafariWatir-general] .value not supported on text_field in safari watir? In-Reply-To: <51cd30de0810231707h35efce80uf18a9079aa77aed@mail.gmail.com> References: <51cd30de0810231707h35efce80uf18a9079aa77aed@mail.gmail.com> Message-ID: It looks like SafariWatir uses getContents for the text_field object. Simple enough to fix. -Charley On Thu, Oct 23, 2008 at 6:07 PM, nolan evans wrote: > Hello, > > I tried to get the value of a text_field and got: undefined method `value' > for #. I believe this is the syntax > used in iewatir/firewatir? > > Cheers, > -Nolan > > _______________________________________________ > SafariWatir-general mailing list > SafariWatir-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/safariwatir-general > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave at obtiva.com Tue Oct 28 08:28:37 2008 From: dave at obtiva.com (Dave Hoover) Date: Tue, 28 Oct 2008 07:28:37 -0500 Subject: [SafariWatir-general] SafariWatir Image click support In-Reply-To: References: Message-ID: <11c8704e0810280528o440c8916q36ddbda6ace28b5d@mail.gmail.com> Grab the latest gem. I've made image elements clickable. Best, --Dave On Mon, Oct 20, 2008 at 1:16 AM, Hari Nattamai wrote: > Is there a way to use the click event on a image object? > > > onclick="alert('Apple')" > > > With the below script, > > require 'rubygems' > require 'safariwatir' > browser = Watir::Safari.new > img = browser.image(:src, > "http://images.apple.com/support/_images/hero_safari.jpg") > > I tried using > img .click > img.fire_event("onclick") > > but both did not workout. Any suggestions? > > thanks, Hari. > _______________________________________________ > SafariWatir-general mailing list > SafariWatir-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/safariwatir-general From nolane at gmail.com Thu Oct 30 16:41:26 2008 From: nolane at gmail.com (nolan evans) Date: Thu, 30 Oct 2008 13:41:26 -0700 Subject: [SafariWatir-general] Opening safari more then once raises an exception? Message-ID: <51cd30de0810301341l5eaa787fy33e979ec7548aaa4@mail.gmail.com> require 'safariwatir' describe "Home" do it "should foo" do watir = Watir::Safari.new watir.goto("http://www.google.com") watir.close end it "should also foo" do watir = Watir::Safari.new watir.goto("http://www.google.com") watir.close end end Raises: 1) Appscript::CommandError in 'Home should also foo' CommandError OSERROR: -609 MESSAGE: Connection is invalid. COMMAND: app("/Applications/Safari.app").activate() /Library/Ruby/Gems/1.8/gems/rb-appscript-0.5.1/lib/appscript.rb:530:in `_send_command' /Library/Ruby/Gems/1.8/gems/rb-appscript-0.5.1/lib/appscript.rb:642:in `method_missing' /Library/Ruby/Gems/1.8/gems/safariwatir-0.2.9/./safariwatir/scripter.rb:104:in `ensure_window_ready' /Library/Ruby/Gems/1.8/gems/safariwatir-0.2.9/./safariwatir.rb:473:in `initialize' ./spec/functional/google/home_spec.rb:14:in `new' ./spec/functional/google/home_spec.rb:14: -------------- next part -------------- An HTML attachment was scrubbed... URL: From hari.visolve at gmail.com Fri Oct 31 01:32:54 2008 From: hari.visolve at gmail.com (Hari Nattamai) Date: Fri, 31 Oct 2008 11:02:54 +0530 Subject: [SafariWatir-general] How to handle security popup? In-Reply-To: <11c8704e0810221703v2def1f34ge0e78850316fc1eb@mail.gmail.com> References: <11c8704e0810221703v2def1f34ge0e78850316fc1eb@mail.gmail.com> Message-ID: Dave, I tried using the the security feature; but it fails for me. My sample script is browser = Watir::Safari.new browser.security_warning.continue browser.goto("https://ecc.fedora.redhat.com/") This https site contains an invalid certificate. The above script did not override the warning. Any help is greatly appreciated. thanks, Hari. On Thu, Oct 23, 2008 at 5:33 AM, Dave Hoover wrote: > Antony, > > I've just release support for SSL security dialogs. Grab the 0.3.1 gem. > > b = Watir::Safari.new > b.security_warning.continue > > or > > b.security_warning.cancel > > Let me know if that works for you. > > Best, > > Dave Hoover > //obtiva: Agility applied. Software delivered. > > > On Thu, Oct 16, 2008 at 10:24 AM, antony cyriac > wrote: >> >> Hi, >> >> I have a security popup (the one which shows up when you go to https) in >> my workflow. How do you guys handle it? >> I don't have an idea to handle that. I just want to click on the 'Continue' >> button to dismiss it and move on. >> >> I tried $browser.alert.ok. But i think this one is not an alert. >> >> >> Any ideas? > _______________________________________________ > SafariWatir-general mailing list > SafariWatir-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/safariwatir-general > From dave at obtiva.com Fri Oct 31 07:56:37 2008 From: dave at obtiva.com (Dave Hoover) Date: Fri, 31 Oct 2008 06:56:37 -0500 Subject: [SafariWatir-general] How to handle security popup? In-Reply-To: References: <11c8704e0810221703v2def1f34ge0e78850316fc1eb@mail.gmail.com> Message-ID: <11c8704e0810310456r562c95c9oe6fbcbc52b7b3eab@mail.gmail.com> Hari, Doh! I realize now that I wasn't testing it with a realistic scenario. Thanks for providing the sample code, it really helps. If you grab the latest gem (0.3.3), you can now do this instead... browser = Watir::Safari.new browser.security_warning_at("https://ecc.fedora.redhat.com/").continue Best, Dave Hoover //obtiva: Agility applied. Software delivered. On Fri, Oct 31, 2008 at 12:32 AM, Hari Nattamai wrote: > Dave, I tried using the the security feature; but it fails for me. > > My sample script is > > browser = Watir::Safari.new > browser.security_warning.continue > browser.goto("https://ecc.fedora.redhat.com/") > > This https site contains an invalid certificate. The above script did > not override the warning. > > Any help is greatly appreciated. > > thanks, Hari. > > On Thu, Oct 23, 2008 at 5:33 AM, Dave Hoover wrote: >> Antony, >> >> I've just release support for SSL security dialogs. Grab the 0.3.1 gem. >> >> b = Watir::Safari.new >> b.security_warning.continue >> >> or >> >> b.security_warning.cancel >> >> Let me know if that works for you. >> >> Best, >> >> Dave Hoover >> //obtiva: Agility applied. Software delivered. >> >> >> On Thu, Oct 16, 2008 at 10:24 AM, antony cyriac >> wrote: >>> >>> Hi, >>> >>> I have a security popup (the one which shows up when you go to https) in >>> my workflow. How do you guys handle it? >>> I don't have an idea to handle that. I just want to click on the 'Continue' >>> button to dismiss it and move on. >>> >>> I tried $browser.alert.ok. But i think this one is not an alert. >>> >>> >>> Any ideas? >> _______________________________________________ >> SafariWatir-general mailing list >> SafariWatir-general at rubyforge.org >> http://rubyforge.org/mailman/listinfo/safariwatir-general >>