From welkin_inc at hotmail.com Fri Jan 2 10:36:03 2009 From: welkin_inc at hotmail.com (Andrew McFarlane) Date: Fri, 2 Jan 2009 08:36:03 -0700 Subject: [Wtr-development] FireWatir: container: js_eval: exception and javascript bugs? In-Reply-To: References: Message-ID: Angrez, I wrote a tiny bit of code (see below) that *should* have illustrated the problem, but FireWatir cannot find the link that I am attempting to click at the end of the code, although it does exist--FireWatir believes that it is on the previous ("searching") page. I even tried to do: browser.show_links(), and it said that there were 0 links on the page. I am a bit baffled. require 'rubygems' gem 'watir', '>=1.6.2' require 'watir' Watir::Browser.default = 'firefox' browser = Watir::Browser.new # Go to the home page browser.goto('http://www.frontierairlines.com') # Enter the origin city code. elem = browser.text_field(:id, 'flying_from') elem.value = 'DEN' elem.fire_event("onfocus") elem.fire_event('onKeyDown') sleep 0.2 elem.fire_event('onKeyUp') sleep 5 # Select the origin city description. browser.li(:class, 'ui-autocomplete-even ui-autocomplete-over').click # Enter the destination city code. elem = browser.text_field(:id, 'flying_to') elem.value = 'LAX' elem.fire_event("onfocus") elem.fire_event('onKeyDown') sleep 0.2 elem.fire_event('onKeyUp') sleep 5 # Select the destination city description. browser.li(:class, 'ui-autocomplete-even ui-autocomplete-over').click # Enter the departure date. date_leave = (Time.now() + 1*24*60*60).strftime('%m/%d/%Y') browser.text_field(:id, 'leaving').value = date_leave # Enter the return date. date_return = (Time.now() + 2*24*60*60).strftime('%m/%d/%Y') browser.text_field(:id, 'returning').value = date_return # Press the 'FIND FLIGHTS' image. browser.image(:id, 'findFlightsButton').click sleep 20 browser.link(:text, 'Start Over').click Andrew Date: Wed, 31 Dec 2008 12:02:20 +0530 From: angrez at gmail.com To: wtr-development at rubyforge.org Subject: Re: [Wtr-development] FireWatir: container: js_eval: exception and javascript bugs? Andrew, Can you post the code here which you were trying? - Angrez On Tue, Dec 30, 2008 at 8:42 PM, Bret Pettichord wrote: I'd like to have a better understanding of the cause of the problem first. Bret On Tue, Dec 30, 2008 at 12:25 AM, Angrez Singh wrote: Hi Bret, I didn't had a look into this but I was thinking if we try to locate element before every call, rather than using the old context. Like instead of storing the element name in some variable which gets obsolete when context changes we can try to find the element during each call. XPath works pretty fast in Firefox. I know there will be some speed issues but we will not be having much issues like this. Thoughts? - Angrez On Mon, Dec 29, 2008 at 9:42 PM, Bret Pettichord wrote: Clearly the code you fixed is incorrect. There is also clearly a larger problem. I don't have time right now to research this further. Can some one else help Andrew? Bret On Wed, Dec 24, 2008 at 2:46 PM, Andrew McFarlane wrote: I was running a test using Firewatir 1.6.2. I clicked on a link which navigates the user back to the home page. After clicking the link, I looked to make sure that the Close button on an "are-you-sure?" dialog was visible or not by making the call browser.link(:xpath, close_button_xpath).visible? Depending on which page of the application that one is on, pressing the home page link may either navigate directly to the home page or first display the "are-you-sure?" dialog before proceeding to the home page. When making the above method call, I saw the exception: c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/container.rb:497:in `raise': exception class/object expected (TypeError) This refers to the raise() method call shown in the container.rb code: if md = /^(\w+)Error:(.*)$/.match(value) eval "class JS#{md[1]}Error\nend" raise (eval "JS#{md[1]}Error"), md[2] end I changed the above container.rb code to: if md = /^(\w+)Error:(.*)$/.match(value) klass = Class.new Exception Object.const_set "JS#{md[1]}Error", klass raise klass, md[2] end so that I could see the exception get thrown. I then re-ran my test and saw the exception: c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/container.rb:498:in `js_eval': element_xpath_17 is not defined (Reference) from c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/mozilla_base_element.rb:1005:in `visible?' At this point, I'm stuck. I'm guessing that the javascript context got reset when navigating to a different page. Thanks for your help. Andrew Send e-mail faster without improving your typing skills. Get your Hotmail? account. _______________________________________________ Wtr-development mailing list Wtr-development at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-development -- Bret Pettichord GTalk: bpettichord at gmail.com CTO, WatirCraft LLC, http://www.watircraft.com Lead Developer, Watir, http://wtr.rubyforge.org Blog (Essays), http://www.io.com/~wazmo/blog MiniBlog (Links), http://feeds.feedburner.com/bretshotlist _______________________________________________ Wtr-development mailing list Wtr-development at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-development _______________________________________________ Wtr-development mailing list Wtr-development at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-development -- Bret Pettichord GTalk: bpettichord at gmail.com CTO, WatirCraft LLC, http://www.watircraft.com Lead Developer, Watir, http://wtr.rubyforge.org Blog (Essays), http://www.io.com/~wazmo/blog MiniBlog (Links), http://feeds.feedburner.com/bretshotlist _______________________________________________ Wtr-development mailing list Wtr-development at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-development _________________________________________________________________ It?s the same Hotmail?. If by ?same? you mean up to 70% faster. http://windowslive.com/online/hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_broad1_122008 -------------- next part -------------- An HTML attachment was scrubbed... URL: From angrez at gmail.com Mon Jan 5 00:32:21 2009 From: angrez at gmail.com (Angrez Singh) Date: Mon, 5 Jan 2009 11:02:21 +0530 Subject: [Wtr-development] FireWatir: container: js_eval: exception and javascript bugs? In-Reply-To: References: Message-ID: Andrew, Thanks for the code will look into the problem. - Angrez On Fri, Jan 2, 2009 at 9:06 PM, Andrew McFarlane wrote: > Angrez, > > I wrote a tiny bit of code (see below) that *should* have illustrated the > problem, but FireWatir cannot find the link that I am attempting to click at > the end of the code, although it does exist--FireWatir believes that it is > on the previous ("searching") page. I even tried to do: > browser.show_links(), and it said that there were 0 links on the page. I am > a bit baffled. > > require 'rubygems' > gem 'watir', '>=1.6.2' > require 'watir' > > > Watir::Browser.default = 'firefox' > browser = Watir::Browser.new > > # Go to the home page > browser.goto('http://www.frontierairlines.com') > > # Enter the origin city code. > elem = browser.text_field(:id, 'flying_from') > elem.value = 'DEN' > elem.fire_event("onfocus") > elem.fire_event('onKeyDown') > sleep 0.2 > elem.fire_event('onKeyUp') > sleep 5 > > # Select the origin city description. > browser.li(:class, 'ui-autocomplete-even ui-autocomplete-over').click > > # Enter the destination city code. > elem = browser.text_field(:id, 'flying_to') > elem.value = 'LAX' > elem.fire_event("onfocus") > elem.fire_event('onKeyDown') > sleep 0.2 > elem.fire_event('onKeyUp') > sleep 5 > > # Select the destination city description. > browser.li(:class, 'ui-autocomplete-even ui-autocomplete-over').click > > # Enter the departure date. > > date_leave = (Time.now() + 1*24*60*60).strftime('%m/%d/%Y') > browser.text_field(:id, 'leaving').value = date_leave > > # Enter the return date. > date_return = (Time.now() + 2*24*60*60).strftime('%m/%d/%Y') > browser.text_field(:id, 'returning').value = date_return > > # Press the 'FIND FLIGHTS' image. > browser.image(:id, 'findFlightsButton').click > > sleep 20 > > browser.link(:text, 'Start Over').click > > > Andrew > > > ------------------------------ > Date: Wed, 31 Dec 2008 12:02:20 +0530 > From: angrez at gmail.com > To: wtr-development at rubyforge.org > Subject: Re: [Wtr-development] FireWatir: container: js_eval: exception and > javascript bugs? > > > Andrew, > > Can you post the code here which you were trying? > > - Angrez > > On Tue, Dec 30, 2008 at 8:42 PM, Bret Pettichord wrote: > > I'd like to have a better understanding of the cause of the problem first. > > Bret > > > On Tue, Dec 30, 2008 at 12:25 AM, Angrez Singh wrote: > > Hi Bret, > > I didn't had a look into this but I was thinking if we try to locate > element before every call, rather than using the old context. Like instead > of storing the element name in some variable which gets obsolete when > context changes we can try to find the element during each call. XPath works > pretty fast in Firefox. I know there will be some speed issues but we will > not be having much issues like this. > > Thoughts? > > - Angrez > > > On Mon, Dec 29, 2008 at 9:42 PM, Bret Pettichord wrote: > > Clearly the code you fixed is incorrect. > > There is also clearly a larger problem. I don't have time right now to > research this further. Can some one else help Andrew? > > Bret > > On Wed, Dec 24, 2008 at 2:46 PM, Andrew McFarlane > wrote: > > I was running a test using Firewatir 1.6.2. > > I clicked on a link which navigates the user back to the home page. After > clicking the link, I looked to make sure that the Close button on an > "are-you-sure?" dialog was visible or not by making the call > browser.link(:xpath, close_button_xpath).visible? > > Depending on which page of the application that one is on, pressing the > home page link may either navigate directly to the home page or first > display the "are-you-sure?" dialog before proceeding to the home page. > > When making the above method call, I saw the exception: > > c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/container.rb:497:in > `raise': exception class/object expected (TypeError) > > This refers to the raise() method call shown in the container.rb code: > > if md = /^(\w+)Error:(.*)$/.match(value) > eval "class JS#{md[1]}Error\nend" > raise (eval "JS#{md[1]}Error"), md[2] > end > > I changed the above container.rb code to: > > if md = /^(\w+)Error:(.*)$/.match(value) > klass = Class.new Exception > Object.const_set "JS#{md[1]}Error", klass > raise klass, md[2] > end > > so that I could see the exception get thrown. > > I then re-ran my test and saw the exception: > > c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/container.rb:498:in > `js_eval': element_xpath_17 is not defined (Reference) > from > c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/mozilla_base_element.rb:1005:in > `visible?' > > At this point, I'm stuck. I'm guessing that the javascript context got > reset when navigating to a different page. > > Thanks for your help. > > Andrew > > > ------------------------------ > Send e-mail faster without improving your typing skills. Get your Hotmail(R) > account. > > _______________________________________________ > Wtr-development mailing list > Wtr-development at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-development > > > > > -- > Bret Pettichord > GTalk: bpettichord at gmail.com > CTO, WatirCraft LLC, http://www.watircraft.com > Lead Developer, Watir, http://wtr.rubyforge.org > Blog (Essays), http://www.io.com/~wazmo/blog > MiniBlog (Links), http://feeds.feedburner.com/bretshotlist > > _______________________________________________ > Wtr-development mailing list > Wtr-development at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-development > > > > _______________________________________________ > Wtr-development mailing list > Wtr-development at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-development > > > > > -- > Bret Pettichord > GTalk: bpettichord at gmail.com > CTO, WatirCraft LLC, http://www.watircraft.com > Lead Developer, Watir, http://wtr.rubyforge.org > Blog (Essays), http://www.io.com/~wazmo/blog > MiniBlog (Links), http://feeds.feedburner.com/bretshotlist > > _______________________________________________ > Wtr-development mailing list > Wtr-development at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-development > > > > ------------------------------ > It's the same Hotmail(R). If by "same" you mean up to 70% faster. Get your > account now. > > _______________________________________________ > Wtr-development mailing list > Wtr-development at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-development > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bret at pettichord.com Tue Jan 6 12:09:33 2009 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 6 Jan 2009 11:09:33 -0600 Subject: [Wtr-development] Could you test my test app? Message-ID: I've been developing several substansive examples of frameworks using Watir. They use the "depot" test application (rails). Today, i think i got the instructions nailed for how to set up and run the test app. I was wondering if someone could take a look at this and let me know whether they can use the following instructions to run the app: http://github.com/bret/framework-examples/tree/master/depot After you do this, you should see the page of the store. Bonus points for being able checkout (we'd seen a few problems at this point, which should now be fixed). (You can also try to run the various test suites at this point, but that's another matter.) Bret -- Bret Pettichord GTalk: bpettichord at gmail.com CTO, WatirCraft LLC, http://www.watircraft.com Lead Developer, Watir, http://wtr.rubyforge.org Blog (Essays), http://www.io.com/~wazmo/blog MiniBlog (Links), http://feeds.feedburner.com/bretshotlist -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.j.collins.02 at cantab.net Tue Jan 6 18:49:32 2009 From: a.j.collins.02 at cantab.net (Alex Collins) Date: Tue, 6 Jan 2009 23:49:32 +0000 Subject: [Wtr-development] Could you test my test app? In-Reply-To: References: Message-ID: Bret, Super stuff. I've followed your instructions. As I already have later versions of rails, I had a few issues. I have forked your tree and made a few minor updates to boot.rb, environment.rb and set the store application to be the default controller so that you can access it at http://localhost/ http://github.com/ajcollins/framework-examples/tree/master Checkout works for me. No luck with running tests: - Cannot install rasta gem (not found right now) - Currently heavily tied to Watir::IE which doesn't work on my mac! Other than that, looks like it will be very helpful! Hope this helps, Alex On 6 Jan 2009, at 17:09, Bret Pettichord wrote: > I've been developing several substansive examples of frameworks > using Watir. They use the "depot" test application (rails). > > Today, i think i got the instructions nailed for how to set up and > run the test app. > > I was wondering if someone could take a look at this and let me know > whether they can use the following instructions to run the app: > > http://github.com/bret/framework-examples/tree/master/depot > > After you do this, you should see the page of the store. Bonus > points for being able checkout (we'd seen a few problems at this > point, which should now be fixed). > > (You can also try to run the various test suites at this point, but > that's another matter.) > > Bret > > -- > Bret Pettichord > GTalk: bpettichord at gmail.com > CTO, WatirCraft LLC, http://www.watircraft.com > Lead Developer, Watir, http://wtr.rubyforge.org > Blog (Essays), http://www.io.com/~wazmo/blog > MiniBlog (Links), http://feeds.feedburner.com/bretshotlist > _______________________________________________ > Wtr-development mailing list > Wtr-development at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-development -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.j.collins.02 at gmail.com Tue Jan 6 18:50:22 2009 From: a.j.collins.02 at gmail.com (Alex Collins) Date: Tue, 6 Jan 2009 23:50:22 +0000 Subject: [Wtr-development] Could you test my test app? In-Reply-To: References: Message-ID: <37E7FDB3-205C-4618-9690-6FDD7FC72D2D@gmail.com> Bret, Super stuff. I've followed your instructions. As I already have later versions of rails, I had a few issues. I have forked your tree and made a few minor updates to boot.rb, environment.rb and set the store application to be the default controller so that you can access it at http://localhost/ http://github.com/ajcollins/framework-examples/tree/master Checkout works for me. No luck with running tests: - Cannot install rasta gem (not found right now) - Currently heavily tied to Watir::IE which doesn't work on my mac! Other than that, looks like it will be very helpful! Hope this helps, Alex On 6 Jan 2009, at 17:09, Bret Pettichord wrote: > I've been developing several substansive examples of frameworks > using Watir. They use the "depot" test application (rails). > > Today, i think i got the instructions nailed for how to set up and > run the test app. > > I was wondering if someone could take a look at this and let me know > whether they can use the following instructions to run the app: > > http://github.com/bret/framework-examples/tree/master/depot > > After you do this, you should see the page of the store. Bonus > points for being able checkout (we'd seen a few problems at this > point, which should now be fixed). > > (You can also try to run the various test suites at this point, but > that's another matter.) > > Bret > > -- > Bret Pettichord > GTalk: bpettichord at gmail.com > CTO, WatirCraft LLC, http://www.watircraft.com > Lead Developer, Watir, http://wtr.rubyforge.org > Blog (Essays), http://www.io.com/~wazmo/blog > MiniBlog (Links), http://feeds.feedburner.com/bretshotlist > _______________________________________________ > Wtr-development mailing list > Wtr-development at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-development -------------- next part -------------- An HTML attachment was scrubbed... URL: From bret at pettichord.com Wed Jan 7 17:25:06 2009 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 7 Jan 2009 16:25:06 -0600 Subject: [Wtr-development] Could you test my test app? In-Reply-To: References: Message-ID: Thanks. I will take a look at your fork. Sounds like you did some useful things. Rasta, right now, is based on Excel and OLE so therefore Windows-only. Next version will be based on Roo and work on Mac. I actually have a mac as well, but still do most of my test development on my windows vm. With time, i hope to move more of it to my Mac. Thanks for taking a look at this. Bret On Tue, Jan 6, 2009 at 5:49 PM, Alex Collins wrote: > Bret, > Super stuff. > > I've followed your instructions. As I already have later versions of rails, > I had a few issues. > > I have forked your tree and made a few minor updates to boot.rb, > environment.rb and set the store application to be the default controller so > that you can access it at http://localhost/ > > http://github.com/ajcollins/framework-examples/tree/master > > Checkout works for me. > > No luck with running tests: > - Cannot install rasta gem (not found right now) > - Currently heavily tied to Watir::IE which doesn't work on my mac! > > Other than that, looks like it will be very helpful! > > Hope this helps, > > Alex > > On 6 Jan 2009, at 17:09, Bret Pettichord wrote: > > I've been developing several substansive examples of frameworks using > Watir. They use the "depot" test application (rails). > > Today, i think i got the instructions nailed for how to set up and run the > test app. > > I was wondering if someone could take a look at this and let me know > whether they can use the following instructions to run the app: > > http://github.com/bret/framework-examples/tree/master/depot > > After you do this, you should see the page of the store. Bonus points for > being able checkout (we'd seen a few problems at this point, which should > now be fixed). > > (You can also try to run the various test suites at this point, but that's > another matter.) > > Bret > > -- > Bret Pettichord > GTalk: bpettichord at gmail.com > CTO, WatirCraft LLC, http://www.watircraft.com > Lead Developer, Watir, http://wtr.rubyforge.org > Blog (Essays), http://www.io.com/~wazmo/blog > MiniBlog (Links), http://feeds.feedburner.com/bretshotlist > _______________________________________________ > Wtr-development mailing list > Wtr-development at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-development > > > > _______________________________________________ > Wtr-development mailing list > Wtr-development at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-development > -- Bret Pettichord GTalk: bpettichord at gmail.com CTO, WatirCraft LLC, http://www.watircraft.com Lead Developer, Watir, http://wtr.rubyforge.org Blog (Essays), http://www.io.com/~wazmo/blog MiniBlog (Links), http://feeds.feedburner.com/bretshotlist -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.j.collins.02 at cantab.net Wed Jan 7 19:56:41 2009 From: a.j.collins.02 at cantab.net (Alex Collins) Date: Thu, 8 Jan 2009 00:56:41 +0000 Subject: [Wtr-development] Could you test my test app? In-Reply-To: References: Message-ID: <816944BE-75C3-4D2A-A49C-585655FF9992@cantab.net> No problem - more than happy to. Thank you for writing WATIR - it's made my life easier and is enjoyable to use. Let me know if I can be of any further assistance with this. Alex On 7 Jan 2009, at 22:25, Bret Pettichord wrote: > Thanks. I will take a look at your fork. Sounds like you did some > useful things. > > Rasta, right now, is based on Excel and OLE so therefore Windows- > only. Next version will be based on Roo and work on Mac. > > I actually have a mac as well, but still do most of my test > development on my windows vm. With time, i hope to move more of it > to my Mac. > > Thanks for taking a look at this. > > Bret > > > > On Tue, Jan 6, 2009 at 5:49 PM, Alex Collins > wrote: > Bret, > > Super stuff. > > I've followed your instructions. As I already have later versions of > rails, I had a few issues. > > I have forked your tree and made a few minor updates to boot.rb, > environment.rb and set the store application to be the default > controller so that you can access it at http://localhost/ > > http://github.com/ajcollins/framework-examples/tree/master > > Checkout works for me. > > No luck with running tests: > - Cannot install rasta gem (not found right now) > - Currently heavily tied to Watir::IE which doesn't work on my mac! > > Other than that, looks like it will be very helpful! > > Hope this helps, > > Alex > > On 6 Jan 2009, at 17:09, Bret Pettichord wrote: > >> I've been developing several substansive examples of frameworks >> using Watir. They use the "depot" test application (rails). >> >> Today, i think i got the instructions nailed for how to set up and >> run the test app. >> >> I was wondering if someone could take a look at this and let me >> know whether they can use the following instructions to run the app: >> >> http://github.com/bret/framework-examples/tree/master/depot >> >> After you do this, you should see the page of the store. Bonus >> points for being able checkout (we'd seen a few problems at this >> point, which should now be fixed). >> >> (You can also try to run the various test suites at this point, but >> that's another matter.) >> >> Bret >> >> -- >> Bret Pettichord >> GTalk: bpettichord at gmail.com >> CTO, WatirCraft LLC, http://www.watircraft.com >> Lead Developer, Watir, http://wtr.rubyforge.org >> Blog (Essays), http://www.io.com/~wazmo/blog >> MiniBlog (Links), http://feeds.feedburner.com/bretshotlist >> _______________________________________________ >> Wtr-development mailing list >> Wtr-development at rubyforge.org >> http://rubyforge.org/mailman/listinfo/wtr-development > > > _______________________________________________ > Wtr-development mailing list > Wtr-development at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-development > > > > -- > Bret Pettichord > GTalk: bpettichord at gmail.com > CTO, WatirCraft LLC, http://www.watircraft.com > Lead Developer, Watir, http://wtr.rubyforge.org > Blog (Essays), http://www.io.com/~wazmo/blog > MiniBlog (Links), http://feeds.feedburner.com/bretshotlist > _______________________________________________ > Wtr-development mailing list > Wtr-development at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-development -------------- next part -------------- An HTML attachment was scrubbed... URL: From anukul.singhal at gmail.com Wed Jan 7 20:24:52 2009 From: anukul.singhal at gmail.com (anukul singhal) Date: Wed, 7 Jan 2009 20:24:52 -0500 Subject: [Wtr-development] Reg. Clicking a Javascript popup using AutoIt Message-ID: Hi Angrez, I am providing you the html source and the screenshot of the web page (both attached) having a javascript dialog (with title as [JavaScript Application]), I tried using AutoIt's ControlClick method but it does not work, even the WinExists does not work. Can you please look into it? html source: Sample

Dialog (Click on the button):

Thanks, Anukul -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: js.JPG Type: image/jpeg Size: 15722 bytes Desc: not available URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: js_html.txt URL: From angrez at gmail.com Thu Jan 8 00:09:46 2009 From: angrez at gmail.com (Angrez Singh) Date: Thu, 8 Jan 2009 10:39:46 +0530 Subject: [Wtr-development] Reg. Clicking a Javascript popup using AutoIt In-Reply-To: References: Message-ID: Are you using it with watir or firewatir? - Angrez On Thu, Jan 8, 2009 at 6:54 AM, anukul singhal wrote: > Hi Angrez, > > I am providing you the html source and the screenshot of the web page (both > attached) having a javascript dialog (with title as [JavaScript > Application]), I tried using AutoIt's ControlClick method but it does not > work, even the WinExists does not work. Can you please look into it? > > html source: > > > > Sample > > > >

> Dialog (Click on the button):
>
> >

> > > > Thanks, > > Anukul > > > _______________________________________________ > Wtr-development mailing list > Wtr-development at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-development > -------------- next part -------------- An HTML attachment was scrubbed... URL: From anukul.singhal at gmail.com Thu Jan 8 05:20:37 2009 From: anukul.singhal at gmail.com (anukul singhal) Date: Thu, 8 Jan 2009 05:20:37 -0500 Subject: [Wtr-development] Reg. Clicking a Javascript popup using AutoIt In-Reply-To: References: Message-ID: Hi Angrez, This is with reference to firewatir. Thanks, Anukul On Thu, Jan 8, 2009 at 12:09 AM, Angrez Singh wrote: > Are you using it with watir or firewatir? > > - Angrez > > On Thu, Jan 8, 2009 at 6:54 AM, anukul singhal > wrote: > >> Hi Angrez, >> >> I am providing you the html source and the screenshot of the web page >> (both attached) having a javascript dialog (with title as [JavaScript >> Application]), I tried using AutoIt's ControlClick method but it does not >> work, even the WinExists does not work. Can you please look into it? >> >> html source: >> >> >> >> Sample >> >> >> >>

>> Dialog (Click on the button):
>>
>> >>

>> >> >> >> Thanks, >> >> Anukul >> >> >> _______________________________________________ >> Wtr-development mailing list >> Wtr-development at rubyforge.org >> http://rubyforge.org/mailman/listinfo/wtr-development >> > > > _______________________________________________ > Wtr-development mailing list > Wtr-development at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-development > -------------- next part -------------- An HTML attachment was scrubbed... URL: From anukul.singhal at gmail.com Thu Jan 8 06:13:39 2009 From: anukul.singhal at gmail.com (anukul singhal) Date: Thu, 8 Jan 2009 06:13:39 -0500 Subject: [Wtr-development] Finding the title of a JavaScript dialog in firewatir Message-ID: Hi Angrez, Is there any way that we can find the title of a javascript dialog using firewatir. I know that for finding the title of a browser, we can just do browser.title, but wanted to know if there is any similar way to find the title of a Javascript dialog? Thanks, Anukul -------------- next part -------------- An HTML attachment was scrubbed... URL: From angrez at gmail.com Thu Jan 8 06:40:09 2009 From: angrez at gmail.com (Angrez Singh) Date: Thu, 8 Jan 2009 17:10:09 +0530 Subject: [Wtr-development] Finding the title of a JavaScript dialog in firewatir In-Reply-To: References: Message-ID: All javascript alerts have same title which depends upon browser & its version. - Angrez On Thu, Jan 8, 2009 at 4:43 PM, anukul singhal wrote: > Hi Angrez, > > Is there any way that we can find the title of a javascript dialog using > firewatir. I know that for finding the title of a browser, we can just do > browser.title, but wanted to know if there is any similar way to find the > title of a Javascript dialog? > > Thanks, > Anukul > > _______________________________________________ > Wtr-development mailing list > Wtr-development at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-development > -------------- next part -------------- An HTML attachment was scrubbed... URL: From angrez at gmail.com Thu Jan 8 06:53:14 2009 From: angrez at gmail.com (Angrez Singh) Date: Thu, 8 Jan 2009 17:23:14 +0530 Subject: [Wtr-development] Reg. Clicking a Javascript popup using AutoIt In-Reply-To: References: Message-ID: You can have a look at the unit test cases for the same. Following code works for me . Firefox 3.0.5, firewatir 1.6.2 require 'firewatir' include FireWatir $br = FireWatir::Firefox.new $br.goto("file:///e:/extras/firewatir/jscript.html") btn = $br.button(:id, 'sbmtbtn') puts btn # Put the text of the javascript dialog as third argument, if text doesn't matches then you'll see the pop up else # ok button will be pressed. $br.startClicker("ok", 1, '', "Do you want to login to Infinity Inc. home page?") btn.click sleep 2 $br.close() - Angrez On Thu, Jan 8, 2009 at 3:50 PM, anukul singhal wrote: > Hi Angrez, > > This is with reference to firewatir. > > Thanks, > Anukul > > On Thu, Jan 8, 2009 at 12:09 AM, Angrez Singh wrote: > >> Are you using it with watir or firewatir? >> >> - Angrez >> >> On Thu, Jan 8, 2009 at 6:54 AM, anukul singhal < >> anukul.singhal at gmail.com> wrote: >> >>> Hi Angrez, >>> >>> I am providing you the html source and the screenshot of the web page >>> (both attached) having a javascript dialog (with title as [JavaScript >>> Application]), I tried using AutoIt's ControlClick method but it does not >>> work, even the WinExists does not work. Can you please look into it? >>> >>> html source: >>> >>> >>> >>> Sample >>> >>> >>> >>>

>>> Dialog (Click on the button):
>>>
>>> >>>

>>> >>> >>> >>> Thanks, >>> >>> Anukul >>> >>> >>> _______________________________________________ >>> Wtr-development mailing list >>> Wtr-development at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/wtr-development >>> >> >> >> _______________________________________________ >> Wtr-development mailing list >> Wtr-development at rubyforge.org >> http://rubyforge.org/mailman/listinfo/wtr-development >> > > > _______________________________________________ > Wtr-development mailing list > Wtr-development at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-development > -------------- next part -------------- An HTML attachment was scrubbed... URL: From anukul.singhal at gmail.com Thu Jan 8 11:51:50 2009 From: anukul.singhal at gmail.com (anukul singhal) Date: Thu, 8 Jan 2009 11:51:50 -0500 Subject: [Wtr-development] Reg. Clicking a Javascript popup using AutoIt In-Reply-To: References: Message-ID: Hi Angrez, Thanks for the reply, but am aware of the way to click a java script dialog using startClicker. My aim is to: 1. Click on the button (which pops up the dialog) 2. Then, after clicking on the button, need to click on the dialog using the ControlClick method of AutoIt. I am trying this code but it does not work: require 'firewatir' ff = FireWatir::Firefox.new ff.goto("file:///e:/extras/firewatir/jscript.html") ff.button(:id, "sbmtbtn").click sleep 3.0 cc = ff.ContolClick("[JavaScript Application]", "", "OK") puts cc It works until the popup comes but does not do anything on the dialog unless manually intervened. Can you help? Thanks, Anukul On Thu, Jan 8, 2009 at 6:53 AM, Angrez Singh wrote: > You can have a look at the unit test cases for the same. Following code > works for me . Firefox 3.0.5, firewatir 1.6.2 > > require 'firewatir' > include FireWatir > $br = FireWatir::Firefox.new > $br.goto("file:///e:/extras/firewatir/jscript.html") > btn = $br.button(:id, 'sbmtbtn') > puts btn > > # Put the text of the javascript dialog as third argument, if text doesn't > matches then you'll see the pop up else > # ok button will be pressed. > $br.startClicker("ok", 1, '', "Do you want to login to Infinity Inc. home > page?") > > btn.click > sleep 2 > $br.close() > > - Angrez > > > On Thu, Jan 8, 2009 at 3:50 PM, anukul singhal wrote: > >> Hi Angrez, >> >> This is with reference to firewatir. >> >> Thanks, >> Anukul >> >> On Thu, Jan 8, 2009 at 12:09 AM, Angrez Singh wrote: >> >>> Are you using it with watir or firewatir? >>> >>> - Angrez >>> >>> On Thu, Jan 8, 2009 at 6:54 AM, anukul singhal < >>> anukul.singhal at gmail.com> wrote: >>> >>>> Hi Angrez, >>>> >>>> I am providing you the html source and the screenshot of the web page >>>> (both attached) having a javascript dialog (with title as [JavaScript >>>> Application]), I tried using AutoIt's ControlClick method but it does not >>>> work, even the WinExists does not work. Can you please look into it? >>>> >>>> html source: >>>> >>>> >>>> >>>> Sample >>>> >>>> >>>> >>>>

>>>> Dialog (Click on the button):
>>>>
>>>> >>>>

>>>> >>>> >>>> >>>> Thanks, >>>> >>>> Anukul >>>> >>>> >>>> _______________________________________________ >>>> Wtr-development mailing list >>>> Wtr-development at rubyforge.org >>>> http://rubyforge.org/mailman/listinfo/wtr-development >>>> >>> >>> >>> _______________________________________________ >>> Wtr-development mailing list >>> Wtr-development at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/wtr-development >>> >> >> >> _______________________________________________ >> Wtr-development mailing list >> Wtr-development at rubyforge.org >> http://rubyforge.org/mailman/listinfo/wtr-development >> > > > _______________________________________________ > Wtr-development mailing list > Wtr-development at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-development > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bret at pettichord.com Thu Jan 8 12:23:48 2009 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 8 Jan 2009 11:23:48 -0600 Subject: [Wtr-development] Could you test my test app? In-Reply-To: References: Message-ID: Thanks for your changes; i pushed them into my master. They are also simplifying my life. I had been using a "special" version of ruby that only had the old versions of rails to run this. Now that is no longer necessary. I also like the change to the route. The rest of you should know that using git+github greatly simplified getting Alex's contributions into the main code base. Moments like this really make me see the benefits of git over svn. Bret On Tue, Jan 6, 2009 at 5:49 PM, Alex Collins wrote: > Bret, > Super stuff. > > I've followed your instructions. As I already have later versions of rails, > I had a few issues. > > I have forked your tree and made a few minor updates to boot.rb, > environment.rb and set the store application to be the default controller so > that you can access it at http://localhost/ > > http://github.com/ajcollins/framework-examples/tree/master > > Checkout works for me. > > No luck with running tests: > - Cannot install rasta gem (not found right now) > - Currently heavily tied to Watir::IE which doesn't work on my mac! > > Other than that, looks like it will be very helpful! > > Hope this helps, > > Alex > > On 6 Jan 2009, at 17:09, Bret Pettichord wrote: > > I've been developing several substansive examples of frameworks using > Watir. They use the "depot" test application (rails). > > Today, i think i got the instructions nailed for how to set up and run the > test app. > > I was wondering if someone could take a look at this and let me know > whether they can use the following instructions to run the app: > > http://github.com/bret/framework-examples/tree/master/depot > > After you do this, you should see the page of the store. Bonus points for > being able checkout (we'd seen a few problems at this point, which should > now be fixed). > > (You can also try to run the various test suites at this point, but that's > another matter.) > > Bret > > -- > Bret Pettichord > GTalk: bpettichord at gmail.com > CTO, WatirCraft LLC, http://www.watircraft.com > Lead Developer, Watir, http://wtr.rubyforge.org > Blog (Essays), http://www.io.com/~wazmo/blog > MiniBlog (Links), http://feeds.feedburner.com/bretshotlist > _______________________________________________ > Wtr-development mailing list > Wtr-development at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-development > > > > _______________________________________________ > Wtr-development mailing list > Wtr-development at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-development > -- Bret Pettichord GTalk: bpettichord at gmail.com CTO, WatirCraft LLC, http://www.watircraft.com Lead Developer, Watir, http://wtr.rubyforge.org Blog (Essays), http://www.io.com/~wazmo/blog MiniBlog (Links), http://feeds.feedburner.com/bretshotlist -------------- next part -------------- An HTML attachment was scrubbed... URL: From bernerbits at gmail.com Thu Jan 8 13:02:59 2009 From: bernerbits at gmail.com (Derek Berner) Date: Thu, 8 Jan 2009 12:02:59 -0600 Subject: [Wtr-development] Patch for winClicker.rb Message-ID: <677955230901081002h3e774704j4bb0bfe29f39b4ca@mail.gmail.com> In investigating why my clicker would randomly stop working in IE, I discovered that the DL callbacks were not getting freed properly, despite previous attempts to fix them. This patch extracts the DL functionality out into its own method and uses an "ensure" block to guarantee that the callbacks are freed, even if an exception occurs. I generated this patch using svn diff on rev. 1663 of the repository at https://svn.openqa.org/svn/watir/trunk. -------------- next part -------------- A non-text attachment was scrubbed... Name: clickerfix.patch Type: text/x-patch Size: 4209 bytes Desc: not available URL: From bret at pettichord.com Thu Jan 8 13:41:58 2009 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 8 Jan 2009 12:41:58 -0600 Subject: [Wtr-development] Could you test my test app? In-Reply-To: References: Message-ID: Alex, Why do you say In each test directory, run: rake -f where is replaced with the name of the Rakefile eg Rakefile, rakefile.rb etc I don't have to do this. I just do "rake" and it finds whatever rakefile there is. I'm happy to standardize the types of rakefiles used -- is there a preference? I guess i like using rakefile.rb because that makes it easy for editors to know that it is ruby. But i haven't really seen this as a possible complication -- not yet. So i want to know if there is something we can do to make this simpler. Bret On Wed, Jan 7, 2009 at 4:25 PM, Bret Pettichord wrote: > Thanks. I will take a look at your fork. Sounds like you did some useful > things. > > Rasta, right now, is based on Excel and OLE so therefore Windows-only. Next > version will be based on Roo and work on Mac. > > I actually have a mac as well, but still do most of my test development on > my windows vm. With time, i hope to move more of it to my Mac. > > Thanks for taking a look at this. > > Bret > > > > > On Tue, Jan 6, 2009 at 5:49 PM, Alex Collins wrote: > >> Bret, >> Super stuff. >> >> I've followed your instructions. As I already have later versions of >> rails, I had a few issues. >> >> I have forked your tree and made a few minor updates to boot.rb, >> environment.rb and set the store application to be the default controller so >> that you can access it at http://localhost/ >> >> http://github.com/ajcollins/framework-examples/tree/master >> >> Checkout works for me. >> >> No luck with running tests: >> - Cannot install rasta gem (not found right now) >> - Currently heavily tied to Watir::IE which doesn't work on my mac! >> >> Other than that, looks like it will be very helpful! >> >> Hope this helps, >> >> Alex >> >> On 6 Jan 2009, at 17:09, Bret Pettichord wrote: >> >> I've been developing several substansive examples of frameworks using >> Watir. They use the "depot" test application (rails). >> >> Today, i think i got the instructions nailed for how to set up and run the >> test app. >> >> I was wondering if someone could take a look at this and let me know >> whether they can use the following instructions to run the app: >> >> http://github.com/bret/framework-examples/tree/master/depot >> >> After you do this, you should see the page of the store. Bonus points for >> being able checkout (we'd seen a few problems at this point, which should >> now be fixed). >> >> (You can also try to run the various test suites at this point, but that's >> another matter.) >> >> Bret >> >> -- >> Bret Pettichord >> GTalk: bpettichord at gmail.com >> CTO, WatirCraft LLC, http://www.watircraft.com >> Lead Developer, Watir, http://wtr.rubyforge.org >> Blog (Essays), http://www.io.com/~wazmo/blog >> MiniBlog (Links), http://feeds.feedburner.com/bretshotlist >> _______________________________________________ >> Wtr-development mailing list >> Wtr-development at rubyforge.org >> http://rubyforge.org/mailman/listinfo/wtr-development >> >> >> >> _______________________________________________ >> Wtr-development mailing list >> Wtr-development at rubyforge.org >> http://rubyforge.org/mailman/listinfo/wtr-development >> > > > > -- > Bret Pettichord > GTalk: bpettichord at gmail.com > CTO, WatirCraft LLC, http://www.watircraft.com > Lead Developer, Watir, http://wtr.rubyforge.org > Blog (Essays), http://www.io.com/~wazmo/blog > MiniBlog (Links), http://feeds.feedburner.com/bretshotlist > -- Bret Pettichord GTalk: bpettichord at gmail.com CTO, WatirCraft LLC, http://www.watircraft.com Lead Developer, Watir, http://wtr.rubyforge.org Blog (Essays), http://www.io.com/~wazmo/blog MiniBlog (Links), http://feeds.feedburner.com/bretshotlist -------------- next part -------------- An HTML attachment was scrubbed... URL: From charley.baker at gmail.com Thu Jan 8 15:31:42 2009 From: charley.baker at gmail.com (Charley Baker) Date: Thu, 8 Jan 2009 13:31:42 -0700 Subject: [Wtr-development] Patch for winClicker.rb In-Reply-To: <677955230901081002h3e774704j4bb0bfe29f39b4ca@mail.gmail.com> References: <677955230901081002h3e774704j4bb0bfe29f39b4ca@mail.gmail.com> Message-ID: I took a brief look at the patch, it seems reasonable. I'll take a closer look at it later, and likely add it to WinClicker. In general this area is an eyesore and unfortunately not well tested - there's one unit test for using it to close popups. :( Thanks for taking the time to work on a fix. Charley Baker blog: http://charleybakersblog.blogspot.com/ Project Manager, Watir, http://wtr.rubyforge.org QA Architect, Gap Inc Direct On Thu, Jan 8, 2009 at 11:02 AM, Derek Berner wrote: > In investigating why my clicker would randomly stop working in IE, I > discovered that the DL callbacks were not getting freed properly, > despite previous attempts to fix them. > > This patch extracts the DL functionality out into its own method and > uses an "ensure" block to guarantee that the callbacks are freed, even > if an exception occurs. > > I generated this patch using svn diff on rev. 1663 of the repository > at https://svn.openqa.org/svn/watir/trunk. > > _______________________________________________ > Wtr-development mailing list > Wtr-development at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-development > -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.j.collins.02 at cantab.net Thu Jan 8 16:41:28 2009 From: a.j.collins.02 at cantab.net (Alex Collins) Date: Thu, 8 Jan 2009 21:41:28 +0000 Subject: [Wtr-development] Could you test my test app? In-Reply-To: References: Message-ID: How jolly odd. It should be the case that rake looks for: rakefile, Rakefile, rakefile.rb, Rakefile.rb But for some reason it wasn't working for me at the time... so I added the switch and note as much for my benefit. It works as it ought to now. I think that change should probably be backed out given this information. I agree with your preference for rakefile.rb, but rails etc seem to go with Rakefile. Given rake's defaults, it is probably only worth worry about when having multiple examples together, purely for consistency. Alex On 8 Jan 2009, at 18:41, Bret Pettichord wrote: > Alex, > > Why do you say > > In each test directory, run: > rake -f > where is replaced with the name of the Rakefile eg > Rakefile, rakefile.rb etc > > I don't have to do this. I just do "rake" and it finds whatever > rakefile there is. > > I'm happy to standardize the types of rakefiles used -- is there a > preference? I guess i like using rakefile.rb because that makes it > easy for editors to know that it is ruby. > > But i haven't really seen this as a possible complication -- not > yet. So i want to know if there is something we can do to make this > simpler. > > Bret > > On Wed, Jan 7, 2009 at 4:25 PM, Bret Pettichord > wrote: > Thanks. I will take a look at your fork. Sounds like you did some > useful things. > > Rasta, right now, is based on Excel and OLE so therefore Windows- > only. Next version will be based on Roo and work on Mac. > > I actually have a mac as well, but still do most of my test > development on my windows vm. With time, i hope to move more of it > to my Mac. > > Thanks for taking a look at this. > > Bret > > > > > On Tue, Jan 6, 2009 at 5:49 PM, Alex Collins > wrote: > Bret, > > Super stuff. > > I've followed your instructions. As I already have later versions of > rails, I had a few issues. > > I have forked your tree and made a few minor updates to boot.rb, > environment.rb and set the store application to be the default > controller so that you can access it at http://localhost/ > > http://github.com/ajcollins/framework-examples/tree/master > > Checkout works for me. > > No luck with running tests: > - Cannot install rasta gem (not found right now) > - Currently heavily tied to Watir::IE which doesn't work on my mac! > > Other than that, looks like it will be very helpful! > > Hope this helps, > > Alex > > On 6 Jan 2009, at 17:09, Bret Pettichord wrote: > >> I've been developing several substansive examples of frameworks >> using Watir. They use the "depot" test application (rails). >> >> Today, i think i got the instructions nailed for how to set up and >> run the test app. >> >> I was wondering if someone could take a look at this and let me >> know whether they can use the following instructions to run the app: >> >> http://github.com/bret/framework-examples/tree/master/depot >> >> After you do this, you should see the page of the store. Bonus >> points for being able checkout (we'd seen a few problems at this >> point, which should now be fixed). >> >> (You can also try to run the various test suites at this point, but >> that's another matter.) >> >> Bret >> >> -- >> Bret Pettichord >> GTalk: bpettichord at gmail.com >> CTO, WatirCraft LLC, http://www.watircraft.com >> Lead Developer, Watir, http://wtr.rubyforge.org >> Blog (Essays), http://www.io.com/~wazmo/blog >> MiniBlog (Links), http://feeds.feedburner.com/bretshotlist >> _______________________________________________ >> Wtr-development mailing list >> Wtr-development at rubyforge.org >> http://rubyforge.org/mailman/listinfo/wtr-development > > > _______________________________________________ > Wtr-development mailing list > Wtr-development at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-development > > > > -- > Bret Pettichord > GTalk: bpettichord at gmail.com > CTO, WatirCraft LLC, http://www.watircraft.com > Lead Developer, Watir, http://wtr.rubyforge.org > Blog (Essays), http://www.io.com/~wazmo/blog > MiniBlog (Links), http://feeds.feedburner.com/bretshotlist > > > > -- > Bret Pettichord > GTalk: bpettichord at gmail.com > CTO, WatirCraft LLC, http://www.watircraft.com > Lead Developer, Watir, http://wtr.rubyforge.org > Blog (Essays), http://www.io.com/~wazmo/blog > MiniBlog (Links), http://feeds.feedburner.com/bretshotlist > _______________________________________________ > Wtr-development mailing list > Wtr-development at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-development -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.j.collins.02 at cantab.net Thu Jan 8 16:47:53 2009 From: a.j.collins.02 at cantab.net (Alex Collins) Date: Thu, 8 Jan 2009 21:47:53 +0000 Subject: [Wtr-development] Could you test my test app? In-Reply-To: References: Message-ID: <361F4C78-8A7A-48A1-8760-C271CEB88FD6@cantab.net> On 8 Jan 2009, at 17:23, Bret Pettichord wrote: > Thanks for your changes; i pushed them into my master. They are also > simplifying my life. I had been using a "special" version of ruby > that only had the old versions of rails to run this. Now that is no > longer necessary. I also like the change to the Excellent - it was a fun little activity. > The rest of you should know that using git+github greatly simplified > getting Alex's contributions into the main code base. Moments like > this really make me see the benefits of git over svn. It was incredibly easy - I was surprised - I didn't have a github account, but it didn't take very long at all. Most enjoyable compared to sending patches / asking for commit rights. Alex From angrez at gmail.com Fri Jan 9 02:30:48 2009 From: angrez at gmail.com (Angrez Singh) Date: Fri, 9 Jan 2009 13:00:48 +0530 Subject: [Wtr-development] Reg. Clicking a Javascript popup using AutoIt In-Reply-To: References: Message-ID: But question here is why you want to use AutoIt when it is there in Firewatir? - Angrez On Thu, Jan 8, 2009 at 10:21 PM, anukul singhal wrote: > Hi Angrez, > Thanks for the reply, but am aware of the way to click a java script dialog > using startClicker. My aim is to: > > 1. Click on the button (which pops up the dialog) > 2. Then, after clicking on the button, need to click on the dialog using > the ControlClick method of AutoIt. > > I am trying this code but it does not work: > > require 'firewatir' > > ff = FireWatir::Firefox.new > ff.goto("file:///e:/extras/firewatir/jscript.html") > ff.button(:id, "sbmtbtn").click > sleep 3.0 > cc = ff.ContolClick("[JavaScript Application]", "", "OK") > puts cc > > It works until the popup comes but does not do anything on the dialog > unless manually intervened. > > Can you help? > > Thanks, > Anukul > > > On Thu, Jan 8, 2009 at 6:53 AM, Angrez Singh wrote: > >> You can have a look at the unit test cases for the same. Following code >> works for me . Firefox 3.0.5, firewatir 1.6.2 >> >> require 'firewatir' >> include FireWatir >> $br = FireWatir::Firefox.new >> $br.goto("file:///e:/extras/firewatir/jscript.html") >> btn = $br.button(:id, 'sbmtbtn') >> puts btn >> >> # Put the text of the javascript dialog as third argument, if text doesn't >> matches then you'll see the pop up else >> # ok button will be pressed. >> $br.startClicker("ok", 1, '', "Do you want to login to Infinity Inc. home >> page?") >> >> btn.click >> sleep 2 >> $br.close() >> >> - Angrez >> >> >> On Thu, Jan 8, 2009 at 3:50 PM, anukul singhal wrote: >> >>> Hi Angrez, >>> >>> This is with reference to firewatir. >>> >>> Thanks, >>> Anukul >>> >>> On Thu, Jan 8, 2009 at 12:09 AM, Angrez Singh wrote: >>> >>>> Are you using it with watir or firewatir? >>>> >>>> - Angrez >>>> >>>> On Thu, Jan 8, 2009 at 6:54 AM, anukul singhal < >>>> anukul.singhal at gmail.com> wrote: >>>> >>>>> Hi Angrez, >>>>> >>>>> I am providing you the html source and the screenshot of the web page >>>>> (both attached) having a javascript dialog (with title as [JavaScript >>>>> Application]), I tried using AutoIt's ControlClick method but it does not >>>>> work, even the WinExists does not work. Can you please look into it? >>>>> >>>>> html source: >>>>> >>>>> >>>>> >>>>> Sample >>>>> >>>>> >>>>> >>>>>

>>>>> Dialog (Click on the button):
>>>>>
>>>>> >>>>>

>>>>> >>>>> >>>>> >>>>> Thanks, >>>>> >>>>> Anukul >>>>> >>>>> >>>>> _______________________________________________ >>>>> Wtr-development mailing list >>>>> Wtr-development at rubyforge.org >>>>> http://rubyforge.org/mailman/listinfo/wtr-development >>>>> >>>> >>>> >>>> _______________________________________________ >>>> Wtr-development mailing list >>>> Wtr-development at rubyforge.org >>>> http://rubyforge.org/mailman/listinfo/wtr-development >>>> >>> >>> >>> _______________________________________________ >>> Wtr-development mailing list >>> Wtr-development at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/wtr-development >>> >> >> >> _______________________________________________ >> Wtr-development mailing list >> Wtr-development at rubyforge.org >> http://rubyforge.org/mailman/listinfo/wtr-development >> > > > _______________________________________________ > Wtr-development mailing list > Wtr-development at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-development > -------------- next part -------------- An HTML attachment was scrubbed... URL: From saidesertrose2004 at gmail.com Fri Jan 9 08:18:14 2009 From: saidesertrose2004 at gmail.com (Sai Venkatakrishnan) Date: Fri, 9 Jan 2009 18:48:14 +0530 Subject: [Wtr-development] Announcing the release of ChromeWatir Message-ID: We are happy to announce that the first version of ChromeWatir has been released today. The API follows a similar convention to Watir and is for Google Chrome browser. Please visit the ChromeWatir Google code for more details http://code.google.com/p/chrome-watir We are in the process of making it better by stabilizing it as well adding more functionality. The first release is available as gem as well as source in the downloads page. Please have a try and give the feedback. Regards, Sai and Jijesh -------------- next part -------------- An HTML attachment was scrubbed... URL: From anukul.singhal at gmail.com Sat Jan 10 06:26:10 2009 From: anukul.singhal at gmail.com (anukul singhal) Date: Sat, 10 Jan 2009 06:26:10 -0500 Subject: [Wtr-development] Reg. Clicking a Javascript popup using AutoIt In-Reply-To: References: Message-ID: Hi Angrez, You are right with this question but consider this scenario: 1. Say we have a login portal. 2. User enters his username and password. 3. Clicks on submit button. 4. Then, a javascript pop-up appears (like company propietary pop-ups which come up when you login to their applications) 5. User clicks "OK" on that pop-up. 6. Arrives on the home page. Now, the user to automate this will follow the flow: 1. Writes the script to navigate to the url of the login page. 2. Sets the value in the text fields (user name and password) 3. Performs click operation on submit button 4. Confirms that a pop-up is showed up, if its does, clicks "OK", if it does not, the navigation will goto the home page. 5. On pressing "OK", navigation to home page takes place. Now, I have some questions for you, let me know which one makes sense: 1. When you want to automate the above scenario, wouldn't you go by the flow? (the sequence in which object appears) 2. How can we assume that a dialog appears even before we perform an operation on it? Would a normal automation engineer think in this way? In other tools like Watir, QTP, you are allowed to follow the sequence which makes it more intuitive. 3. I see that in your source code, you did try to involve "click_no_wait" method, which probably was the right approach, was there some limitation in jssh to not use it? 4. Are AutoItX3 functions supported by dialogs or not? Thanks, Anukul On Fri, Jan 9, 2009 at 2:30 AM, Angrez Singh wrote: > But question here is why you want to use AutoIt when it is there in > Firewatir? > > - Angrez > > > On Thu, Jan 8, 2009 at 10:21 PM, anukul singhal wrote: > >> Hi Angrez, >> Thanks for the reply, but am aware of the way to click a java script >> dialog using startClicker. My aim is to: >> >> 1. Click on the button (which pops up the dialog) >> 2. Then, after clicking on the button, need to click on the dialog using >> the ControlClick method of AutoIt. >> >> I am trying this code but it does not work: >> >> require 'firewatir' >> >> ff = FireWatir::Firefox.new >> ff.goto("file:///e:/extras/firewatir/jscript.html") >> ff.button(:id, "sbmtbtn").click >> sleep 3.0 >> cc = ff.ContolClick("[JavaScript Application]", "", "OK") >> puts cc >> >> It works until the popup comes but does not do anything on the dialog >> unless manually intervened. >> >> Can you help? >> >> Thanks, >> Anukul >> >> >> On Thu, Jan 8, 2009 at 6:53 AM, Angrez Singh wrote: >> >>> You can have a look at the unit test cases for the same. Following code >>> works for me . Firefox 3.0.5, firewatir 1.6.2 >>> >>> require 'firewatir' >>> include FireWatir >>> $br = FireWatir::Firefox.new >>> $br.goto("file:///e:/extras/firewatir/jscript.html") >>> btn = $br.button(:id, 'sbmtbtn') >>> puts btn >>> >>> # Put the text of the javascript dialog as third argument, if text >>> doesn't matches then you'll see the pop up else >>> # ok button will be pressed. >>> $br.startClicker("ok", 1, '', "Do you want to login to Infinity Inc. home >>> page?") >>> >>> btn.click >>> sleep 2 >>> $br.close() >>> >>> - Angrez >>> >>> >>> On Thu, Jan 8, 2009 at 3:50 PM, anukul singhal >> > wrote: >>> >>>> Hi Angrez, >>>> >>>> This is with reference to firewatir. >>>> >>>> Thanks, >>>> Anukul >>>> >>>> On Thu, Jan 8, 2009 at 12:09 AM, Angrez Singh wrote: >>>> >>>>> Are you using it with watir or firewatir? >>>>> >>>>> - Angrez >>>>> >>>>> On Thu, Jan 8, 2009 at 6:54 AM, anukul singhal < >>>>> anukul.singhal at gmail.com> wrote: >>>>> >>>>>> Hi Angrez, >>>>>> >>>>>> I am providing you the html source and the screenshot of the web page >>>>>> (both attached) having a javascript dialog (with title as [JavaScript >>>>>> Application]), I tried using AutoIt's ControlClick method but it does not >>>>>> work, even the WinExists does not work. Can you please look into it? >>>>>> >>>>>> html source: >>>>>> >>>>>> >>>>>> >>>>>> Sample >>>>>> >>>>>> >>>>>> >>>>>>

>>>>>> Dialog (Click on the button):
>>>>>>
>>>>>> >>>>>>

>>>>>> >>>>>> >>>>>> >>>>>> Thanks, >>>>>> >>>>>> Anukul >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Wtr-development mailing list >>>>>> Wtr-development at rubyforge.org >>>>>> http://rubyforge.org/mailman/listinfo/wtr-development >>>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Wtr-development mailing list >>>>> Wtr-development at rubyforge.org >>>>> http://rubyforge.org/mailman/listinfo/wtr-development >>>>> >>>> >>>> >>>> _______________________________________________ >>>> Wtr-development mailing list >>>> Wtr-development at rubyforge.org >>>> http://rubyforge.org/mailman/listinfo/wtr-development >>>> >>> >>> >>> _______________________________________________ >>> Wtr-development mailing list >>> Wtr-development at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/wtr-development >>> >> >> >> _______________________________________________ >> Wtr-development mailing list >> Wtr-development at rubyforge.org >> http://rubyforge.org/mailman/listinfo/wtr-development >> > > > _______________________________________________ > Wtr-development mailing list > Wtr-development at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-development > -------------- next part -------------- An HTML attachment was scrubbed... URL: From angrez at gmail.com Mon Jan 12 02:10:47 2009 From: angrez at gmail.com (Angrez Singh) Date: Mon, 12 Jan 2009 12:40:47 +0530 Subject: [Wtr-development] Reg. Clicking a Javascript popup using AutoIt In-Reply-To: References: Message-ID: Only reason for using "click_no_wait" is that when you click a button which invokes javascript JSSh waits for user input. So after clicking there is no way to invoke jssh as it is blocked. - Angrez On Sat, Jan 10, 2009 at 4:56 PM, anukul singhal wrote: > Hi Angrez, > > You are right with this question but consider this scenario: > > 1. Say we have a login portal. > 2. User enters his username and password. > 3. Clicks on submit button. > 4. Then, a javascript pop-up appears (like company propietary pop-ups which > come up when you login to their applications) > 5. User clicks "OK" on that pop-up. > 6. Arrives on the home page. > > Now, the user to automate this will follow the flow: > > 1. Writes the script to navigate to the url of the login page. > 2. Sets the value in the text fields (user name and password) > 3. Performs click operation on submit button > 4. Confirms that a pop-up is showed up, if its does, clicks "OK", if it > does not, the navigation will goto the home page. > 5. On pressing "OK", navigation to home page takes place. > > Now, I have some questions for you, let me know which one makes sense: > > 1. When you want to automate the above scenario, wouldn't you go by the > flow? (the sequence in which object appears) > 2. How can we assume that a dialog appears even before we perform an > operation on it? Would a normal automation engineer think in this way? In > other tools like Watir, QTP, you are allowed to follow the sequence which > makes it more intuitive. > 3. I see that in your source code, you did try to involve "click_no_wait" > method, which probably was the right approach, was there some limitation in > jssh to not use it? > 4. Are AutoItX3 functions supported by dialogs or not? > > Thanks, > Anukul > > On Fri, Jan 9, 2009 at 2:30 AM, Angrez Singh wrote: > >> But question here is why you want to use AutoIt when it is there in >> Firewatir? >> >> - Angrez >> >> >> On Thu, Jan 8, 2009 at 10:21 PM, anukul singhal > > wrote: >> >>> Hi Angrez, >>> Thanks for the reply, but am aware of the way to click a java script >>> dialog using startClicker. My aim is to: >>> >>> 1. Click on the button (which pops up the dialog) >>> 2. Then, after clicking on the button, need to click on the dialog using >>> the ControlClick method of AutoIt. >>> >>> I am trying this code but it does not work: >>> >>> require 'firewatir' >>> >>> ff = FireWatir::Firefox.new >>> ff.goto("file:///e:/extras/firewatir/jscript.html") >>> ff.button(:id, "sbmtbtn").click >>> sleep 3.0 >>> cc = ff.ContolClick("[JavaScript Application]", "", "OK") >>> puts cc >>> >>> It works until the popup comes but does not do anything on the dialog >>> unless manually intervened. >>> >>> Can you help? >>> >>> Thanks, >>> Anukul >>> >>> >>> On Thu, Jan 8, 2009 at 6:53 AM, Angrez Singh wrote: >>> >>>> You can have a look at the unit test cases for the same. Following code >>>> works for me . Firefox 3.0.5, firewatir 1.6.2 >>>> >>>> require 'firewatir' >>>> include FireWatir >>>> $br = FireWatir::Firefox.new >>>> $br.goto("file:///e:/extras/firewatir/jscript.html") >>>> btn = $br.button(:id, 'sbmtbtn') >>>> puts btn >>>> >>>> # Put the text of the javascript dialog as third argument, if text >>>> doesn't matches then you'll see the pop up else >>>> # ok button will be pressed. >>>> $br.startClicker("ok", 1, '', "Do you want to login to Infinity Inc. >>>> home page?") >>>> >>>> btn.click >>>> sleep 2 >>>> $br.close() >>>> >>>> - Angrez >>>> >>>> >>>> On Thu, Jan 8, 2009 at 3:50 PM, anukul singhal < >>>> anukul.singhal at gmail.com> wrote: >>>> >>>>> Hi Angrez, >>>>> >>>>> This is with reference to firewatir. >>>>> >>>>> Thanks, >>>>> Anukul >>>>> >>>>> On Thu, Jan 8, 2009 at 12:09 AM, Angrez Singh wrote: >>>>> >>>>>> Are you using it with watir or firewatir? >>>>>> >>>>>> - Angrez >>>>>> >>>>>> On Thu, Jan 8, 2009 at 6:54 AM, anukul singhal < >>>>>> anukul.singhal at gmail.com> wrote: >>>>>> >>>>>>> Hi Angrez, >>>>>>> >>>>>>> I am providing you the html source and the screenshot of the web page >>>>>>> (both attached) having a javascript dialog (with title as [JavaScript >>>>>>> Application]), I tried using AutoIt's ControlClick method but it does not >>>>>>> work, even the WinExists does not work. Can you please look into it? >>>>>>> >>>>>>> html source: >>>>>>> >>>>>>> >>>>>>> >>>>>>> Sample >>>>>>> >>>>>>> >>>>>>> >>>>>>>

>>>>>>> Dialog (Click on the button):
>>>>>>>
>>>>>>> >>>>>>>

>>>>>>> >>>>>>> >>>>>>> >>>>>>> Thanks, >>>>>>> >>>>>>> Anukul >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Wtr-development mailing list >>>>>>> Wtr-development at rubyforge.org >>>>>>> http://rubyforge.org/mailman/listinfo/wtr-development >>>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Wtr-development mailing list >>>>>> Wtr-development at rubyforge.org >>>>>> http://rubyforge.org/mailman/listinfo/wtr-development >>>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Wtr-development mailing list >>>>> Wtr-development at rubyforge.org >>>>> http://rubyforge.org/mailman/listinfo/wtr-development >>>>> >>>> >>>> >>>> _______________________________________________ >>>> Wtr-development mailing list >>>> Wtr-development at rubyforge.org >>>> http://rubyforge.org/mailman/listinfo/wtr-development >>>> >>> >>> >>> _______________________________________________ >>> Wtr-development mailing list >>> Wtr-development at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/wtr-development >>> >> >> >> _______________________________________________ >> Wtr-development mailing list >> Wtr-development at rubyforge.org >> http://rubyforge.org/mailman/listinfo/wtr-development >> > > > _______________________________________________ > Wtr-development mailing list > Wtr-development at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-development > -------------- next part -------------- An HTML attachment was scrubbed... URL: From anukul.singhal at gmail.com Mon Jan 12 13:55:47 2009 From: anukul.singhal at gmail.com (anukul singhal) Date: Mon, 12 Jan 2009 12:55:47 -0600 Subject: [Wtr-development] Reg. Clicking a Javascript popup using AutoIt In-Reply-To: References: Message-ID: Thanks Angrez, just clarify one more question, are AutoItX3 functions supported by javascript dialogs or not? On Mon, Jan 12, 2009 at 1:10 AM, Angrez Singh wrote: > Only reason for using "click_no_wait" is that when you click a button which > invokes javascript JSSh waits for user input. So after clicking there is no > way to invoke jssh as it is blocked. > > - Angrez > > > On Sat, Jan 10, 2009 at 4:56 PM, anukul singhal wrote: > >> Hi Angrez, >> >> You are right with this question but consider this scenario: >> >> 1. Say we have a login portal. >> 2. User enters his username and password. >> 3. Clicks on submit button. >> 4. Then, a javascript pop-up appears (like company propietary pop-ups >> which come up when you login to their applications) >> 5. User clicks "OK" on that pop-up. >> 6. Arrives on the home page. >> >> Now, the user to automate this will follow the flow: >> >> 1. Writes the script to navigate to the url of the login page. >> 2. Sets the value in the text fields (user name and password) >> 3. Performs click operation on submit button >> 4. Confirms that a pop-up is showed up, if its does, clicks "OK", if it >> does not, the navigation will goto the home page. >> 5. On pressing "OK", navigation to home page takes place. >> >> Now, I have some questions for you, let me know which one makes sense: >> >> 1. When you want to automate the above scenario, wouldn't you go by the >> flow? (the sequence in which object appears) >> 2. How can we assume that a dialog appears even before we perform an >> operation on it? Would a normal automation engineer think in this way? In >> other tools like Watir, QTP, you are allowed to follow the sequence which >> makes it more intuitive. >> 3. I see that in your source code, you did try to involve "click_no_wait" >> method, which probably was the right approach, was there some limitation in >> jssh to not use it? >> 4. Are AutoItX3 functions supported by dialogs or not? >> >> Thanks, >> Anukul >> >> On Fri, Jan 9, 2009 at 2:30 AM, Angrez Singh wrote: >> >>> But question here is why you want to use AutoIt when it is there in >>> Firewatir? >>> >>> - Angrez >>> >>> >>> On Thu, Jan 8, 2009 at 10:21 PM, anukul singhal < >>> anukul.singhal at gmail.com> wrote: >>> >>>> Hi Angrez, >>>> Thanks for the reply, but am aware of the way to click a java script >>>> dialog using startClicker. My aim is to: >>>> >>>> 1. Click on the button (which pops up the dialog) >>>> 2. Then, after clicking on the button, need to click on the dialog using >>>> the ControlClick method of AutoIt. >>>> >>>> I am trying this code but it does not work: >>>> >>>> require 'firewatir' >>>> >>>> ff = FireWatir::Firefox.new >>>> ff.goto("file:///e:/extras/firewatir/jscript.html") >>>> ff.button(:id, "sbmtbtn").click >>>> sleep 3.0 >>>> cc = ff.ContolClick("[JavaScript Application]", "", "OK") >>>> puts cc >>>> >>>> It works until the popup comes but does not do anything on the dialog >>>> unless manually intervened. >>>> >>>> Can you help? >>>> >>>> Thanks, >>>> Anukul >>>> >>>> >>>> On Thu, Jan 8, 2009 at 6:53 AM, Angrez Singh wrote: >>>> >>>>> You can have a look at the unit test cases for the same. Following code >>>>> works for me . Firefox 3.0.5, firewatir 1.6.2 >>>>> >>>>> require 'firewatir' >>>>> include FireWatir >>>>> $br = FireWatir::Firefox.new >>>>> $br.goto("file:///e:/extras/firewatir/jscript.html") >>>>> btn = $br.button(:id, 'sbmtbtn') >>>>> puts btn >>>>> >>>>> # Put the text of the javascript dialog as third argument, if text >>>>> doesn't matches then you'll see the pop up else >>>>> # ok button will be pressed. >>>>> $br.startClicker("ok", 1, '', "Do you want to login to Infinity Inc. >>>>> home page?") >>>>> >>>>> btn.click >>>>> sleep 2 >>>>> $br.close() >>>>> >>>>> - Angrez >>>>> >>>>> >>>>> On Thu, Jan 8, 2009 at 3:50 PM, anukul singhal < >>>>> anukul.singhal at gmail.com> wrote: >>>>> >>>>>> Hi Angrez, >>>>>> >>>>>> This is with reference to firewatir. >>>>>> >>>>>> Thanks, >>>>>> Anukul >>>>>> >>>>>> On Thu, Jan 8, 2009 at 12:09 AM, Angrez Singh wrote: >>>>>> >>>>>>> Are you using it with watir or firewatir? >>>>>>> >>>>>>> - Angrez >>>>>>> >>>>>>> On Thu, Jan 8, 2009 at 6:54 AM, anukul singhal < >>>>>>> anukul.singhal at gmail.com> wrote: >>>>>>> >>>>>>>> Hi Angrez, >>>>>>>> >>>>>>>> I am providing you the html source and the screenshot of the web >>>>>>>> page (both attached) having a javascript dialog (with title as [JavaScript >>>>>>>> Application]), I tried using AutoIt's ControlClick method but it does not >>>>>>>> work, even the WinExists does not work. Can you please look into it? >>>>>>>> >>>>>>>> html source: >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Sample >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>>

>>>>>>>> Dialog (Click on the button):
>>>>>>>>
>>>>>>>> >>>>>>>>

>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Thanks, >>>>>>>> >>>>>>>> Anukul >>>>>>>> >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Wtr-development mailing list >>>>>>>> Wtr-development at rubyforge.org >>>>>>>> http://rubyforge.org/mailman/listinfo/wtr-development >>>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Wtr-development mailing list >>>>>>> Wtr-development at rubyforge.org >>>>>>> http://rubyforge.org/mailman/listinfo/wtr-development >>>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Wtr-development mailing list >>>>>> Wtr-development at rubyforge.org >>>>>> http://rubyforge.org/mailman/listinfo/wtr-development >>>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Wtr-development mailing list >>>>> Wtr-development at rubyforge.org >>>>> http://rubyforge.org/mailman/listinfo/wtr-development >>>>> >>>> >>>> >>>> _______________________________________________ >>>> Wtr-development mailing list >>>> Wtr-development at rubyforge.org >>>> http://rubyforge.org/mailman/listinfo/wtr-development >>>> >>> >>> >>> _______________________________________________ >>> Wtr-development mailing list >>> Wtr-development at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/wtr-development >>> >> >> >> _______________________________________________ >> Wtr-development mailing list >> Wtr-development at rubyforge.org >> http://rubyforge.org/mailman/listinfo/wtr-development >> > > > _______________________________________________ > Wtr-development mailing list > Wtr-development at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-development > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bernerbits at gmail.com Tue Jan 13 16:17:47 2009 From: bernerbits at gmail.com (Derek Berner) Date: Tue, 13 Jan 2009 15:17:47 -0600 Subject: [Wtr-development] click_no_wait patch Message-ID: <677955230901131317i3144dabcxe56e51c3d719a526@mail.gmail.com> While working on some tests in our office, we realized click_no_wait wasn't working at all in Server 2008, due to how the call to "system" was getting interpreted by the command line. This patch adds a small tweak to the code that fixes the problem for our platform, and shouldn't cause any problems in other versions of Windows. -------------- next part -------------- A non-text attachment was scrubbed... Name: watir.patch Type: text/x-patch Size: 703 bytes Desc: not available URL: From bret at pettichord.com Tue Jan 13 18:21:58 2009 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 13 Jan 2009 17:21:58 -0600 Subject: [Wtr-development] click_no_wait patch In-Reply-To: <677955230901131317i3144dabcxe56e51c3d719a526@mail.gmail.com> References: <677955230901131317i3144dabcxe56e51c3d719a526@mail.gmail.com> Message-ID: Thanks for the research and the patch. Looks good. Bret On Tue, Jan 13, 2009 at 3:17 PM, Derek Berner wrote: > While working on some tests in our office, we realized click_no_wait > wasn't working at all in Server 2008, due to how the call to "system" > was getting interpreted by the command line. This patch adds a small > tweak to the code that fixes the problem for our platform, and > shouldn't cause any problems in other versions of Windows. > > _______________________________________________ > Wtr-development mailing list > Wtr-development at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-development > -- Bret Pettichord GTalk: bpettichord at gmail.com CTO, WatirCraft LLC, http://www.watircraft.com Lead Developer, Watir, http://wtr.rubyforge.org Blog (Essays), http://www.io.com/~wazmo/blog MiniBlog (Links), http://feeds.feedburner.com/bretshotlist -------------- next part -------------- An HTML attachment was scrubbed... URL: From angrez at gmail.com Wed Jan 21 00:32:28 2009 From: angrez at gmail.com (Angrez Singh) Date: Wed, 21 Jan 2009 11:02:28 +0530 Subject: [Wtr-development] FireWatir: container: js_eval: exception and javascript bugs? In-Reply-To: References: Message-ID: Hi Andrew, The reason for failure of code was that its been redirected to results page automatically once you get the results matching the criteria. When browser automatically redirects then the context was not getting refreshed. I have added a new event listener (onstatechange) to browser object in "gems\1.8\gems\firewatir-1.6.2\lib\firewatir\firefox.rb" which checks if page is loaded. If page is loaded it resets the context. Get the latest code from SVN and check if problem is resolved. - Angrez On Mon, Jan 5, 2009 at 11:02 AM, Angrez Singh wrote: > Andrew, > > Thanks for the code will look into the problem. > > - Angrez > > > On Fri, Jan 2, 2009 at 9:06 PM, Andrew McFarlane wrote: > >> Angrez, >> >> I wrote a tiny bit of code (see below) that *should* have illustrated the >> problem, but FireWatir cannot find the link that I am attempting to click at >> the end of the code, although it does exist--FireWatir believes that it is >> on the previous ("searching") page. I even tried to do: >> browser.show_links(), and it said that there were 0 links on the page. I am >> a bit baffled. >> >> require 'rubygems' >> gem 'watir', '>=1.6.2' >> require 'watir' >> >> >> Watir::Browser.default = 'firefox' >> browser = Watir::Browser.new >> >> # Go to the home page >> browser.goto('http://www.frontierairlines.com') >> >> # Enter the origin city code. >> elem = browser.text_field(:id, 'flying_from') >> elem.value = 'DEN' >> elem.fire_event("onfocus") >> elem.fire_event('onKeyDown') >> sleep 0.2 >> elem.fire_event('onKeyUp') >> sleep 5 >> >> # Select the origin city description. >> browser.li(:class, 'ui-autocomplete-even ui-autocomplete-over').click >> >> # Enter the destination city code. >> elem = browser.text_field(:id, 'flying_to') >> elem.value = 'LAX' >> elem.fire_event("onfocus") >> elem.fire_event('onKeyDown') >> sleep 0.2 >> elem.fire_event('onKeyUp') >> sleep 5 >> >> # Select the destination city description. >> browser.li(:class, 'ui-autocomplete-even ui-autocomplete-over').click >> >> # Enter the departure date. >> >> date_leave = (Time.now() + 1*24*60*60).strftime('%m/%d/%Y') >> browser.text_field(:id, 'leaving').value = date_leave >> >> # Enter the return date. >> date_return = (Time.now() + 2*24*60*60).strftime('%m/%d/%Y') >> browser.text_field(:id, 'returning').value = date_return >> >> # Press the 'FIND FLIGHTS' image. >> browser.image(:id, 'findFlightsButton').click >> >> sleep 20 >> >> browser.link(:text, 'Start Over').click >> >> >> Andrew >> >> >> ------------------------------ >> Date: Wed, 31 Dec 2008 12:02:20 +0530 >> From: angrez at gmail.com >> To: wtr-development at rubyforge.org >> Subject: Re: [Wtr-development] FireWatir: container: js_eval: exception >> and javascript bugs? >> >> >> Andrew, >> >> Can you post the code here which you were trying? >> >> - Angrez >> >> On Tue, Dec 30, 2008 at 8:42 PM, Bret Pettichord wrote: >> >> I'd like to have a better understanding of the cause of the problem first. >> >> Bret >> >> >> On Tue, Dec 30, 2008 at 12:25 AM, Angrez Singh wrote: >> >> Hi Bret, >> >> I didn't had a look into this but I was thinking if we try to locate >> element before every call, rather than using the old context. Like instead >> of storing the element name in some variable which gets obsolete when >> context changes we can try to find the element during each call. XPath works >> pretty fast in Firefox. I know there will be some speed issues but we will >> not be having much issues like this. >> >> Thoughts? >> >> - Angrez >> >> >> On Mon, Dec 29, 2008 at 9:42 PM, Bret Pettichord wrote: >> >> Clearly the code you fixed is incorrect. >> >> There is also clearly a larger problem. I don't have time right now to >> research this further. Can some one else help Andrew? >> >> Bret >> >> On Wed, Dec 24, 2008 at 2:46 PM, Andrew McFarlane < >> welkin_inc at hotmail.com> wrote: >> >> I was running a test using Firewatir 1.6.2. >> >> I clicked on a link which navigates the user back to the home page. After >> clicking the link, I looked to make sure that the Close button on an >> "are-you-sure?" dialog was visible or not by making the call >> browser.link(:xpath, close_button_xpath).visible? >> >> Depending on which page of the application that one is on, pressing the >> home page link may either navigate directly to the home page or first >> display the "are-you-sure?" dialog before proceeding to the home page. >> >> When making the above method call, I saw the exception: >> >> c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/container.rb:497:in >> `raise': exception class/object expected (TypeError) >> >> This refers to the raise() method call shown in the container.rb code: >> >> if md = /^(\w+)Error:(.*)$/.match(value) >> eval "class JS#{md[1]}Error\nend" >> raise (eval "JS#{md[1]}Error"), md[2] >> end >> >> I changed the above container.rb code to: >> >> if md = /^(\w+)Error:(.*)$/.match(value) >> klass = Class.new Exception >> Object.const_set "JS#{md[1]}Error", klass >> raise klass, md[2] >> end >> >> so that I could see the exception get thrown. >> >> I then re-ran my test and saw the exception: >> >> c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/container.rb:498:in >> `js_eval': element_xpath_17 is not defined (Reference) >> from >> c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/mozilla_base_element.rb:1005:in >> `visible?' >> >> At this point, I'm stuck. I'm guessing that the javascript context got >> reset when navigating to a different page. >> >> Thanks for your help. >> >> Andrew >> >> >> ------------------------------ >> Send e-mail faster without improving your typing skills. Get your >> Hotmail(R) account. >> >> _______________________________________________ >> Wtr-development mailing list >> Wtr-development at rubyforge.org >> http://rubyforge.org/mailman/listinfo/wtr-development >> >> >> >> >> -- >> Bret Pettichord >> GTalk: bpettichord at gmail.com >> CTO, WatirCraft LLC, http://www.watircraft.com >> Lead Developer, Watir, http://wtr.rubyforge.org >> Blog (Essays), http://www.io.com/~wazmo/blog >> MiniBlog (Links), http://feeds.feedburner.com/bretshotlist >> >> _______________________________________________ >> Wtr-development mailing list >> Wtr-development at rubyforge.org >> http://rubyforge.org/mailman/listinfo/wtr-development >> >> >> >> _______________________________________________ >> Wtr-development mailing list >> Wtr-development at rubyforge.org >> http://rubyforge.org/mailman/listinfo/wtr-development >> >> >> >> >> -- >> Bret Pettichord >> GTalk: bpettichord at gmail.com >> CTO, WatirCraft LLC, http://www.watircraft.com >> Lead Developer, Watir, http://wtr.rubyforge.org >> Blog (Essays), http://www.io.com/~wazmo/blog >> MiniBlog (Links), http://feeds.feedburner.com/bretshotlist >> >> _______________________________________________ >> Wtr-development mailing list >> Wtr-development at rubyforge.org >> http://rubyforge.org/mailman/listinfo/wtr-development >> >> >> >> ------------------------------ >> It's the same Hotmail(R). If by "same" you mean up to 70% faster. Get your >> account now. >> >> _______________________________________________ >> Wtr-development mailing list >> Wtr-development at rubyforge.org >> http://rubyforge.org/mailman/listinfo/wtr-development >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From welkin_inc at hotmail.com Wed Jan 21 16:58:35 2009 From: welkin_inc at hotmail.com (Andrew McFarlane) Date: Wed, 21 Jan 2009 14:58:35 -0700 Subject: [Wtr-development] FireWatir: container: js_eval: exception and javascript bugs? In-Reply-To: References: Message-ID: Angrez, Thanks. Looks good. Andrew Date: Wed, 21 Jan 2009 11:02:28 +0530 From: angrez at gmail.com To: wtr-development at rubyforge.org Subject: Re: [Wtr-development] FireWatir: container: js_eval: exception and javascript bugs? Hi Andrew, The reason for failure of code was that its been redirected to results page automatically once you get the results matching the criteria. When browser automatically redirects then the context was not getting refreshed. I have added a new event listener (onstatechange) to browser object in "gems\1.8\gems\firewatir-1.6.2\lib\firewatir\firefox.rb" which checks if page is loaded. If page is loaded it resets the context. Get the latest code from SVN and check if problem is resolved. - Angrez On Mon, Jan 5, 2009 at 11:02 AM, Angrez Singh wrote: Andrew, Thanks for the code will look into the problem. - Angrez On Fri, Jan 2, 2009 at 9:06 PM, Andrew McFarlane wrote: Angrez, I wrote a tiny bit of code (see below) that *should* have illustrated the problem, but FireWatir cannot find the link that I am attempting to click at the end of the code, although it does exist--FireWatir believes that it is on the previous ("searching") page. I even tried to do: browser.show_links(), and it said that there were 0 links on the page. I am a bit baffled. require 'rubygems' gem 'watir', '>=1.6.2' require 'watir' Watir::Browser.default = 'firefox' browser = Watir::Browser.new # Go to the home page browser.goto('http://www.frontierairlines.com') # Enter the origin city code. elem = browser.text_field(:id, 'flying_from') elem.value = 'DEN' elem.fire_event("onfocus") elem.fire_event('onKeyDown') sleep 0.2 elem.fire_event('onKeyUp') sleep 5 # Select the origin city description. browser.li(:class, 'ui-autocomplete-even ui-autocomplete-over').click # Enter the destination city code. elem = browser.text_field(:id, 'flying_to') elem.value = 'LAX' elem.fire_event("onfocus") elem.fire_event('onKeyDown') sleep 0.2 elem.fire_event('onKeyUp') sleep 5 # Select the destination city description. browser.li(:class, 'ui-autocomplete-even ui-autocomplete-over').click # Enter the departure date. date_leave = (Time.now() + 1*24*60*60).strftime('%m/%d/%Y') browser.text_field(:id, 'leaving').value = date_leave # Enter the return date. date_return = (Time.now() + 2*24*60*60).strftime('%m/%d/%Y') browser.text_field(:id, 'returning').value = date_return # Press the 'FIND FLIGHTS' image. browser.image(:id, 'findFlightsButton').click sleep 20 browser.link(:text, 'Start Over').click Andrew Date: Wed, 31 Dec 2008 12:02:20 +0530 From: angrez at gmail.com To: wtr-development at rubyforge.org Subject: Re: [Wtr-development] FireWatir: container: js_eval: exception and javascript bugs? Andrew, Can you post the code here which you were trying? - Angrez On Tue, Dec 30, 2008 at 8:42 PM, Bret Pettichord wrote: I'd like to have a better understanding of the cause of the problem first. Bret On Tue, Dec 30, 2008 at 12:25 AM, Angrez Singh wrote: Hi Bret, I didn't had a look into this but I was thinking if we try to locate element before every call, rather than using the old context. Like instead of storing the element name in some variable which gets obsolete when context changes we can try to find the element during each call. XPath works pretty fast in Firefox. I know there will be some speed issues but we will not be having much issues like this. Thoughts? - Angrez On Mon, Dec 29, 2008 at 9:42 PM, Bret Pettichord wrote: Clearly the code you fixed is incorrect. There is also clearly a larger problem. I don't have time right now to research this further. Can some one else help Andrew? Bret On Wed, Dec 24, 2008 at 2:46 PM, Andrew McFarlane wrote: I was running a test using Firewatir 1.6.2. I clicked on a link which navigates the user back to the home page. After clicking the link, I looked to make sure that the Close button on an "are-you-sure?" dialog was visible or not by making the call browser.link(:xpath, close_button_xpath).visible? Depending on which page of the application that one is on, pressing the home page link may either navigate directly to the home page or first display the "are-you-sure?" dialog before proceeding to the home page. When making the above method call, I saw the exception: c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/container.rb:497:in `raise': exception class/object expected (TypeError) This refers to the raise() method call shown in the container.rb code: if md = /^(\w+)Error:(.*)$/.match(value) eval "class JS#{md[1]}Error\nend" raise (eval "JS#{md[1]}Error"), md[2] end I changed the above container.rb code to: if md = /^(\w+)Error:(.*)$/.match(value) klass = Class.new Exception Object.const_set "JS#{md[1]}Error", klass raise klass, md[2] end so that I could see the exception get thrown. I then re-ran my test and saw the exception: c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/container.rb:498:in `js_eval': element_xpath_17 is not defined (Reference) from c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/mozilla_base_element.rb:1005:in `visible?' At this point, I'm stuck. I'm guessing that the javascript context got reset when navigating to a different page. Thanks for your help. Andrew Send e-mail faster without improving your typing skills. Get your Hotmail? account. _______________________________________________ Wtr-development mailing list Wtr-development at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-development -- Bret Pettichord GTalk: bpettichord at gmail.com CTO, WatirCraft LLC, http://www.watircraft.com Lead Developer, Watir, http://wtr.rubyforge.org Blog (Essays), http://www.io.com/~wazmo/blog MiniBlog (Links), http://feeds.feedburner.com/bretshotlist _______________________________________________ Wtr-development mailing list Wtr-development at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-development _______________________________________________ Wtr-development mailing list Wtr-development at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-development -- Bret Pettichord GTalk: bpettichord at gmail.com CTO, WatirCraft LLC, http://www.watircraft.com Lead Developer, Watir, http://wtr.rubyforge.org Blog (Essays), http://www.io.com/~wazmo/blog MiniBlog (Links), http://feeds.feedburner.com/bretshotlist _______________________________________________ Wtr-development mailing list Wtr-development at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-development It's the same Hotmail?. If by "same" you mean up to 70% faster. Get your account now. _______________________________________________ Wtr-development mailing list Wtr-development at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-development _________________________________________________________________ Windows Live? Hotmail?:?more than just e-mail. http://windowslive.com/explore?ocid=TXT_TAGLM_WL_t2_hm_justgotbetter_explore_012009 -------------- next part -------------- An HTML attachment was scrubbed... URL: From marekj.com at gmail.com Mon Jan 26 10:18:20 2009 From: marekj.com at gmail.com (marekj) Date: Mon, 26 Jan 2009 09:18:20 -0600 Subject: [Wtr-development] RadioGroup CheckboxGroup or List? Message-ID: Hi, I in Watirloo currently I have ducktaped Watir::IE and FireWatir::Firefox to return RadioGroup and CheckboxGroup. It returns an object with a list of Radios sharing the same :name attribute. It allows me to operate on them as I do on SelectList. RadioGroup acts like single SelectList and CheckboxGroup as multi SelectList I would like to write it up a bit better and perhaps make a patch for Watir so currenty instead of this: ie.radio(:name, 'radioname', 'value1') ie.radio(:name, 'radioname', 'value2') you can use this: rg = ie.radio_group('radioname') rg.size #=> 2 rg.values # => 'value1', 'value2' Questions: 1. Should I stick with the name RadioGroup or better call it RadioList? CheckboxList? and access it like this? ie.radio_list('radioname') ie.checkbox_list('cbname') Of course to this there would be corresponding ie.radio_lists or (radio_groups) that would return radio groupings in current DOM 2. I can rewrite it of course to adop the latest changes Bret is making with display method etc... call it group? or list? please vote. you can see this in action here: http://github.com/marekj/watirloo/ look at test/checkbox_group_test.rb and lib/watirloo/ducktape_watir.rb marekj | Semantic Page Objects Automation Watirloo: Browser Page Helper Framework http://github.com/marekj/watirloo/ for IE, Firefox and others? -------------- next part -------------- An HTML attachment was scrubbed... URL: From welkin_inc at hotmail.com Mon Jan 26 18:04:08 2009 From: welkin_inc at hotmail.com (Andrew McFarlane) Date: Mon, 26 Jan 2009 16:04:08 -0700 Subject: [Wtr-development] FireWatir: container: js_eval: exception and javascript bugs? In-Reply-To: References: Message-ID: Angrez, I am still running into a problem. I installed from SVN. I ran the following simple code: require 'rubygems' gem 'watir', '>=1.6.2' require 'watir' Watir::Browser.default = 'firefox' browser = Watir::Browser.new # Go to the home page browser.goto('http://www.frontierairlines.com') # Enter the origin city code. elem = browser.text_field(:id, 'flying_from') elem.value = 'DEN' elem.fire_event("onfocus") elem.fire_event('onKeyDown') sleep 0.2 elem.fire_event('onKeyUp') sleep 5 # Select the origin city description. browser.li(:class, 'ui-autocomplete-even ui-autocomplete-over').click # Enter the destination city code. elem = browser.text_field(:id, 'flying_to') elem.value = 'LAX' elem.fire_event("onfocus") elem.fire_event('onKeyDown') sleep 0.2 elem.fire_event('onKeyUp') sleep 5 # Select the destination city description. browser.li(:class, 'ui-autocomplete-even ui-autocomplete-over').click # Enter the departure date. date_leave = (Time.now() + 1*24*60*60).strftime('%m/%d/%Y') browser.text_field(:id, 'leaving').value = date_leave # Enter the return date. date_return = (Time.now() + 2*24*60*60).strftime('%m/%d/%Y') browser.text_field(:id, 'returning').value = date_return # Press the 'FIND FLIGHTS' image. browser.image(:id, 'findFlightsButton').click sleep 20 flight_table_index = 0 other_carrier_xpath = %Q(//div[@id="bodyBlock_#{flight_table_index}"]/div[@class="resultsArea"]/div[@class="footnote"]) if browser.element_by_xpath(other_carrier_xpath).exist? # There is one or more footnotes saying that flights are operated by other than Frontier. other_carriers = browser.element_by_xpath(other_carrier_xpath) puts "DEBUG: other_carriers inspection: #{other_carriers.inspect}" end I get an exception: c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/container.rb:495:in `raise': exception class/object expecte d (TypeError) from c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/container.rb:495:in `js_eval' from c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/container.rb:506:in `js_eval_method' from c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/mozilla_base_element.rb:127:in `get_attribute_value' from c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/mozilla_base_element.rb:169:in `string_creator ' from c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/mozilla_base_element.rb:1113:in `to_s' from c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/htmlelements.rb:850:in `to_s' from c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/mozilla_base_element.rb:749:in `inspect' from H:/dev/F9/firewatir_js_context_bug_test.rb:57 I changed container.rb near line 495 to look like: if md = /^(\w+)Error:(.*)$/.match(value) #eval "class JS#{md[1]}Error\nend" #raise (eval "JS#{md[1]}Error"), md[2] klass = Class.new Exception Object.const_set "JS#{md[1]}Error", klass raise klass, md[2] end I reran the script and got: c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/container.rb:498:in `js_eval': element_xpath_665 is not de fined (JSReferenceError) from c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/container.rb:506:in `js_eval_method' from c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/mozilla_base_element.rb:127:in `get_attribute_value' from c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/mozilla_base_element.rb:169:in `string_creator ' from c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/mozilla_base_element.rb:1113:in `to_s' from c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/htmlelements.rb:850:in `to_s' from c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/mozilla_base_element.rb:749:in `inspect' from H:/dev/F9/firewatir_js_context_bug_test.rb:57 Thanks for your help. Andrew Date: Wed, 21 Jan 2009 11:02:28 +0530 From: angrez at gmail.com To: wtr-development at rubyforge.org Subject: Re: [Wtr-development] FireWatir: container: js_eval: exception and javascript bugs? Hi Andrew, The reason for failure of code was that its been redirected to results page automatically once you get the results matching the criteria. When browser automatically redirects then the context was not getting refreshed. I have added a new event listener (onstatechange) to browser object in "gems\1.8\gems\firewatir-1.6.2\lib\firewatir\firefox.rb" which checks if page is loaded. If page is loaded it resets the context. Get the latest code from SVN and check if problem is resolved. - Angrez On Mon, Jan 5, 2009 at 11:02 AM, Angrez Singh wrote: Andrew, Thanks for the code will look into the problem. - Angrez On Fri, Jan 2, 2009 at 9:06 PM, Andrew McFarlane wrote: Angrez, I wrote a tiny bit of code (see below) that *should* have illustrated the problem, but FireWatir cannot find the link that I am attempting to click at the end of the code, although it does exist--FireWatir believes that it is on the previous ("searching") page. I even tried to do: browser.show_links(), and it said that there were 0 links on the page. I am a bit baffled. require 'rubygems' gem 'watir', '>=1.6.2' require 'watir' Watir::Browser.default = 'firefox' browser = Watir::Browser.new # Go to the home page browser.goto('http://www.frontierairlines.com') # Enter the origin city code. elem = browser.text_field(:id, 'flying_from') elem.value = 'DEN' elem.fire_event("onfocus") elem.fire_event('onKeyDown') sleep 0.2 elem.fire_event('onKeyUp') sleep 5 # Select the origin city description. browser.li(:class, 'ui-autocomplete-even ui-autocomplete-over').click # Enter the destination city code. elem = browser.text_field(:id, 'flying_to') elem.value = 'LAX' elem.fire_event("onfocus") elem.fire_event('onKeyDown') sleep 0.2 elem.fire_event('onKeyUp') sleep 5 # Select the destination city description. browser.li(:class, 'ui-autocomplete-even ui-autocomplete-over').click # Enter the departure date. date_leave = (Time.now() + 1*24*60*60).strftime('%m/%d/%Y') browser.text_field(:id, 'leaving').value = date_leave # Enter the return date. date_return = (Time.now() + 2*24*60*60).strftime('%m/%d/%Y') browser.text_field(:id, 'returning').value = date_return # Press the 'FIND FLIGHTS' image. browser.image(:id, 'findFlightsButton').click sleep 20 browser.link(:text, 'Start Over').click Andrew Date: Wed, 31 Dec 2008 12:02:20 +0530 From: angrez at gmail.com To: wtr-development at rubyforge.org Subject: Re: [Wtr-development] FireWatir: container: js_eval: exception and javascript bugs? Andrew, Can you post the code here which you were trying? - Angrez On Tue, Dec 30, 2008 at 8:42 PM, Bret Pettichord wrote: I'd like to have a better understanding of the cause of the problem first. Bret On Tue, Dec 30, 2008 at 12:25 AM, Angrez Singh wrote: Hi Bret, I didn't had a look into this but I was thinking if we try to locate element before every call, rather than using the old context. Like instead of storing the element name in some variable which gets obsolete when context changes we can try to find the element during each call. XPath works pretty fast in Firefox. I know there will be some speed issues but we will not be having much issues like this. Thoughts? - Angrez On Mon, Dec 29, 2008 at 9:42 PM, Bret Pettichord wrote: Clearly the code you fixed is incorrect. There is also clearly a larger problem. I don't have time right now to research this further. Can some one else help Andrew? Bret On Wed, Dec 24, 2008 at 2:46 PM, Andrew McFarlane wrote: I was running a test using Firewatir 1.6.2. I clicked on a link which navigates the user back to the home page. After clicking the link, I looked to make sure that the Close button on an "are-you-sure?" dialog was visible or not by making the call browser.link(:xpath, close_button_xpath).visible? Depending on which page of the application that one is on, pressing the home page link may either navigate directly to the home page or first display the "are-you-sure?" dialog before proceeding to the home page. When making the above method call, I saw the exception: c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/container.rb:497:in `raise': exception class/object expected (TypeError) This refers to the raise() method call shown in the container.rb code: if md = /^(\w+)Error:(.*)$/.match(value) eval "class JS#{md[1]}Error\nend" raise (eval "JS#{md[1]}Error"), md[2] end I changed the above container.rb code to: if md = /^(\w+)Error:(.*)$/.match(value) klass = Class.new Exception Object.const_set "JS#{md[1]}Error", klass raise klass, md[2] end so that I could see the exception get thrown. I then re-ran my test and saw the exception: c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/container.rb:498:in `js_eval': element_xpath_17 is not defined (Reference) from c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/mozilla_base_element.rb:1005:in `visible?' At this point, I'm stuck. I'm guessing that the javascript context got reset when navigating to a different page. Thanks for your help. Andrew Send e-mail faster without improving your typing skills. Get your Hotmail? account. _______________________________________________ Wtr-development mailing list Wtr-development at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-development -- Bret Pettichord GTalk: bpettichord at gmail.com CTO, WatirCraft LLC, http://www.watircraft.com Lead Developer, Watir, http://wtr.rubyforge.org Blog (Essays), http://www.io.com/~wazmo/blog MiniBlog (Links), http://feeds.feedburner.com/bretshotlist _______________________________________________ Wtr-development mailing list Wtr-development at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-development _______________________________________________ Wtr-development mailing list Wtr-development at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-development -- Bret Pettichord GTalk: bpettichord at gmail.com CTO, WatirCraft LLC, http://www.watircraft.com Lead Developer, Watir, http://wtr.rubyforge.org Blog (Essays), http://www.io.com/~wazmo/blog MiniBlog (Links), http://feeds.feedburner.com/bretshotlist _______________________________________________ Wtr-development mailing list Wtr-development at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-development It's the same Hotmail?. If by "same" you mean up to 70% faster. Get your account now. _______________________________________________ Wtr-development mailing list Wtr-development at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-development _________________________________________________________________ Hotmail? goes where you go. On a PC, on the Web, on your phone. http://www.windowslive-hotmail.com/learnmore/versatility.aspx#mobile?ocid=TXT_TAGHM_WL_HM_versatility_121208 -------------- next part -------------- An HTML attachment was scrubbed... URL: From angrez at gmail.com Tue Jan 27 05:09:44 2009 From: angrez at gmail.com (Angrez Singh) Date: Tue, 27 Jan 2009 15:39:44 +0530 Subject: [Wtr-development] FireWatir: container: js_eval: exception and javascript bugs? In-Reply-To: References: Message-ID: There was bug in the code that gets element by xpath. We need to replace the quotes from xpath query passed in with single quotes or we need to put "\" before every quote. I changed the code to reflect that and same is checked in. Also the xpath query you have written was not pointing to any element. I changed the code a bit and it works now. Here are last few lines of code: flight_table_index = 0 other_carrier_xpath = %Q(//div[@id="headBlock_#{flight_table_index}"]/div/h2) h2Element = browser.element_by_xpath(other_carrier_xpath) if h2Element.exist? puts 'here element exists' # There is one or more footnotes saying that flights are operated by other than Frontier. #other_carriers = browser.element_by_xpath(other_carrier_xpath) puts h2Element.innerHTML # puts "DEBUG: other_carriers inspection: #{divElement.inspect}" end - Angrez On Tue, Jan 27, 2009 at 4:34 AM, Andrew McFarlane wrote: > Angrez, > > I am still running into a problem. I installed from SVN. I ran the > following simple code: > > > require 'rubygems' > gem 'watir', '>=1.6.2' > require 'watir' > > > Watir::Browser.default = 'firefox' > browser = Watir::Browser.new > > # Go to the home page > browser.goto('http://www.frontierairlines.com') > > # Enter the origin city code. > elem = browser.text_field(:id, 'flying_from') > elem.value = 'DEN' > elem.fire_event("onfocus") > elem.fire_event('onKeyDown') > sleep 0.2 > elem.fire_event('onKeyUp') > sleep 5 > > # Select the origin city description. > browser.li(:class, 'ui-autocomplete-even ui-autocomplete-over').click > > # Enter the destination city code. > elem = browser.text_field(:id, 'flying_to') > elem.value = 'LAX' > elem.fire_event("onfocus") > elem.fire_event('onKeyDown') > sleep 0.2 > elem.fire_event('onKeyUp') > sleep 5 > > # Select the destination city description. > browser.li(:class, 'ui-autocomplete-even ui-autocomplete-over').click > > # Enter the departure date. > > date_leave = (Time.now() + 1*24*60*60).strftime('%m/%d/%Y') > browser.text_field(:id, 'leaving').value = date_leave > > # Enter the return date. > date_return = (Time.now() + 2*24*60*60).strftime('%m/%d/%Y') > browser.text_field(:id, 'returning').value = date_return > > # Press the 'FIND FLIGHTS' image. > browser.image(:id, 'findFlightsButton').click > > sleep 20 > > flight_table_index = 0 > > other_carrier_xpath = > %Q(//div[@id="bodyBlock_#{flight_table_index}"]/div[@class="resultsArea"]/div[@class="footnote"]) > > if browser.element_by_xpath(other_carrier_xpath).exist? > # There is one or more footnotes saying that flights are operated by > other than Frontier. > other_carriers = browser.element_by_xpath(other_carrier_xpath) > puts "DEBUG: other_carriers inspection: #{other_carriers.inspect}" > end > > I get an exception: > > c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/container.rb:495:in > `raise': exception class/object expecte > d (TypeError) > from > c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/container.rb:495:in > `js_eval' > from > c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/container.rb:506:in > `js_eval_method' > from > c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/mozilla_base_element.rb:127:in > `get_attribute_value' > from > c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/mozilla_base_element.rb:169:in > `string_creator > ' > from > c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/mozilla_base_element.rb:1113:in > `to_s' > from > c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/htmlelements.rb:850:in > `to_s' > from > c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/mozilla_base_element.rb:749:in > `inspect' > from H:/dev/F9/firewatir_js_context_bug_test.rb:57 > > I changed container.rb near line 495 to look like: > > if md = /^(\w+)Error:(.*)$/.match(value) > #eval "class JS#{md[1]}Error\nend" > #raise (eval "JS#{md[1]}Error"), md[2] > klass = Class.new Exception > Object.const_set "JS#{md[1]}Error", klass > raise klass, md[2] > end > > I reran the script and got: > > c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/container.rb:498:in > `js_eval': element_xpath_665 is not de > fined (JSReferenceError) > from > c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/container.rb:506:in > `js_eval_method' > from > c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/mozilla_base_element.rb:127:in > `get_attribute_value' > from > c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/mozilla_base_element.rb:169:in > `string_creator > ' > from > c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/mozilla_base_element.rb:1113:in > `to_s' > from > c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/htmlelements.rb:850:in > `to_s' > from > c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/mozilla_base_element.rb:749:in > `inspect' > from H:/dev/F9/firewatir_js_context_bug_test.rb:57 > > Thanks for your help. > > > > Andrew > > > > ------------------------------ > Date: Wed, 21 Jan 2009 11:02:28 +0530 > > From: angrez at gmail.com > To: wtr-development at rubyforge.org > Subject: Re: [Wtr-development] FireWatir: container: js_eval: exception and > javascript bugs? > > Hi Andrew, > > The reason for failure of code was that its been redirected to results page > automatically once you get the results matching the criteria. When browser > automatically redirects then the context was not getting refreshed. I have > added a new event listener (onstatechange) to browser object in > "gems\1.8\gems\firewatir-1.6.2\lib\firewatir\firefox.rb" which checks if > page is loaded. If page is loaded it resets the context. > > Get the latest code from SVN and check if problem is resolved. > > - Angrez > > > On Mon, Jan 5, 2009 at 11:02 AM, Angrez Singh wrote: > > Andrew, > > Thanks for the code will look into the problem. > > - Angrez > > > On Fri, Jan 2, 2009 at 9:06 PM, Andrew McFarlane wrote: > > Angrez, > > I wrote a tiny bit of code (see below) that *should* have illustrated the > problem, but FireWatir cannot find the link that I am attempting to click at > the end of the code, although it does exist--FireWatir believes that it is > on the previous ("searching") page. I even tried to do: > browser.show_links(), and it said that there were 0 links on the page. I am > a bit baffled. > > require 'rubygems' > gem 'watir', '>=1.6.2' > require 'watir' > > > Watir::Browser.default = 'firefox' > browser = Watir::Browser.new > > # Go to the home page > browser.goto('http://www.frontierairlines.com') > > # Enter the origin city code. > elem = browser.text_field(:id, 'flying_from') > elem.value = 'DEN' > elem.fire_event("onfocus") > elem.fire_event('onKeyDown') > sleep 0.2 > elem.fire_event('onKeyUp') > sleep 5 > > # Select the origin city description. > browser.li(:class, 'ui-autocomplete-even ui-autocomplete-over').click > > # Enter the destination city code. > elem = browser.text_field(:id, 'flying_to') > elem.value = 'LAX' > elem.fire_event("onfocus") > elem.fire_event('onKeyDown') > sleep 0.2 > elem.fire_event('onKeyUp') > sleep 5 > > # Select the destination city description. > browser.li(:class, 'ui-autocomplete-even ui-autocomplete-over').click > > # Enter the departure date. > > date_leave = (Time.now() + 1*24*60*60).strftime('%m/%d/%Y') > browser.text_field(:id, 'leaving').value = date_leave > > # Enter the return date. > date_return = (Time.now() + 2*24*60*60).strftime('%m/%d/%Y') > browser.text_field(:id, 'returning').value = date_return > > # Press the 'FIND FLIGHTS' image. > browser.image(:id, 'findFlightsButton').click > > sleep 20 > > browser.link(:text, 'Start Over').click > > > Andrew > > > ------------------------------ > Date: Wed, 31 Dec 2008 12:02:20 +0530 > From: angrez at gmail.com > To: wtr-development at rubyforge.org > Subject: Re: [Wtr-development] FireWatir: container: js_eval: exception and > javascript bugs? > > > Andrew, > > Can you post the code here which you were trying? > > - Angrez > > On Tue, Dec 30, 2008 at 8:42 PM, Bret Pettichord wrote: > > I'd like to have a better understanding of the cause of the problem first. > > Bret > > > On Tue, Dec 30, 2008 at 12:25 AM, Angrez Singh wrote: > > Hi Bret, > > I didn't had a look into this but I was thinking if we try to locate > element before every call, rather than using the old context. Like instead > of storing the element name in some variable which gets obsolete when > context changes we can try to find the element during each call. XPath works > pretty fast in Firefox. I know there will be some speed issues but we will > not be having much issues like this. > > Thoughts? > > - Angrez > > > On Mon, Dec 29, 2008 at 9:42 PM, Bret Pettichord wrote: > > Clearly the code you fixed is incorrect. > > There is also clearly a larger problem. I don't have time right now to > research this further. Can some one else help Andrew? > > Bret > > On Wed, Dec 24, 2008 at 2:46 PM, Andrew McFarlane > wrote: > > I was running a test using Firewatir 1.6.2. > > I clicked on a link which navigates the user back to the home page. After > clicking the link, I looked to make sure that the Close button on an > "are-you-sure?" dialog was visible or not by making the call > browser.link(:xpath, close_button_xpath).visible? > > Depending on which page of the application that one is on, pressing the > home page link may either navigate directly to the home page or first > display the "are-you-sure?" dialog before proceeding to the home page. > > When making the above method call, I saw the exception: > > c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/container.rb:497:in > `raise': exception class/object expected (TypeError) > > This refers to the raise() method call shown in the container.rb code: > > if md = /^(\w+)Error:(.*)$/.match(value) > eval "class JS#{md[1]}Error\nend" > raise (eval "JS#{md[1]}Error"), md[2] > end > > I changed the above container.rb code to: > > if md = /^(\w+)Error:(.*)$/.match(value) > klass = Class.new Exception > Object.const_set "JS#{md[1]}Error", klass > raise klass, md[2] > end > > so that I could see the exception get thrown. > > I then re-ran my test and saw the exception: > > c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/container.rb:498:in > `js_eval': element_xpath_17 is not defined (Reference) > from > c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/mozilla_base_element.rb:1005:in > `visible?' > > At this point, I'm stuck. I'm guessing that the javascript context got > reset when navigating to a different page. > > Thanks for your help. > > Andrew > > > ------------------------------ > Send e-mail faster without improving your typing skills. Get your Hotmail(R) > account. > > _______________________________________________ > Wtr-development mailing list > Wtr-development at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-development > > > > > -- > Bret Pettichord > GTalk: bpettichord at gmail.com > CTO, WatirCraft LLC, http://www.watircraft.com > Lead Developer, Watir, http://wtr.rubyforge.org > Blog (Essays), http://www.io.com/~wazmo/blog > MiniBlog (Links), http://feeds.feedburner.com/bretshotlist > > _______________________________________________ > Wtr-development mailing list > Wtr-development at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-development > > > > _______________________________________________ > Wtr-development mailing list > Wtr-development at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-development > > > > > -- > Bret Pettichord > GTalk: bpettichord at gmail.com > CTO, WatirCraft LLC, http://www.watircraft.com > Lead Developer, Watir, http://wtr.rubyforge.org > Blog (Essays), http://www.io.com/~wazmo/blog > MiniBlog (Links), http://feeds.feedburner.com/bretshotlist > > _______________________________________________ > Wtr-development mailing list > Wtr-development at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-development > > > > ------------------------------ > It's the same Hotmail(R). If by "same" you mean up to 70% faster. Get your > account now. > > _______________________________________________ > Wtr-development mailing list > Wtr-development at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-development > > > > > ------------------------------ > Hotmail(R) goes where you go. On a PC, on the Web, on your phone. See how. > > _______________________________________________ > Wtr-development mailing list > Wtr-development at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-development > -------------- next part -------------- An HTML attachment was scrubbed... URL: From welkin_inc at hotmail.com Thu Jan 29 14:18:47 2009 From: welkin_inc at hotmail.com (Andrew McFarlane) Date: Thu, 29 Jan 2009 12:18:47 -0700 Subject: [Wtr-development] (no subject) Message-ID: Has anyone thought about using Watir to do load testing using EC2 or something similar to Selenium Grid? Thanks. Andrew _________________________________________________________________ Windows Live? Hotmail?:?more than just e-mail. http://windowslive.com/explore?ocid=TXT_TAGLM_WL_t2_hm_justgotbetter_explore_012009 -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul.rogers at shaw.ca Thu Jan 29 19:02:10 2009 From: paul.rogers at shaw.ca (Paul Rogers) Date: Thu, 29 Jan 2009 17:02:10 -0700 Subject: [Wtr-development] (no subject) In-Reply-To: References: Message-ID: ec2 only gives you a linux machine with no gui. Use a load testing tool like jmeter Paul On Thu, Jan 29, 2009 at 12:18 PM, Andrew McFarlane wrote: > Has anyone thought about using Watir to do load testing using EC2 or > something similar to Selenium Grid? > > Thanks. > > Andrew > > ________________________________ > Windows Live? Hotmail(R):?more than just e-mail. Check it out. > _______________________________________________ > Wtr-development mailing list > Wtr-development at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-development > From welkin_inc at hotmail.com Thu Jan 29 19:56:47 2009 From: welkin_inc at hotmail.com (Andrew McFarlane) Date: Thu, 29 Jan 2009 17:56:47 -0700 Subject: [Wtr-development] (no subject) In-Reply-To: References: Message-ID: EC2 allows you to use a GUI. It also now allows you to use a Windows image. I see that people are doing cross-browser testing on EC2, so why not do automated load tests that way? The app that I am testing is too complicated to model using a simulated browser tool like Jmeter. I'm headed down this path--I'll let you know how it goes. Andrew > Date: Thu, 29 Jan 2009 17:02:10 -0700 > From: paul.rogers at shaw.ca > To: wtr-development at rubyforge.org > Subject: Re: [Wtr-development] (no subject) > > ec2 only gives you a linux machine with no gui. Use a load testing > tool like jmeter > > Paul > > On Thu, Jan 29, 2009 at 12:18 PM, Andrew McFarlane > wrote: > > Has anyone thought about using Watir to do load testing using EC2 or > > something similar to Selenium Grid? > > > > Thanks. > > > > Andrew > > > > ________________________________ > > Windows Live? Hotmail(R):?more than just e-mail. Check it out. > > _______________________________________________ > > Wtr-development mailing list > > Wtr-development at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-development > > > _______________________________________________ > Wtr-development mailing list > Wtr-development at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-development _________________________________________________________________ Hotmail? goes where you go. On a PC, on the Web, on your phone. http://www.windowslive-hotmail.com/learnmore/versatility.aspx#mobile?ocid=TXT_TAGHM_WL_HM_versatility_121208 -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul.rogers at shaw.ca Fri Jan 30 10:57:29 2009 From: paul.rogers at shaw.ca (Paul Rogers) Date: Fri, 30 Jan 2009 08:57:29 -0700 Subject: [Wtr-development] (no subject) In-Reply-To: References: Message-ID: do you have any links to what guis are available on ec2. I know windows server is available, burt my understanding is that it doesnt give you the windows desktop. I guess under linux you could run something like virtual box in headless mode and remote desktop in, but I think it would be unusable from the client because of the speed. Paul On Thu, Jan 29, 2009 at 5:56 PM, Andrew McFarlane wrote: > EC2 allows you to use a GUI. It also now allows you to use a Windows > image. I see that people are doing cross-browser testing on EC2, so why not > do automated load tests that way? The app that I am testing is too > complicated to model using a simulated browser tool like Jmeter. > > I'm headed down this path--I'll let you know how it goes. > > Andrew > >> Date: Thu, 29 Jan 2009 17:02:10 -0700 >> From: paul.rogers at shaw.ca >> To: wtr-development at rubyforge.org >> Subject: Re: [Wtr-development] (no subject) >> >> ec2 only gives you a linux machine with no gui. Use a load testing >> tool like jmeter >> >> Paul >> >> On Thu, Jan 29, 2009 at 12:18 PM, Andrew McFarlane >> wrote: >> > Has anyone thought about using Watir to do load testing using EC2 or >> > something similar to Selenium Grid? >> > >> > Thanks. >> > >> > Andrew >> > >> > ________________________________ >> > Windows Live? Hotmail(R):?more than just e-mail. Check it out. >> > _______________________________________________ >> > Wtr-development mailing list >> > Wtr-development at rubyforge.org >> > http://rubyforge.org/mailman/listinfo/wtr-development >> > >> _______________________________________________ >> Wtr-development mailing list >> Wtr-development at rubyforge.org >> http://rubyforge.org/mailman/listinfo/wtr-development > > ________________________________ > Hotmail(R) goes where you go. On a PC, on the Web, on your phone. See how. > _______________________________________________ > Wtr-development mailing list > Wtr-development at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-development > From tim.koops at gmail.com Fri Jan 30 16:39:55 2009 From: tim.koops at gmail.com (Tim Koopmans) Date: Sat, 31 Jan 2009 08:39:55 +1100 Subject: [Wtr-development] (no subject) In-Reply-To: References: Message-ID: Ec2 has win2k3 and it's perfectly viable for GUI automation or load testing. I'm using it for the latter. Regards, Tim Sent from my mobile... On 31/01/2009, at 2:57, Paul Rogers wrote: > do you have any links to what guis are available on ec2. I know > windows server is available, burt my understanding is that it doesnt > give you the windows desktop. I guess under linux you could run > something like virtual box in headless mode and remote desktop in, but > I think it would be unusable from the client because of the speed. > > Paul > > On Thu, Jan 29, 2009 at 5:56 PM, Andrew McFarlane > wrote: >> EC2 allows you to use a GUI. It also now allows you to use a Windows >> image. I see that people are doing cross-browser testing on EC2, >> so why not >> do automated load tests that way? The app that I am testing is too >> complicated to model using a simulated browser tool like Jmeter. >> >> I'm headed down this path--I'll let you know how it goes. >> >> Andrew >> >>> Date: Thu, 29 Jan 2009 17:02:10 -0700 >>> From: paul.rogers at shaw.ca >>> To: wtr-development at rubyforge.org >>> Subject: Re: [Wtr-development] (no subject) >>> >>> ec2 only gives you a linux machine with no gui. Use a load testing >>> tool like jmeter >>> >>> Paul >>> >>> On Thu, Jan 29, 2009 at 12:18 PM, Andrew McFarlane >>> wrote: >>>> Has anyone thought about using Watir to do load testing using EC2 >>>> or >>>> something similar to Selenium Grid? >>>> >>>> Thanks. >>>> >>>> Andrew >>>> >>>> ________________________________ >>>> Windows Live? Hotmail(R):?more than just e-mail. Check it out. >>>> _______________________________________________ >>>> Wtr-development mailing list >>>> Wtr-development at rubyforge.org >>>> http://rubyforge.org/mailman/listinfo/wtr-development >>>> >>> _______________________________________________ >>> Wtr-development mailing list >>> Wtr-development at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/wtr-development >> >> ________________________________ >> Hotmail(R) goes where you go. On a PC, on the Web, on your phone. >> See how. >> _______________________________________________ >> Wtr-development mailing list >> Wtr-development at rubyforge.org >> http://rubyforge.org/mailman/listinfo/wtr-development >> > _______________________________________________ > Wtr-development mailing list > Wtr-development at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-development From welkin_inc at hotmail.com Fri Jan 2 10:36:03 2009 From: welkin_inc at hotmail.com (Andrew McFarlane) Date: Fri, 2 Jan 2009 08:36:03 -0700 Subject: [Wtr-development] FireWatir: container: js_eval: exception and javascript bugs? In-Reply-To: References: Message-ID: Angrez, I wrote a tiny bit of code (see below) that *should* have illustrated the problem, but FireWatir cannot find the link that I am attempting to click at the end of the code, although it does exist--FireWatir believes that it is on the previous ("searching") page. I even tried to do: browser.show_links(), and it said that there were 0 links on the page. I am a bit baffled. require 'rubygems' gem 'watir', '>=1.6.2' require 'watir' Watir::Browser.default = 'firefox' browser = Watir::Browser.new # Go to the home page browser.goto('http://www.frontierairlines.com') # Enter the origin city code. elem = browser.text_field(:id, 'flying_from') elem.value = 'DEN' elem.fire_event("onfocus") elem.fire_event('onKeyDown') sleep 0.2 elem.fire_event('onKeyUp') sleep 5 # Select the origin city description. browser.li(:class, 'ui-autocomplete-even ui-autocomplete-over').click # Enter the destination city code. elem = browser.text_field(:id, 'flying_to') elem.value = 'LAX' elem.fire_event("onfocus") elem.fire_event('onKeyDown') sleep 0.2 elem.fire_event('onKeyUp') sleep 5 # Select the destination city description. browser.li(:class, 'ui-autocomplete-even ui-autocomplete-over').click # Enter the departure date. date_leave = (Time.now() + 1*24*60*60).strftime('%m/%d/%Y') browser.text_field(:id, 'leaving').value = date_leave # Enter the return date. date_return = (Time.now() + 2*24*60*60).strftime('%m/%d/%Y') browser.text_field(:id, 'returning').value = date_return # Press the 'FIND FLIGHTS' image. browser.image(:id, 'findFlightsButton').click sleep 20 browser.link(:text, 'Start Over').click Andrew Date: Wed, 31 Dec 2008 12:02:20 +0530 From: angrez at gmail.com To: wtr-development at rubyforge.org Subject: Re: [Wtr-development] FireWatir: container: js_eval: exception and javascript bugs? Andrew, Can you post the code here which you were trying? - Angrez On Tue, Dec 30, 2008 at 8:42 PM, Bret Pettichord wrote: I'd like to have a better understanding of the cause of the problem first. Bret On Tue, Dec 30, 2008 at 12:25 AM, Angrez Singh wrote: Hi Bret, I didn't had a look into this but I was thinking if we try to locate element before every call, rather than using the old context. Like instead of storing the element name in some variable which gets obsolete when context changes we can try to find the element during each call. XPath works pretty fast in Firefox. I know there will be some speed issues but we will not be having much issues like this. Thoughts? - Angrez On Mon, Dec 29, 2008 at 9:42 PM, Bret Pettichord wrote: Clearly the code you fixed is incorrect. There is also clearly a larger problem. I don't have time right now to research this further. Can some one else help Andrew? Bret On Wed, Dec 24, 2008 at 2:46 PM, Andrew McFarlane wrote: I was running a test using Firewatir 1.6.2. I clicked on a link which navigates the user back to the home page. After clicking the link, I looked to make sure that the Close button on an "are-you-sure?" dialog was visible or not by making the call browser.link(:xpath, close_button_xpath).visible? Depending on which page of the application that one is on, pressing the home page link may either navigate directly to the home page or first display the "are-you-sure?" dialog before proceeding to the home page. When making the above method call, I saw the exception: c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/container.rb:497:in `raise': exception class/object expected (TypeError) This refers to the raise() method call shown in the container.rb code: if md = /^(\w+)Error:(.*)$/.match(value) eval "class JS#{md[1]}Error\nend" raise (eval "JS#{md[1]}Error"), md[2] end I changed the above container.rb code to: if md = /^(\w+)Error:(.*)$/.match(value) klass = Class.new Exception Object.const_set "JS#{md[1]}Error", klass raise klass, md[2] end so that I could see the exception get thrown. I then re-ran my test and saw the exception: c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/container.rb:498:in `js_eval': element_xpath_17 is not defined (Reference) from c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/mozilla_base_element.rb:1005:in `visible?' At this point, I'm stuck. I'm guessing that the javascript context got reset when navigating to a different page. Thanks for your help. Andrew Send e-mail faster without improving your typing skills. Get your Hotmail? account. _______________________________________________ Wtr-development mailing list Wtr-development at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-development -- Bret Pettichord GTalk: bpettichord at gmail.com CTO, WatirCraft LLC, http://www.watircraft.com Lead Developer, Watir, http://wtr.rubyforge.org Blog (Essays), http://www.io.com/~wazmo/blog MiniBlog (Links), http://feeds.feedburner.com/bretshotlist _______________________________________________ Wtr-development mailing list Wtr-development at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-development _______________________________________________ Wtr-development mailing list Wtr-development at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-development -- Bret Pettichord GTalk: bpettichord at gmail.com CTO, WatirCraft LLC, http://www.watircraft.com Lead Developer, Watir, http://wtr.rubyforge.org Blog (Essays), http://www.io.com/~wazmo/blog MiniBlog (Links), http://feeds.feedburner.com/bretshotlist _______________________________________________ Wtr-development mailing list Wtr-development at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-development _________________________________________________________________ It?s the same Hotmail?. If by ?same? you mean up to 70% faster. http://windowslive.com/online/hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_broad1_122008 -------------- next part -------------- An HTML attachment was scrubbed... URL: From angrez at gmail.com Mon Jan 5 00:32:21 2009 From: angrez at gmail.com (Angrez Singh) Date: Mon, 5 Jan 2009 11:02:21 +0530 Subject: [Wtr-development] FireWatir: container: js_eval: exception and javascript bugs? In-Reply-To: References: Message-ID: Andrew, Thanks for the code will look into the problem. - Angrez On Fri, Jan 2, 2009 at 9:06 PM, Andrew McFarlane wrote: > Angrez, > > I wrote a tiny bit of code (see below) that *should* have illustrated the > problem, but FireWatir cannot find the link that I am attempting to click at > the end of the code, although it does exist--FireWatir believes that it is > on the previous ("searching") page. I even tried to do: > browser.show_links(), and it said that there were 0 links on the page. I am > a bit baffled. > > require 'rubygems' > gem 'watir', '>=1.6.2' > require 'watir' > > > Watir::Browser.default = 'firefox' > browser = Watir::Browser.new > > # Go to the home page > browser.goto('http://www.frontierairlines.com') > > # Enter the origin city code. > elem = browser.text_field(:id, 'flying_from') > elem.value = 'DEN' > elem.fire_event("onfocus") > elem.fire_event('onKeyDown') > sleep 0.2 > elem.fire_event('onKeyUp') > sleep 5 > > # Select the origin city description. > browser.li(:class, 'ui-autocomplete-even ui-autocomplete-over').click > > # Enter the destination city code. > elem = browser.text_field(:id, 'flying_to') > elem.value = 'LAX' > elem.fire_event("onfocus") > elem.fire_event('onKeyDown') > sleep 0.2 > elem.fire_event('onKeyUp') > sleep 5 > > # Select the destination city description. > browser.li(:class, 'ui-autocomplete-even ui-autocomplete-over').click > > # Enter the departure date. > > date_leave = (Time.now() + 1*24*60*60).strftime('%m/%d/%Y') > browser.text_field(:id, 'leaving').value = date_leave > > # Enter the return date. > date_return = (Time.now() + 2*24*60*60).strftime('%m/%d/%Y') > browser.text_field(:id, 'returning').value = date_return > > # Press the 'FIND FLIGHTS' image. > browser.image(:id, 'findFlightsButton').click > > sleep 20 > > browser.link(:text, 'Start Over').click > > > Andrew > > > ------------------------------ > Date: Wed, 31 Dec 2008 12:02:20 +0530 > From: angrez at gmail.com > To: wtr-development at rubyforge.org > Subject: Re: [Wtr-development] FireWatir: container: js_eval: exception and > javascript bugs? > > > Andrew, > > Can you post the code here which you were trying? > > - Angrez > > On Tue, Dec 30, 2008 at 8:42 PM, Bret Pettichord wrote: > > I'd like to have a better understanding of the cause of the problem first. > > Bret > > > On Tue, Dec 30, 2008 at 12:25 AM, Angrez Singh wrote: > > Hi Bret, > > I didn't had a look into this but I was thinking if we try to locate > element before every call, rather than using the old context. Like instead > of storing the element name in some variable which gets obsolete when > context changes we can try to find the element during each call. XPath works > pretty fast in Firefox. I know there will be some speed issues but we will > not be having much issues like this. > > Thoughts? > > - Angrez > > > On Mon, Dec 29, 2008 at 9:42 PM, Bret Pettichord wrote: > > Clearly the code you fixed is incorrect. > > There is also clearly a larger problem. I don't have time right now to > research this further. Can some one else help Andrew? > > Bret > > On Wed, Dec 24, 2008 at 2:46 PM, Andrew McFarlane > wrote: > > I was running a test using Firewatir 1.6.2. > > I clicked on a link which navigates the user back to the home page. After > clicking the link, I looked to make sure that the Close button on an > "are-you-sure?" dialog was visible or not by making the call > browser.link(:xpath, close_button_xpath).visible? > > Depending on which page of the application that one is on, pressing the > home page link may either navigate directly to the home page or first > display the "are-you-sure?" dialog before proceeding to the home page. > > When making the above method call, I saw the exception: > > c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/container.rb:497:in > `raise': exception class/object expected (TypeError) > > This refers to the raise() method call shown in the container.rb code: > > if md = /^(\w+)Error:(.*)$/.match(value) > eval "class JS#{md[1]}Error\nend" > raise (eval "JS#{md[1]}Error"), md[2] > end > > I changed the above container.rb code to: > > if md = /^(\w+)Error:(.*)$/.match(value) > klass = Class.new Exception > Object.const_set "JS#{md[1]}Error", klass > raise klass, md[2] > end > > so that I could see the exception get thrown. > > I then re-ran my test and saw the exception: > > c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/container.rb:498:in > `js_eval': element_xpath_17 is not defined (Reference) > from > c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/mozilla_base_element.rb:1005:in > `visible?' > > At this point, I'm stuck. I'm guessing that the javascript context got > reset when navigating to a different page. > > Thanks for your help. > > Andrew > > > ------------------------------ > Send e-mail faster without improving your typing skills. Get your Hotmail(R) > account. > > _______________________________________________ > Wtr-development mailing list > Wtr-development at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-development > > > > > -- > Bret Pettichord > GTalk: bpettichord at gmail.com > CTO, WatirCraft LLC, http://www.watircraft.com > Lead Developer, Watir, http://wtr.rubyforge.org > Blog (Essays), http://www.io.com/~wazmo/blog > MiniBlog (Links), http://feeds.feedburner.com/bretshotlist > > _______________________________________________ > Wtr-development mailing list > Wtr-development at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-development > > > > _______________________________________________ > Wtr-development mailing list > Wtr-development at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-development > > > > > -- > Bret Pettichord > GTalk: bpettichord at gmail.com > CTO, WatirCraft LLC, http://www.watircraft.com > Lead Developer, Watir, http://wtr.rubyforge.org > Blog (Essays), http://www.io.com/~wazmo/blog > MiniBlog (Links), http://feeds.feedburner.com/bretshotlist > > _______________________________________________ > Wtr-development mailing list > Wtr-development at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-development > > > > ------------------------------ > It's the same Hotmail(R). If by "same" you mean up to 70% faster. Get your > account now. > > _______________________________________________ > Wtr-development mailing list > Wtr-development at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-development > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bret at pettichord.com Tue Jan 6 12:09:33 2009 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 6 Jan 2009 11:09:33 -0600 Subject: [Wtr-development] Could you test my test app? Message-ID: I've been developing several substansive examples of frameworks using Watir. They use the "depot" test application (rails). Today, i think i got the instructions nailed for how to set up and run the test app. I was wondering if someone could take a look at this and let me know whether they can use the following instructions to run the app: http://github.com/bret/framework-examples/tree/master/depot After you do this, you should see the page of the store. Bonus points for being able checkout (we'd seen a few problems at this point, which should now be fixed). (You can also try to run the various test suites at this point, but that's another matter.) Bret -- Bret Pettichord GTalk: bpettichord at gmail.com CTO, WatirCraft LLC, http://www.watircraft.com Lead Developer, Watir, http://wtr.rubyforge.org Blog (Essays), http://www.io.com/~wazmo/blog MiniBlog (Links), http://feeds.feedburner.com/bretshotlist -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.j.collins.02 at cantab.net Tue Jan 6 18:49:32 2009 From: a.j.collins.02 at cantab.net (Alex Collins) Date: Tue, 6 Jan 2009 23:49:32 +0000 Subject: [Wtr-development] Could you test my test app? In-Reply-To: References: Message-ID: Bret, Super stuff. I've followed your instructions. As I already have later versions of rails, I had a few issues. I have forked your tree and made a few minor updates to boot.rb, environment.rb and set the store application to be the default controller so that you can access it at http://localhost/ http://github.com/ajcollins/framework-examples/tree/master Checkout works for me. No luck with running tests: - Cannot install rasta gem (not found right now) - Currently heavily tied to Watir::IE which doesn't work on my mac! Other than that, looks like it will be very helpful! Hope this helps, Alex On 6 Jan 2009, at 17:09, Bret Pettichord wrote: > I've been developing several substansive examples of frameworks > using Watir. They use the "depot" test application (rails). > > Today, i think i got the instructions nailed for how to set up and > run the test app. > > I was wondering if someone could take a look at this and let me know > whether they can use the following instructions to run the app: > > http://github.com/bret/framework-examples/tree/master/depot > > After you do this, you should see the page of the store. Bonus > points for being able checkout (we'd seen a few problems at this > point, which should now be fixed). > > (You can also try to run the various test suites at this point, but > that's another matter.) > > Bret > > -- > Bret Pettichord > GTalk: bpettichord at gmail.com > CTO, WatirCraft LLC, http://www.watircraft.com > Lead Developer, Watir, http://wtr.rubyforge.org > Blog (Essays), http://www.io.com/~wazmo/blog > MiniBlog (Links), http://feeds.feedburner.com/bretshotlist > _______________________________________________ > Wtr-development mailing list > Wtr-development at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-development -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.j.collins.02 at gmail.com Tue Jan 6 18:50:22 2009 From: a.j.collins.02 at gmail.com (Alex Collins) Date: Tue, 6 Jan 2009 23:50:22 +0000 Subject: [Wtr-development] Could you test my test app? In-Reply-To: References: Message-ID: <37E7FDB3-205C-4618-9690-6FDD7FC72D2D@gmail.com> Bret, Super stuff. I've followed your instructions. As I already have later versions of rails, I had a few issues. I have forked your tree and made a few minor updates to boot.rb, environment.rb and set the store application to be the default controller so that you can access it at http://localhost/ http://github.com/ajcollins/framework-examples/tree/master Checkout works for me. No luck with running tests: - Cannot install rasta gem (not found right now) - Currently heavily tied to Watir::IE which doesn't work on my mac! Other than that, looks like it will be very helpful! Hope this helps, Alex On 6 Jan 2009, at 17:09, Bret Pettichord wrote: > I've been developing several substansive examples of frameworks > using Watir. They use the "depot" test application (rails). > > Today, i think i got the instructions nailed for how to set up and > run the test app. > > I was wondering if someone could take a look at this and let me know > whether they can use the following instructions to run the app: > > http://github.com/bret/framework-examples/tree/master/depot > > After you do this, you should see the page of the store. Bonus > points for being able checkout (we'd seen a few problems at this > point, which should now be fixed). > > (You can also try to run the various test suites at this point, but > that's another matter.) > > Bret > > -- > Bret Pettichord > GTalk: bpettichord at gmail.com > CTO, WatirCraft LLC, http://www.watircraft.com > Lead Developer, Watir, http://wtr.rubyforge.org > Blog (Essays), http://www.io.com/~wazmo/blog > MiniBlog (Links), http://feeds.feedburner.com/bretshotlist > _______________________________________________ > Wtr-development mailing list > Wtr-development at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-development -------------- next part -------------- An HTML attachment was scrubbed... URL: From bret at pettichord.com Wed Jan 7 17:25:06 2009 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 7 Jan 2009 16:25:06 -0600 Subject: [Wtr-development] Could you test my test app? In-Reply-To: References: Message-ID: Thanks. I will take a look at your fork. Sounds like you did some useful things. Rasta, right now, is based on Excel and OLE so therefore Windows-only. Next version will be based on Roo and work on Mac. I actually have a mac as well, but still do most of my test development on my windows vm. With time, i hope to move more of it to my Mac. Thanks for taking a look at this. Bret On Tue, Jan 6, 2009 at 5:49 PM, Alex Collins wrote: > Bret, > Super stuff. > > I've followed your instructions. As I already have later versions of rails, > I had a few issues. > > I have forked your tree and made a few minor updates to boot.rb, > environment.rb and set the store application to be the default controller so > that you can access it at http://localhost/ > > http://github.com/ajcollins/framework-examples/tree/master > > Checkout works for me. > > No luck with running tests: > - Cannot install rasta gem (not found right now) > - Currently heavily tied to Watir::IE which doesn't work on my mac! > > Other than that, looks like it will be very helpful! > > Hope this helps, > > Alex > > On 6 Jan 2009, at 17:09, Bret Pettichord wrote: > > I've been developing several substansive examples of frameworks using > Watir. They use the "depot" test application (rails). > > Today, i think i got the instructions nailed for how to set up and run the > test app. > > I was wondering if someone could take a look at this and let me know > whether they can use the following instructions to run the app: > > http://github.com/bret/framework-examples/tree/master/depot > > After you do this, you should see the page of the store. Bonus points for > being able checkout (we'd seen a few problems at this point, which should > now be fixed). > > (You can also try to run the various test suites at this point, but that's > another matter.) > > Bret > > -- > Bret Pettichord > GTalk: bpettichord at gmail.com > CTO, WatirCraft LLC, http://www.watircraft.com > Lead Developer, Watir, http://wtr.rubyforge.org > Blog (Essays), http://www.io.com/~wazmo/blog > MiniBlog (Links), http://feeds.feedburner.com/bretshotlist > _______________________________________________ > Wtr-development mailing list > Wtr-development at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-development > > > > _______________________________________________ > Wtr-development mailing list > Wtr-development at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-development > -- Bret Pettichord GTalk: bpettichord at gmail.com CTO, WatirCraft LLC, http://www.watircraft.com Lead Developer, Watir, http://wtr.rubyforge.org Blog (Essays), http://www.io.com/~wazmo/blog MiniBlog (Links), http://feeds.feedburner.com/bretshotlist -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.j.collins.02 at cantab.net Wed Jan 7 19:56:41 2009 From: a.j.collins.02 at cantab.net (Alex Collins) Date: Thu, 8 Jan 2009 00:56:41 +0000 Subject: [Wtr-development] Could you test my test app? In-Reply-To: References: Message-ID: <816944BE-75C3-4D2A-A49C-585655FF9992@cantab.net> No problem - more than happy to. Thank you for writing WATIR - it's made my life easier and is enjoyable to use. Let me know if I can be of any further assistance with this. Alex On 7 Jan 2009, at 22:25, Bret Pettichord wrote: > Thanks. I will take a look at your fork. Sounds like you did some > useful things. > > Rasta, right now, is based on Excel and OLE so therefore Windows- > only. Next version will be based on Roo and work on Mac. > > I actually have a mac as well, but still do most of my test > development on my windows vm. With time, i hope to move more of it > to my Mac. > > Thanks for taking a look at this. > > Bret > > > > On Tue, Jan 6, 2009 at 5:49 PM, Alex Collins > wrote: > Bret, > > Super stuff. > > I've followed your instructions. As I already have later versions of > rails, I had a few issues. > > I have forked your tree and made a few minor updates to boot.rb, > environment.rb and set the store application to be the default > controller so that you can access it at http://localhost/ > > http://github.com/ajcollins/framework-examples/tree/master > > Checkout works for me. > > No luck with running tests: > - Cannot install rasta gem (not found right now) > - Currently heavily tied to Watir::IE which doesn't work on my mac! > > Other than that, looks like it will be very helpful! > > Hope this helps, > > Alex > > On 6 Jan 2009, at 17:09, Bret Pettichord wrote: > >> I've been developing several substansive examples of frameworks >> using Watir. They use the "depot" test application (rails). >> >> Today, i think i got the instructions nailed for how to set up and >> run the test app. >> >> I was wondering if someone could take a look at this and let me >> know whether they can use the following instructions to run the app: >> >> http://github.com/bret/framework-examples/tree/master/depot >> >> After you do this, you should see the page of the store. Bonus >> points for being able checkout (we'd seen a few problems at this >> point, which should now be fixed). >> >> (You can also try to run the various test suites at this point, but >> that's another matter.) >> >> Bret >> >> -- >> Bret Pettichord >> GTalk: bpettichord at gmail.com >> CTO, WatirCraft LLC, http://www.watircraft.com >> Lead Developer, Watir, http://wtr.rubyforge.org >> Blog (Essays), http://www.io.com/~wazmo/blog >> MiniBlog (Links), http://feeds.feedburner.com/bretshotlist >> _______________________________________________ >> Wtr-development mailing list >> Wtr-development at rubyforge.org >> http://rubyforge.org/mailman/listinfo/wtr-development > > > _______________________________________________ > Wtr-development mailing list > Wtr-development at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-development > > > > -- > Bret Pettichord > GTalk: bpettichord at gmail.com > CTO, WatirCraft LLC, http://www.watircraft.com > Lead Developer, Watir, http://wtr.rubyforge.org > Blog (Essays), http://www.io.com/~wazmo/blog > MiniBlog (Links), http://feeds.feedburner.com/bretshotlist > _______________________________________________ > Wtr-development mailing list > Wtr-development at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-development -------------- next part -------------- An HTML attachment was scrubbed... URL: From anukul.singhal at gmail.com Wed Jan 7 20:24:52 2009 From: anukul.singhal at gmail.com (anukul singhal) Date: Wed, 7 Jan 2009 20:24:52 -0500 Subject: [Wtr-development] Reg. Clicking a Javascript popup using AutoIt Message-ID: Hi Angrez, I am providing you the html source and the screenshot of the web page (both attached) having a javascript dialog (with title as [JavaScript Application]), I tried using AutoIt's ControlClick method but it does not work, even the WinExists does not work. Can you please look into it? html source: Sample

Dialog (Click on the button):

Thanks, Anukul -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: js.JPG Type: image/jpeg Size: 15722 bytes Desc: not available URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: js_html.txt URL: From angrez at gmail.com Thu Jan 8 00:09:46 2009 From: angrez at gmail.com (Angrez Singh) Date: Thu, 8 Jan 2009 10:39:46 +0530 Subject: [Wtr-development] Reg. Clicking a Javascript popup using AutoIt In-Reply-To: References: Message-ID: Are you using it with watir or firewatir? - Angrez On Thu, Jan 8, 2009 at 6:54 AM, anukul singhal wrote: > Hi Angrez, > > I am providing you the html source and the screenshot of the web page (both > attached) having a javascript dialog (with title as [JavaScript > Application]), I tried using AutoIt's ControlClick method but it does not > work, even the WinExists does not work. Can you please look into it? > > html source: > > > > Sample > > > >

> Dialog (Click on the button):
>
> >

> > > > Thanks, > > Anukul > > > _______________________________________________ > Wtr-development mailing list > Wtr-development at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-development > -------------- next part -------------- An HTML attachment was scrubbed... URL: From anukul.singhal at gmail.com Thu Jan 8 05:20:37 2009 From: anukul.singhal at gmail.com (anukul singhal) Date: Thu, 8 Jan 2009 05:20:37 -0500 Subject: [Wtr-development] Reg. Clicking a Javascript popup using AutoIt In-Reply-To: References: Message-ID: Hi Angrez, This is with reference to firewatir. Thanks, Anukul On Thu, Jan 8, 2009 at 12:09 AM, Angrez Singh wrote: > Are you using it with watir or firewatir? > > - Angrez > > On Thu, Jan 8, 2009 at 6:54 AM, anukul singhal > wrote: > >> Hi Angrez, >> >> I am providing you the html source and the screenshot of the web page >> (both attached) having a javascript dialog (with title as [JavaScript >> Application]), I tried using AutoIt's ControlClick method but it does not >> work, even the WinExists does not work. Can you please look into it? >> >> html source: >> >> >> >> Sample >> >> >> >>

>> Dialog (Click on the button):
>>
>> >>

>> >> >> >> Thanks, >> >> Anukul >> >> >> _______________________________________________ >> Wtr-development mailing list >> Wtr-development at rubyforge.org >> http://rubyforge.org/mailman/listinfo/wtr-development >> > > > _______________________________________________ > Wtr-development mailing list > Wtr-development at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-development > -------------- next part -------------- An HTML attachment was scrubbed... URL: From anukul.singhal at gmail.com Thu Jan 8 06:13:39 2009 From: anukul.singhal at gmail.com (anukul singhal) Date: Thu, 8 Jan 2009 06:13:39 -0500 Subject: [Wtr-development] Finding the title of a JavaScript dialog in firewatir Message-ID: Hi Angrez, Is there any way that we can find the title of a javascript dialog using firewatir. I know that for finding the title of a browser, we can just do browser.title, but wanted to know if there is any similar way to find the title of a Javascript dialog? Thanks, Anukul -------------- next part -------------- An HTML attachment was scrubbed... URL: From angrez at gmail.com Thu Jan 8 06:40:09 2009 From: angrez at gmail.com (Angrez Singh) Date: Thu, 8 Jan 2009 17:10:09 +0530 Subject: [Wtr-development] Finding the title of a JavaScript dialog in firewatir In-Reply-To: References: Message-ID: All javascript alerts have same title which depends upon browser & its version. - Angrez On Thu, Jan 8, 2009 at 4:43 PM, anukul singhal wrote: > Hi Angrez, > > Is there any way that we can find the title of a javascript dialog using > firewatir. I know that for finding the title of a browser, we can just do > browser.title, but wanted to know if there is any similar way to find the > title of a Javascript dialog? > > Thanks, > Anukul > > _______________________________________________ > Wtr-development mailing list > Wtr-development at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-development > -------------- next part -------------- An HTML attachment was scrubbed... URL: From angrez at gmail.com Thu Jan 8 06:53:14 2009 From: angrez at gmail.com (Angrez Singh) Date: Thu, 8 Jan 2009 17:23:14 +0530 Subject: [Wtr-development] Reg. Clicking a Javascript popup using AutoIt In-Reply-To: References: Message-ID: You can have a look at the unit test cases for the same. Following code works for me . Firefox 3.0.5, firewatir 1.6.2 require 'firewatir' include FireWatir $br = FireWatir::Firefox.new $br.goto("file:///e:/extras/firewatir/jscript.html") btn = $br.button(:id, 'sbmtbtn') puts btn # Put the text of the javascript dialog as third argument, if text doesn't matches then you'll see the pop up else # ok button will be pressed. $br.startClicker("ok", 1, '', "Do you want to login to Infinity Inc. home page?") btn.click sleep 2 $br.close() - Angrez On Thu, Jan 8, 2009 at 3:50 PM, anukul singhal wrote: > Hi Angrez, > > This is with reference to firewatir. > > Thanks, > Anukul > > On Thu, Jan 8, 2009 at 12:09 AM, Angrez Singh wrote: > >> Are you using it with watir or firewatir? >> >> - Angrez >> >> On Thu, Jan 8, 2009 at 6:54 AM, anukul singhal < >> anukul.singhal at gmail.com> wrote: >> >>> Hi Angrez, >>> >>> I am providing you the html source and the screenshot of the web page >>> (both attached) having a javascript dialog (with title as [JavaScript >>> Application]), I tried using AutoIt's ControlClick method but it does not >>> work, even the WinExists does not work. Can you please look into it? >>> >>> html source: >>> >>> >>> >>> Sample >>> >>> >>> >>>

>>> Dialog (Click on the button):
>>>
>>> >>>

>>> >>> >>> >>> Thanks, >>> >>> Anukul >>> >>> >>> _______________________________________________ >>> Wtr-development mailing list >>> Wtr-development at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/wtr-development >>> >> >> >> _______________________________________________ >> Wtr-development mailing list >> Wtr-development at rubyforge.org >> http://rubyforge.org/mailman/listinfo/wtr-development >> > > > _______________________________________________ > Wtr-development mailing list > Wtr-development at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-development > -------------- next part -------------- An HTML attachment was scrubbed... URL: From anukul.singhal at gmail.com Thu Jan 8 11:51:50 2009 From: anukul.singhal at gmail.com (anukul singhal) Date: Thu, 8 Jan 2009 11:51:50 -0500 Subject: [Wtr-development] Reg. Clicking a Javascript popup using AutoIt In-Reply-To: References: Message-ID: Hi Angrez, Thanks for the reply, but am aware of the way to click a java script dialog using startClicker. My aim is to: 1. Click on the button (which pops up the dialog) 2. Then, after clicking on the button, need to click on the dialog using the ControlClick method of AutoIt. I am trying this code but it does not work: require 'firewatir' ff = FireWatir::Firefox.new ff.goto("file:///e:/extras/firewatir/jscript.html") ff.button(:id, "sbmtbtn").click sleep 3.0 cc = ff.ContolClick("[JavaScript Application]", "", "OK") puts cc It works until the popup comes but does not do anything on the dialog unless manually intervened. Can you help? Thanks, Anukul On Thu, Jan 8, 2009 at 6:53 AM, Angrez Singh wrote: > You can have a look at the unit test cases for the same. Following code > works for me . Firefox 3.0.5, firewatir 1.6.2 > > require 'firewatir' > include FireWatir > $br = FireWatir::Firefox.new > $br.goto("file:///e:/extras/firewatir/jscript.html") > btn = $br.button(:id, 'sbmtbtn') > puts btn > > # Put the text of the javascript dialog as third argument, if text doesn't > matches then you'll see the pop up else > # ok button will be pressed. > $br.startClicker("ok", 1, '', "Do you want to login to Infinity Inc. home > page?") > > btn.click > sleep 2 > $br.close() > > - Angrez > > > On Thu, Jan 8, 2009 at 3:50 PM, anukul singhal wrote: > >> Hi Angrez, >> >> This is with reference to firewatir. >> >> Thanks, >> Anukul >> >> On Thu, Jan 8, 2009 at 12:09 AM, Angrez Singh wrote: >> >>> Are you using it with watir or firewatir? >>> >>> - Angrez >>> >>> On Thu, Jan 8, 2009 at 6:54 AM, anukul singhal < >>> anukul.singhal at gmail.com> wrote: >>> >>>> Hi Angrez, >>>> >>>> I am providing you the html source and the screenshot of the web page >>>> (both attached) having a javascript dialog (with title as [JavaScript >>>> Application]), I tried using AutoIt's ControlClick method but it does not >>>> work, even the WinExists does not work. Can you please look into it? >>>> >>>> html source: >>>> >>>> >>>> >>>> Sample >>>> >>>> >>>> >>>>

>>>> Dialog (Click on the button):
>>>>
>>>> >>>>

>>>> >>>> >>>> >>>> Thanks, >>>> >>>> Anukul >>>> >>>> >>>> _______________________________________________ >>>> Wtr-development mailing list >>>> Wtr-development at rubyforge.org >>>> http://rubyforge.org/mailman/listinfo/wtr-development >>>> >>> >>> >>> _______________________________________________ >>> Wtr-development mailing list >>> Wtr-development at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/wtr-development >>> >> >> >> _______________________________________________ >> Wtr-development mailing list >> Wtr-development at rubyforge.org >> http://rubyforge.org/mailman/listinfo/wtr-development >> > > > _______________________________________________ > Wtr-development mailing list > Wtr-development at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-development > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bret at pettichord.com Thu Jan 8 12:23:48 2009 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 8 Jan 2009 11:23:48 -0600 Subject: [Wtr-development] Could you test my test app? In-Reply-To: References: Message-ID: Thanks for your changes; i pushed them into my master. They are also simplifying my life. I had been using a "special" version of ruby that only had the old versions of rails to run this. Now that is no longer necessary. I also like the change to the route. The rest of you should know that using git+github greatly simplified getting Alex's contributions into the main code base. Moments like this really make me see the benefits of git over svn. Bret On Tue, Jan 6, 2009 at 5:49 PM, Alex Collins wrote: > Bret, > Super stuff. > > I've followed your instructions. As I already have later versions of rails, > I had a few issues. > > I have forked your tree and made a few minor updates to boot.rb, > environment.rb and set the store application to be the default controller so > that you can access it at http://localhost/ > > http://github.com/ajcollins/framework-examples/tree/master > > Checkout works for me. > > No luck with running tests: > - Cannot install rasta gem (not found right now) > - Currently heavily tied to Watir::IE which doesn't work on my mac! > > Other than that, looks like it will be very helpful! > > Hope this helps, > > Alex > > On 6 Jan 2009, at 17:09, Bret Pettichord wrote: > > I've been developing several substansive examples of frameworks using > Watir. They use the "depot" test application (rails). > > Today, i think i got the instructions nailed for how to set up and run the > test app. > > I was wondering if someone could take a look at this and let me know > whether they can use the following instructions to run the app: > > http://github.com/bret/framework-examples/tree/master/depot > > After you do this, you should see the page of the store. Bonus points for > being able checkout (we'd seen a few problems at this point, which should > now be fixed). > > (You can also try to run the various test suites at this point, but that's > another matter.) > > Bret > > -- > Bret Pettichord > GTalk: bpettichord at gmail.com > CTO, WatirCraft LLC, http://www.watircraft.com > Lead Developer, Watir, http://wtr.rubyforge.org > Blog (Essays), http://www.io.com/~wazmo/blog > MiniBlog (Links), http://feeds.feedburner.com/bretshotlist > _______________________________________________ > Wtr-development mailing list > Wtr-development at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-development > > > > _______________________________________________ > Wtr-development mailing list > Wtr-development at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-development > -- Bret Pettichord GTalk: bpettichord at gmail.com CTO, WatirCraft LLC, http://www.watircraft.com Lead Developer, Watir, http://wtr.rubyforge.org Blog (Essays), http://www.io.com/~wazmo/blog MiniBlog (Links), http://feeds.feedburner.com/bretshotlist -------------- next part -------------- An HTML attachment was scrubbed... URL: From bernerbits at gmail.com Thu Jan 8 13:02:59 2009 From: bernerbits at gmail.com (Derek Berner) Date: Thu, 8 Jan 2009 12:02:59 -0600 Subject: [Wtr-development] Patch for winClicker.rb Message-ID: <677955230901081002h3e774704j4bb0bfe29f39b4ca@mail.gmail.com> In investigating why my clicker would randomly stop working in IE, I discovered that the DL callbacks were not getting freed properly, despite previous attempts to fix them. This patch extracts the DL functionality out into its own method and uses an "ensure" block to guarantee that the callbacks are freed, even if an exception occurs. I generated this patch using svn diff on rev. 1663 of the repository at https://svn.openqa.org/svn/watir/trunk. -------------- next part -------------- A non-text attachment was scrubbed... Name: clickerfix.patch Type: text/x-patch Size: 4209 bytes Desc: not available URL: From bret at pettichord.com Thu Jan 8 13:41:58 2009 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 8 Jan 2009 12:41:58 -0600 Subject: [Wtr-development] Could you test my test app? In-Reply-To: References: Message-ID: Alex, Why do you say In each test directory, run: rake -f where is replaced with the name of the Rakefile eg Rakefile, rakefile.rb etc I don't have to do this. I just do "rake" and it finds whatever rakefile there is. I'm happy to standardize the types of rakefiles used -- is there a preference? I guess i like using rakefile.rb because that makes it easy for editors to know that it is ruby. But i haven't really seen this as a possible complication -- not yet. So i want to know if there is something we can do to make this simpler. Bret On Wed, Jan 7, 2009 at 4:25 PM, Bret Pettichord wrote: > Thanks. I will take a look at your fork. Sounds like you did some useful > things. > > Rasta, right now, is based on Excel and OLE so therefore Windows-only. Next > version will be based on Roo and work on Mac. > > I actually have a mac as well, but still do most of my test development on > my windows vm. With time, i hope to move more of it to my Mac. > > Thanks for taking a look at this. > > Bret > > > > > On Tue, Jan 6, 2009 at 5:49 PM, Alex Collins wrote: > >> Bret, >> Super stuff. >> >> I've followed your instructions. As I already have later versions of >> rails, I had a few issues. >> >> I have forked your tree and made a few minor updates to boot.rb, >> environment.rb and set the store application to be the default controller so >> that you can access it at http://localhost/ >> >> http://github.com/ajcollins/framework-examples/tree/master >> >> Checkout works for me. >> >> No luck with running tests: >> - Cannot install rasta gem (not found right now) >> - Currently heavily tied to Watir::IE which doesn't work on my mac! >> >> Other than that, looks like it will be very helpful! >> >> Hope this helps, >> >> Alex >> >> On 6 Jan 2009, at 17:09, Bret Pettichord wrote: >> >> I've been developing several substansive examples of frameworks using >> Watir. They use the "depot" test application (rails). >> >> Today, i think i got the instructions nailed for how to set up and run the >> test app. >> >> I was wondering if someone could take a look at this and let me know >> whether they can use the following instructions to run the app: >> >> http://github.com/bret/framework-examples/tree/master/depot >> >> After you do this, you should see the page of the store. Bonus points for >> being able checkout (we'd seen a few problems at this point, which should >> now be fixed). >> >> (You can also try to run the various test suites at this point, but that's >> another matter.) >> >> Bret >> >> -- >> Bret Pettichord >> GTalk: bpettichord at gmail.com >> CTO, WatirCraft LLC, http://www.watircraft.com >> Lead Developer, Watir, http://wtr.rubyforge.org >> Blog (Essays), http://www.io.com/~wazmo/blog >> MiniBlog (Links), http://feeds.feedburner.com/bretshotlist >> _______________________________________________ >> Wtr-development mailing list >> Wtr-development at rubyforge.org >> http://rubyforge.org/mailman/listinfo/wtr-development >> >> >> >> _______________________________________________ >> Wtr-development mailing list >> Wtr-development at rubyforge.org >> http://rubyforge.org/mailman/listinfo/wtr-development >> > > > > -- > Bret Pettichord > GTalk: bpettichord at gmail.com > CTO, WatirCraft LLC, http://www.watircraft.com > Lead Developer, Watir, http://wtr.rubyforge.org > Blog (Essays), http://www.io.com/~wazmo/blog > MiniBlog (Links), http://feeds.feedburner.com/bretshotlist > -- Bret Pettichord GTalk: bpettichord at gmail.com CTO, WatirCraft LLC, http://www.watircraft.com Lead Developer, Watir, http://wtr.rubyforge.org Blog (Essays), http://www.io.com/~wazmo/blog MiniBlog (Links), http://feeds.feedburner.com/bretshotlist -------------- next part -------------- An HTML attachment was scrubbed... URL: From charley.baker at gmail.com Thu Jan 8 15:31:42 2009 From: charley.baker at gmail.com (Charley Baker) Date: Thu, 8 Jan 2009 13:31:42 -0700 Subject: [Wtr-development] Patch for winClicker.rb In-Reply-To: <677955230901081002h3e774704j4bb0bfe29f39b4ca@mail.gmail.com> References: <677955230901081002h3e774704j4bb0bfe29f39b4ca@mail.gmail.com> Message-ID: I took a brief look at the patch, it seems reasonable. I'll take a closer look at it later, and likely add it to WinClicker. In general this area is an eyesore and unfortunately not well tested - there's one unit test for using it to close popups. :( Thanks for taking the time to work on a fix. Charley Baker blog: http://charleybakersblog.blogspot.com/ Project Manager, Watir, http://wtr.rubyforge.org QA Architect, Gap Inc Direct On Thu, Jan 8, 2009 at 11:02 AM, Derek Berner wrote: > In investigating why my clicker would randomly stop working in IE, I > discovered that the DL callbacks were not getting freed properly, > despite previous attempts to fix them. > > This patch extracts the DL functionality out into its own method and > uses an "ensure" block to guarantee that the callbacks are freed, even > if an exception occurs. > > I generated this patch using svn diff on rev. 1663 of the repository > at https://svn.openqa.org/svn/watir/trunk. > > _______________________________________________ > Wtr-development mailing list > Wtr-development at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-development > -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.j.collins.02 at cantab.net Thu Jan 8 16:41:28 2009 From: a.j.collins.02 at cantab.net (Alex Collins) Date: Thu, 8 Jan 2009 21:41:28 +0000 Subject: [Wtr-development] Could you test my test app? In-Reply-To: References: Message-ID: How jolly odd. It should be the case that rake looks for: rakefile, Rakefile, rakefile.rb, Rakefile.rb But for some reason it wasn't working for me at the time... so I added the switch and note as much for my benefit. It works as it ought to now. I think that change should probably be backed out given this information. I agree with your preference for rakefile.rb, but rails etc seem to go with Rakefile. Given rake's defaults, it is probably only worth worry about when having multiple examples together, purely for consistency. Alex On 8 Jan 2009, at 18:41, Bret Pettichord wrote: > Alex, > > Why do you say > > In each test directory, run: > rake -f > where is replaced with the name of the Rakefile eg > Rakefile, rakefile.rb etc > > I don't have to do this. I just do "rake" and it finds whatever > rakefile there is. > > I'm happy to standardize the types of rakefiles used -- is there a > preference? I guess i like using rakefile.rb because that makes it > easy for editors to know that it is ruby. > > But i haven't really seen this as a possible complication -- not > yet. So i want to know if there is something we can do to make this > simpler. > > Bret > > On Wed, Jan 7, 2009 at 4:25 PM, Bret Pettichord > wrote: > Thanks. I will take a look at your fork. Sounds like you did some > useful things. > > Rasta, right now, is based on Excel and OLE so therefore Windows- > only. Next version will be based on Roo and work on Mac. > > I actually have a mac as well, but still do most of my test > development on my windows vm. With time, i hope to move more of it > to my Mac. > > Thanks for taking a look at this. > > Bret > > > > > On Tue, Jan 6, 2009 at 5:49 PM, Alex Collins > wrote: > Bret, > > Super stuff. > > I've followed your instructions. As I already have later versions of > rails, I had a few issues. > > I have forked your tree and made a few minor updates to boot.rb, > environment.rb and set the store application to be the default > controller so that you can access it at http://localhost/ > > http://github.com/ajcollins/framework-examples/tree/master > > Checkout works for me. > > No luck with running tests: > - Cannot install rasta gem (not found right now) > - Currently heavily tied to Watir::IE which doesn't work on my mac! > > Other than that, looks like it will be very helpful! > > Hope this helps, > > Alex > > On 6 Jan 2009, at 17:09, Bret Pettichord wrote: > >> I've been developing several substansive examples of frameworks >> using Watir. They use the "depot" test application (rails). >> >> Today, i think i got the instructions nailed for how to set up and >> run the test app. >> >> I was wondering if someone could take a look at this and let me >> know whether they can use the following instructions to run the app: >> >> http://github.com/bret/framework-examples/tree/master/depot >> >> After you do this, you should see the page of the store. Bonus >> points for being able checkout (we'd seen a few problems at this >> point, which should now be fixed). >> >> (You can also try to run the various test suites at this point, but >> that's another matter.) >> >> Bret >> >> -- >> Bret Pettichord >> GTalk: bpettichord at gmail.com >> CTO, WatirCraft LLC, http://www.watircraft.com >> Lead Developer, Watir, http://wtr.rubyforge.org >> Blog (Essays), http://www.io.com/~wazmo/blog >> MiniBlog (Links), http://feeds.feedburner.com/bretshotlist >> _______________________________________________ >> Wtr-development mailing list >> Wtr-development at rubyforge.org >> http://rubyforge.org/mailman/listinfo/wtr-development > > > _______________________________________________ > Wtr-development mailing list > Wtr-development at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-development > > > > -- > Bret Pettichord > GTalk: bpettichord at gmail.com > CTO, WatirCraft LLC, http://www.watircraft.com > Lead Developer, Watir, http://wtr.rubyforge.org > Blog (Essays), http://www.io.com/~wazmo/blog > MiniBlog (Links), http://feeds.feedburner.com/bretshotlist > > > > -- > Bret Pettichord > GTalk: bpettichord at gmail.com > CTO, WatirCraft LLC, http://www.watircraft.com > Lead Developer, Watir, http://wtr.rubyforge.org > Blog (Essays), http://www.io.com/~wazmo/blog > MiniBlog (Links), http://feeds.feedburner.com/bretshotlist > _______________________________________________ > Wtr-development mailing list > Wtr-development at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-development -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.j.collins.02 at cantab.net Thu Jan 8 16:47:53 2009 From: a.j.collins.02 at cantab.net (Alex Collins) Date: Thu, 8 Jan 2009 21:47:53 +0000 Subject: [Wtr-development] Could you test my test app? In-Reply-To: References: Message-ID: <361F4C78-8A7A-48A1-8760-C271CEB88FD6@cantab.net> On 8 Jan 2009, at 17:23, Bret Pettichord wrote: > Thanks for your changes; i pushed them into my master. They are also > simplifying my life. I had been using a "special" version of ruby > that only had the old versions of rails to run this. Now that is no > longer necessary. I also like the change to the Excellent - it was a fun little activity. > The rest of you should know that using git+github greatly simplified > getting Alex's contributions into the main code base. Moments like > this really make me see the benefits of git over svn. It was incredibly easy - I was surprised - I didn't have a github account, but it didn't take very long at all. Most enjoyable compared to sending patches / asking for commit rights. Alex From angrez at gmail.com Fri Jan 9 02:30:48 2009 From: angrez at gmail.com (Angrez Singh) Date: Fri, 9 Jan 2009 13:00:48 +0530 Subject: [Wtr-development] Reg. Clicking a Javascript popup using AutoIt In-Reply-To: References: Message-ID: But question here is why you want to use AutoIt when it is there in Firewatir? - Angrez On Thu, Jan 8, 2009 at 10:21 PM, anukul singhal wrote: > Hi Angrez, > Thanks for the reply, but am aware of the way to click a java script dialog > using startClicker. My aim is to: > > 1. Click on the button (which pops up the dialog) > 2. Then, after clicking on the button, need to click on the dialog using > the ControlClick method of AutoIt. > > I am trying this code but it does not work: > > require 'firewatir' > > ff = FireWatir::Firefox.new > ff.goto("file:///e:/extras/firewatir/jscript.html") > ff.button(:id, "sbmtbtn").click > sleep 3.0 > cc = ff.ContolClick("[JavaScript Application]", "", "OK") > puts cc > > It works until the popup comes but does not do anything on the dialog > unless manually intervened. > > Can you help? > > Thanks, > Anukul > > > On Thu, Jan 8, 2009 at 6:53 AM, Angrez Singh wrote: > >> You can have a look at the unit test cases for the same. Following code >> works for me . Firefox 3.0.5, firewatir 1.6.2 >> >> require 'firewatir' >> include FireWatir >> $br = FireWatir::Firefox.new >> $br.goto("file:///e:/extras/firewatir/jscript.html") >> btn = $br.button(:id, 'sbmtbtn') >> puts btn >> >> # Put the text of the javascript dialog as third argument, if text doesn't >> matches then you'll see the pop up else >> # ok button will be pressed. >> $br.startClicker("ok", 1, '', "Do you want to login to Infinity Inc. home >> page?") >> >> btn.click >> sleep 2 >> $br.close() >> >> - Angrez >> >> >> On Thu, Jan 8, 2009 at 3:50 PM, anukul singhal wrote: >> >>> Hi Angrez, >>> >>> This is with reference to firewatir. >>> >>> Thanks, >>> Anukul >>> >>> On Thu, Jan 8, 2009 at 12:09 AM, Angrez Singh wrote: >>> >>>> Are you using it with watir or firewatir? >>>> >>>> - Angrez >>>> >>>> On Thu, Jan 8, 2009 at 6:54 AM, anukul singhal < >>>> anukul.singhal at gmail.com> wrote: >>>> >>>>> Hi Angrez, >>>>> >>>>> I am providing you the html source and the screenshot of the web page >>>>> (both attached) having a javascript dialog (with title as [JavaScript >>>>> Application]), I tried using AutoIt's ControlClick method but it does not >>>>> work, even the WinExists does not work. Can you please look into it? >>>>> >>>>> html source: >>>>> >>>>> >>>>> >>>>> Sample >>>>> >>>>> >>>>> >>>>>

>>>>> Dialog (Click on the button):
>>>>>
>>>>> >>>>>

>>>>> >>>>> >>>>> >>>>> Thanks, >>>>> >>>>> Anukul >>>>> >>>>> >>>>> _______________________________________________ >>>>> Wtr-development mailing list >>>>> Wtr-development at rubyforge.org >>>>> http://rubyforge.org/mailman/listinfo/wtr-development >>>>> >>>> >>>> >>>> _______________________________________________ >>>> Wtr-development mailing list >>>> Wtr-development at rubyforge.org >>>> http://rubyforge.org/mailman/listinfo/wtr-development >>>> >>> >>> >>> _______________________________________________ >>> Wtr-development mailing list >>> Wtr-development at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/wtr-development >>> >> >> >> _______________________________________________ >> Wtr-development mailing list >> Wtr-development at rubyforge.org >> http://rubyforge.org/mailman/listinfo/wtr-development >> > > > _______________________________________________ > Wtr-development mailing list > Wtr-development at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-development > -------------- next part -------------- An HTML attachment was scrubbed... URL: From saidesertrose2004 at gmail.com Fri Jan 9 08:18:14 2009 From: saidesertrose2004 at gmail.com (Sai Venkatakrishnan) Date: Fri, 9 Jan 2009 18:48:14 +0530 Subject: [Wtr-development] Announcing the release of ChromeWatir Message-ID: We are happy to announce that the first version of ChromeWatir has been released today. The API follows a similar convention to Watir and is for Google Chrome browser. Please visit the ChromeWatir Google code for more details http://code.google.com/p/chrome-watir We are in the process of making it better by stabilizing it as well adding more functionality. The first release is available as gem as well as source in the downloads page. Please have a try and give the feedback. Regards, Sai and Jijesh -------------- next part -------------- An HTML attachment was scrubbed... URL: From anukul.singhal at gmail.com Sat Jan 10 06:26:10 2009 From: anukul.singhal at gmail.com (anukul singhal) Date: Sat, 10 Jan 2009 06:26:10 -0500 Subject: [Wtr-development] Reg. Clicking a Javascript popup using AutoIt In-Reply-To: References: Message-ID: Hi Angrez, You are right with this question but consider this scenario: 1. Say we have a login portal. 2. User enters his username and password. 3. Clicks on submit button. 4. Then, a javascript pop-up appears (like company propietary pop-ups which come up when you login to their applications) 5. User clicks "OK" on that pop-up. 6. Arrives on the home page. Now, the user to automate this will follow the flow: 1. Writes the script to navigate to the url of the login page. 2. Sets the value in the text fields (user name and password) 3. Performs click operation on submit button 4. Confirms that a pop-up is showed up, if its does, clicks "OK", if it does not, the navigation will goto the home page. 5. On pressing "OK", navigation to home page takes place. Now, I have some questions for you, let me know which one makes sense: 1. When you want to automate the above scenario, wouldn't you go by the flow? (the sequence in which object appears) 2. How can we assume that a dialog appears even before we perform an operation on it? Would a normal automation engineer think in this way? In other tools like Watir, QTP, you are allowed to follow the sequence which makes it more intuitive. 3. I see that in your source code, you did try to involve "click_no_wait" method, which probably was the right approach, was there some limitation in jssh to not use it? 4. Are AutoItX3 functions supported by dialogs or not? Thanks, Anukul On Fri, Jan 9, 2009 at 2:30 AM, Angrez Singh wrote: > But question here is why you want to use AutoIt when it is there in > Firewatir? > > - Angrez > > > On Thu, Jan 8, 2009 at 10:21 PM, anukul singhal wrote: > >> Hi Angrez, >> Thanks for the reply, but am aware of the way to click a java script >> dialog using startClicker. My aim is to: >> >> 1. Click on the button (which pops up the dialog) >> 2. Then, after clicking on the button, need to click on the dialog using >> the ControlClick method of AutoIt. >> >> I am trying this code but it does not work: >> >> require 'firewatir' >> >> ff = FireWatir::Firefox.new >> ff.goto("file:///e:/extras/firewatir/jscript.html") >> ff.button(:id, "sbmtbtn").click >> sleep 3.0 >> cc = ff.ContolClick("[JavaScript Application]", "", "OK") >> puts cc >> >> It works until the popup comes but does not do anything on the dialog >> unless manually intervened. >> >> Can you help? >> >> Thanks, >> Anukul >> >> >> On Thu, Jan 8, 2009 at 6:53 AM, Angrez Singh wrote: >> >>> You can have a look at the unit test cases for the same. Following code >>> works for me . Firefox 3.0.5, firewatir 1.6.2 >>> >>> require 'firewatir' >>> include FireWatir >>> $br = FireWatir::Firefox.new >>> $br.goto("file:///e:/extras/firewatir/jscript.html") >>> btn = $br.button(:id, 'sbmtbtn') >>> puts btn >>> >>> # Put the text of the javascript dialog as third argument, if text >>> doesn't matches then you'll see the pop up else >>> # ok button will be pressed. >>> $br.startClicker("ok", 1, '', "Do you want to login to Infinity Inc. home >>> page?") >>> >>> btn.click >>> sleep 2 >>> $br.close() >>> >>> - Angrez >>> >>> >>> On Thu, Jan 8, 2009 at 3:50 PM, anukul singhal >> > wrote: >>> >>>> Hi Angrez, >>>> >>>> This is with reference to firewatir. >>>> >>>> Thanks, >>>> Anukul >>>> >>>> On Thu, Jan 8, 2009 at 12:09 AM, Angrez Singh wrote: >>>> >>>>> Are you using it with watir or firewatir? >>>>> >>>>> - Angrez >>>>> >>>>> On Thu, Jan 8, 2009 at 6:54 AM, anukul singhal < >>>>> anukul.singhal at gmail.com> wrote: >>>>> >>>>>> Hi Angrez, >>>>>> >>>>>> I am providing you the html source and the screenshot of the web page >>>>>> (both attached) having a javascript dialog (with title as [JavaScript >>>>>> Application]), I tried using AutoIt's ControlClick method but it does not >>>>>> work, even the WinExists does not work. Can you please look into it? >>>>>> >>>>>> html source: >>>>>> >>>>>> >>>>>> >>>>>> Sample >>>>>> >>>>>> >>>>>> >>>>>>

>>>>>> Dialog (Click on the button):
>>>>>>
>>>>>> >>>>>>

>>>>>> >>>>>> >>>>>> >>>>>> Thanks, >>>>>> >>>>>> Anukul >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Wtr-development mailing list >>>>>> Wtr-development at rubyforge.org >>>>>> http://rubyforge.org/mailman/listinfo/wtr-development >>>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Wtr-development mailing list >>>>> Wtr-development at rubyforge.org >>>>> http://rubyforge.org/mailman/listinfo/wtr-development >>>>> >>>> >>>> >>>> _______________________________________________ >>>> Wtr-development mailing list >>>> Wtr-development at rubyforge.org >>>> http://rubyforge.org/mailman/listinfo/wtr-development >>>> >>> >>> >>> _______________________________________________ >>> Wtr-development mailing list >>> Wtr-development at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/wtr-development >>> >> >> >> _______________________________________________ >> Wtr-development mailing list >> Wtr-development at rubyforge.org >> http://rubyforge.org/mailman/listinfo/wtr-development >> > > > _______________________________________________ > Wtr-development mailing list > Wtr-development at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-development > -------------- next part -------------- An HTML attachment was scrubbed... URL: From angrez at gmail.com Mon Jan 12 02:10:47 2009 From: angrez at gmail.com (Angrez Singh) Date: Mon, 12 Jan 2009 12:40:47 +0530 Subject: [Wtr-development] Reg. Clicking a Javascript popup using AutoIt In-Reply-To: References: Message-ID: Only reason for using "click_no_wait" is that when you click a button which invokes javascript JSSh waits for user input. So after clicking there is no way to invoke jssh as it is blocked. - Angrez On Sat, Jan 10, 2009 at 4:56 PM, anukul singhal wrote: > Hi Angrez, > > You are right with this question but consider this scenario: > > 1. Say we have a login portal. > 2. User enters his username and password. > 3. Clicks on submit button. > 4. Then, a javascript pop-up appears (like company propietary pop-ups which > come up when you login to their applications) > 5. User clicks "OK" on that pop-up. > 6. Arrives on the home page. > > Now, the user to automate this will follow the flow: > > 1. Writes the script to navigate to the url of the login page. > 2. Sets the value in the text fields (user name and password) > 3. Performs click operation on submit button > 4. Confirms that a pop-up is showed up, if its does, clicks "OK", if it > does not, the navigation will goto the home page. > 5. On pressing "OK", navigation to home page takes place. > > Now, I have some questions for you, let me know which one makes sense: > > 1. When you want to automate the above scenario, wouldn't you go by the > flow? (the sequence in which object appears) > 2. How can we assume that a dialog appears even before we perform an > operation on it? Would a normal automation engineer think in this way? In > other tools like Watir, QTP, you are allowed to follow the sequence which > makes it more intuitive. > 3. I see that in your source code, you did try to involve "click_no_wait" > method, which probably was the right approach, was there some limitation in > jssh to not use it? > 4. Are AutoItX3 functions supported by dialogs or not? > > Thanks, > Anukul > > On Fri, Jan 9, 2009 at 2:30 AM, Angrez Singh wrote: > >> But question here is why you want to use AutoIt when it is there in >> Firewatir? >> >> - Angrez >> >> >> On Thu, Jan 8, 2009 at 10:21 PM, anukul singhal > > wrote: >> >>> Hi Angrez, >>> Thanks for the reply, but am aware of the way to click a java script >>> dialog using startClicker. My aim is to: >>> >>> 1. Click on the button (which pops up the dialog) >>> 2. Then, after clicking on the button, need to click on the dialog using >>> the ControlClick method of AutoIt. >>> >>> I am trying this code but it does not work: >>> >>> require 'firewatir' >>> >>> ff = FireWatir::Firefox.new >>> ff.goto("file:///e:/extras/firewatir/jscript.html") >>> ff.button(:id, "sbmtbtn").click >>> sleep 3.0 >>> cc = ff.ContolClick("[JavaScript Application]", "", "OK") >>> puts cc >>> >>> It works until the popup comes but does not do anything on the dialog >>> unless manually intervened. >>> >>> Can you help? >>> >>> Thanks, >>> Anukul >>> >>> >>> On Thu, Jan 8, 2009 at 6:53 AM, Angrez Singh wrote: >>> >>>> You can have a look at the unit test cases for the same. Following code >>>> works for me . Firefox 3.0.5, firewatir 1.6.2 >>>> >>>> require 'firewatir' >>>> include FireWatir >>>> $br = FireWatir::Firefox.new >>>> $br.goto("file:///e:/extras/firewatir/jscript.html") >>>> btn = $br.button(:id, 'sbmtbtn') >>>> puts btn >>>> >>>> # Put the text of the javascript dialog as third argument, if text >>>> doesn't matches then you'll see the pop up else >>>> # ok button will be pressed. >>>> $br.startClicker("ok", 1, '', "Do you want to login to Infinity Inc. >>>> home page?") >>>> >>>> btn.click >>>> sleep 2 >>>> $br.close() >>>> >>>> - Angrez >>>> >>>> >>>> On Thu, Jan 8, 2009 at 3:50 PM, anukul singhal < >>>> anukul.singhal at gmail.com> wrote: >>>> >>>>> Hi Angrez, >>>>> >>>>> This is with reference to firewatir. >>>>> >>>>> Thanks, >>>>> Anukul >>>>> >>>>> On Thu, Jan 8, 2009 at 12:09 AM, Angrez Singh wrote: >>>>> >>>>>> Are you using it with watir or firewatir? >>>>>> >>>>>> - Angrez >>>>>> >>>>>> On Thu, Jan 8, 2009 at 6:54 AM, anukul singhal < >>>>>> anukul.singhal at gmail.com> wrote: >>>>>> >>>>>>> Hi Angrez, >>>>>>> >>>>>>> I am providing you the html source and the screenshot of the web page >>>>>>> (both attached) having a javascript dialog (with title as [JavaScript >>>>>>> Application]), I tried using AutoIt's ControlClick method but it does not >>>>>>> work, even the WinExists does not work. Can you please look into it? >>>>>>> >>>>>>> html source: >>>>>>> >>>>>>> >>>>>>> >>>>>>> Sample >>>>>>> >>>>>>> >>>>>>> >>>>>>>

>>>>>>> Dialog (Click on the button):
>>>>>>>
>>>>>>> >>>>>>>

>>>>>>> >>>>>>> >>>>>>> >>>>>>> Thanks, >>>>>>> >>>>>>> Anukul >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Wtr-development mailing list >>>>>>> Wtr-development at rubyforge.org >>>>>>> http://rubyforge.org/mailman/listinfo/wtr-development >>>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Wtr-development mailing list >>>>>> Wtr-development at rubyforge.org >>>>>> http://rubyforge.org/mailman/listinfo/wtr-development >>>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Wtr-development mailing list >>>>> Wtr-development at rubyforge.org >>>>> http://rubyforge.org/mailman/listinfo/wtr-development >>>>> >>>> >>>> >>>> _______________________________________________ >>>> Wtr-development mailing list >>>> Wtr-development at rubyforge.org >>>> http://rubyforge.org/mailman/listinfo/wtr-development >>>> >>> >>> >>> _______________________________________________ >>> Wtr-development mailing list >>> Wtr-development at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/wtr-development >>> >> >> >> _______________________________________________ >> Wtr-development mailing list >> Wtr-development at rubyforge.org >> http://rubyforge.org/mailman/listinfo/wtr-development >> > > > _______________________________________________ > Wtr-development mailing list > Wtr-development at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-development > -------------- next part -------------- An HTML attachment was scrubbed... URL: From anukul.singhal at gmail.com Mon Jan 12 13:55:47 2009 From: anukul.singhal at gmail.com (anukul singhal) Date: Mon, 12 Jan 2009 12:55:47 -0600 Subject: [Wtr-development] Reg. Clicking a Javascript popup using AutoIt In-Reply-To: References: Message-ID: Thanks Angrez, just clarify one more question, are AutoItX3 functions supported by javascript dialogs or not? On Mon, Jan 12, 2009 at 1:10 AM, Angrez Singh wrote: > Only reason for using "click_no_wait" is that when you click a button which > invokes javascript JSSh waits for user input. So after clicking there is no > way to invoke jssh as it is blocked. > > - Angrez > > > On Sat, Jan 10, 2009 at 4:56 PM, anukul singhal wrote: > >> Hi Angrez, >> >> You are right with this question but consider this scenario: >> >> 1. Say we have a login portal. >> 2. User enters his username and password. >> 3. Clicks on submit button. >> 4. Then, a javascript pop-up appears (like company propietary pop-ups >> which come up when you login to their applications) >> 5. User clicks "OK" on that pop-up. >> 6. Arrives on the home page. >> >> Now, the user to automate this will follow the flow: >> >> 1. Writes the script to navigate to the url of the login page. >> 2. Sets the value in the text fields (user name and password) >> 3. Performs click operation on submit button >> 4. Confirms that a pop-up is showed up, if its does, clicks "OK", if it >> does not, the navigation will goto the home page. >> 5. On pressing "OK", navigation to home page takes place. >> >> Now, I have some questions for you, let me know which one makes sense: >> >> 1. When you want to automate the above scenario, wouldn't you go by the >> flow? (the sequence in which object appears) >> 2. How can we assume that a dialog appears even before we perform an >> operation on it? Would a normal automation engineer think in this way? In >> other tools like Watir, QTP, you are allowed to follow the sequence which >> makes it more intuitive. >> 3. I see that in your source code, you did try to involve "click_no_wait" >> method, which probably was the right approach, was there some limitation in >> jssh to not use it? >> 4. Are AutoItX3 functions supported by dialogs or not? >> >> Thanks, >> Anukul >> >> On Fri, Jan 9, 2009 at 2:30 AM, Angrez Singh wrote: >> >>> But question here is why you want to use AutoIt when it is there in >>> Firewatir? >>> >>> - Angrez >>> >>> >>> On Thu, Jan 8, 2009 at 10:21 PM, anukul singhal < >>> anukul.singhal at gmail.com> wrote: >>> >>>> Hi Angrez, >>>> Thanks for the reply, but am aware of the way to click a java script >>>> dialog using startClicker. My aim is to: >>>> >>>> 1. Click on the button (which pops up the dialog) >>>> 2. Then, after clicking on the button, need to click on the dialog using >>>> the ControlClick method of AutoIt. >>>> >>>> I am trying this code but it does not work: >>>> >>>> require 'firewatir' >>>> >>>> ff = FireWatir::Firefox.new >>>> ff.goto("file:///e:/extras/firewatir/jscript.html") >>>> ff.button(:id, "sbmtbtn").click >>>> sleep 3.0 >>>> cc = ff.ContolClick("[JavaScript Application]", "", "OK") >>>> puts cc >>>> >>>> It works until the popup comes but does not do anything on the dialog >>>> unless manually intervened. >>>> >>>> Can you help? >>>> >>>> Thanks, >>>> Anukul >>>> >>>> >>>> On Thu, Jan 8, 2009 at 6:53 AM, Angrez Singh wrote: >>>> >>>>> You can have a look at the unit test cases for the same. Following code >>>>> works for me . Firefox 3.0.5, firewatir 1.6.2 >>>>> >>>>> require 'firewatir' >>>>> include FireWatir >>>>> $br = FireWatir::Firefox.new >>>>> $br.goto("file:///e:/extras/firewatir/jscript.html") >>>>> btn = $br.button(:id, 'sbmtbtn') >>>>> puts btn >>>>> >>>>> # Put the text of the javascript dialog as third argument, if text >>>>> doesn't matches then you'll see the pop up else >>>>> # ok button will be pressed. >>>>> $br.startClicker("ok", 1, '', "Do you want to login to Infinity Inc. >>>>> home page?") >>>>> >>>>> btn.click >>>>> sleep 2 >>>>> $br.close() >>>>> >>>>> - Angrez >>>>> >>>>> >>>>> On Thu, Jan 8, 2009 at 3:50 PM, anukul singhal < >>>>> anukul.singhal at gmail.com> wrote: >>>>> >>>>>> Hi Angrez, >>>>>> >>>>>> This is with reference to firewatir. >>>>>> >>>>>> Thanks, >>>>>> Anukul >>>>>> >>>>>> On Thu, Jan 8, 2009 at 12:09 AM, Angrez Singh wrote: >>>>>> >>>>>>> Are you using it with watir or firewatir? >>>>>>> >>>>>>> - Angrez >>>>>>> >>>>>>> On Thu, Jan 8, 2009 at 6:54 AM, anukul singhal < >>>>>>> anukul.singhal at gmail.com> wrote: >>>>>>> >>>>>>>> Hi Angrez, >>>>>>>> >>>>>>>> I am providing you the html source and the screenshot of the web >>>>>>>> page (both attached) having a javascript dialog (with title as [JavaScript >>>>>>>> Application]), I tried using AutoIt's ControlClick method but it does not >>>>>>>> work, even the WinExists does not work. Can you please look into it? >>>>>>>> >>>>>>>> html source: >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Sample >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>>

>>>>>>>> Dialog (Click on the button):
>>>>>>>>
>>>>>>>> >>>>>>>>

>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Thanks, >>>>>>>> >>>>>>>> Anukul >>>>>>>> >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Wtr-development mailing list >>>>>>>> Wtr-development at rubyforge.org >>>>>>>> http://rubyforge.org/mailman/listinfo/wtr-development >>>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Wtr-development mailing list >>>>>>> Wtr-development at rubyforge.org >>>>>>> http://rubyforge.org/mailman/listinfo/wtr-development >>>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Wtr-development mailing list >>>>>> Wtr-development at rubyforge.org >>>>>> http://rubyforge.org/mailman/listinfo/wtr-development >>>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Wtr-development mailing list >>>>> Wtr-development at rubyforge.org >>>>> http://rubyforge.org/mailman/listinfo/wtr-development >>>>> >>>> >>>> >>>> _______________________________________________ >>>> Wtr-development mailing list >>>> Wtr-development at rubyforge.org >>>> http://rubyforge.org/mailman/listinfo/wtr-development >>>> >>> >>> >>> _______________________________________________ >>> Wtr-development mailing list >>> Wtr-development at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/wtr-development >>> >> >> >> _______________________________________________ >> Wtr-development mailing list >> Wtr-development at rubyforge.org >> http://rubyforge.org/mailman/listinfo/wtr-development >> > > > _______________________________________________ > Wtr-development mailing list > Wtr-development at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-development > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bernerbits at gmail.com Tue Jan 13 16:17:47 2009 From: bernerbits at gmail.com (Derek Berner) Date: Tue, 13 Jan 2009 15:17:47 -0600 Subject: [Wtr-development] click_no_wait patch Message-ID: <677955230901131317i3144dabcxe56e51c3d719a526@mail.gmail.com> While working on some tests in our office, we realized click_no_wait wasn't working at all in Server 2008, due to how the call to "system" was getting interpreted by the command line. This patch adds a small tweak to the code that fixes the problem for our platform, and shouldn't cause any problems in other versions of Windows. -------------- next part -------------- A non-text attachment was scrubbed... Name: watir.patch Type: text/x-patch Size: 703 bytes Desc: not available URL: From bret at pettichord.com Tue Jan 13 18:21:58 2009 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 13 Jan 2009 17:21:58 -0600 Subject: [Wtr-development] click_no_wait patch In-Reply-To: <677955230901131317i3144dabcxe56e51c3d719a526@mail.gmail.com> References: <677955230901131317i3144dabcxe56e51c3d719a526@mail.gmail.com> Message-ID: Thanks for the research and the patch. Looks good. Bret On Tue, Jan 13, 2009 at 3:17 PM, Derek Berner wrote: > While working on some tests in our office, we realized click_no_wait > wasn't working at all in Server 2008, due to how the call to "system" > was getting interpreted by the command line. This patch adds a small > tweak to the code that fixes the problem for our platform, and > shouldn't cause any problems in other versions of Windows. > > _______________________________________________ > Wtr-development mailing list > Wtr-development at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-development > -- Bret Pettichord GTalk: bpettichord at gmail.com CTO, WatirCraft LLC, http://www.watircraft.com Lead Developer, Watir, http://wtr.rubyforge.org Blog (Essays), http://www.io.com/~wazmo/blog MiniBlog (Links), http://feeds.feedburner.com/bretshotlist -------------- next part -------------- An HTML attachment was scrubbed... URL: From angrez at gmail.com Wed Jan 21 00:32:28 2009 From: angrez at gmail.com (Angrez Singh) Date: Wed, 21 Jan 2009 11:02:28 +0530 Subject: [Wtr-development] FireWatir: container: js_eval: exception and javascript bugs? In-Reply-To: References: Message-ID: Hi Andrew, The reason for failure of code was that its been redirected to results page automatically once you get the results matching the criteria. When browser automatically redirects then the context was not getting refreshed. I have added a new event listener (onstatechange) to browser object in "gems\1.8\gems\firewatir-1.6.2\lib\firewatir\firefox.rb" which checks if page is loaded. If page is loaded it resets the context. Get the latest code from SVN and check if problem is resolved. - Angrez On Mon, Jan 5, 2009 at 11:02 AM, Angrez Singh wrote: > Andrew, > > Thanks for the code will look into the problem. > > - Angrez > > > On Fri, Jan 2, 2009 at 9:06 PM, Andrew McFarlane wrote: > >> Angrez, >> >> I wrote a tiny bit of code (see below) that *should* have illustrated the >> problem, but FireWatir cannot find the link that I am attempting to click at >> the end of the code, although it does exist--FireWatir believes that it is >> on the previous ("searching") page. I even tried to do: >> browser.show_links(), and it said that there were 0 links on the page. I am >> a bit baffled. >> >> require 'rubygems' >> gem 'watir', '>=1.6.2' >> require 'watir' >> >> >> Watir::Browser.default = 'firefox' >> browser = Watir::Browser.new >> >> # Go to the home page >> browser.goto('http://www.frontierairlines.com') >> >> # Enter the origin city code. >> elem = browser.text_field(:id, 'flying_from') >> elem.value = 'DEN' >> elem.fire_event("onfocus") >> elem.fire_event('onKeyDown') >> sleep 0.2 >> elem.fire_event('onKeyUp') >> sleep 5 >> >> # Select the origin city description. >> browser.li(:class, 'ui-autocomplete-even ui-autocomplete-over').click >> >> # Enter the destination city code. >> elem = browser.text_field(:id, 'flying_to') >> elem.value = 'LAX' >> elem.fire_event("onfocus") >> elem.fire_event('onKeyDown') >> sleep 0.2 >> elem.fire_event('onKeyUp') >> sleep 5 >> >> # Select the destination city description. >> browser.li(:class, 'ui-autocomplete-even ui-autocomplete-over').click >> >> # Enter the departure date. >> >> date_leave = (Time.now() + 1*24*60*60).strftime('%m/%d/%Y') >> browser.text_field(:id, 'leaving').value = date_leave >> >> # Enter the return date. >> date_return = (Time.now() + 2*24*60*60).strftime('%m/%d/%Y') >> browser.text_field(:id, 'returning').value = date_return >> >> # Press the 'FIND FLIGHTS' image. >> browser.image(:id, 'findFlightsButton').click >> >> sleep 20 >> >> browser.link(:text, 'Start Over').click >> >> >> Andrew >> >> >> ------------------------------ >> Date: Wed, 31 Dec 2008 12:02:20 +0530 >> From: angrez at gmail.com >> To: wtr-development at rubyforge.org >> Subject: Re: [Wtr-development] FireWatir: container: js_eval: exception >> and javascript bugs? >> >> >> Andrew, >> >> Can you post the code here which you were trying? >> >> - Angrez >> >> On Tue, Dec 30, 2008 at 8:42 PM, Bret Pettichord wrote: >> >> I'd like to have a better understanding of the cause of the problem first. >> >> Bret >> >> >> On Tue, Dec 30, 2008 at 12:25 AM, Angrez Singh wrote: >> >> Hi Bret, >> >> I didn't had a look into this but I was thinking if we try to locate >> element before every call, rather than using the old context. Like instead >> of storing the element name in some variable which gets obsolete when >> context changes we can try to find the element during each call. XPath works >> pretty fast in Firefox. I know there will be some speed issues but we will >> not be having much issues like this. >> >> Thoughts? >> >> - Angrez >> >> >> On Mon, Dec 29, 2008 at 9:42 PM, Bret Pettichord wrote: >> >> Clearly the code you fixed is incorrect. >> >> There is also clearly a larger problem. I don't have time right now to >> research this further. Can some one else help Andrew? >> >> Bret >> >> On Wed, Dec 24, 2008 at 2:46 PM, Andrew McFarlane < >> welkin_inc at hotmail.com> wrote: >> >> I was running a test using Firewatir 1.6.2. >> >> I clicked on a link which navigates the user back to the home page. After >> clicking the link, I looked to make sure that the Close button on an >> "are-you-sure?" dialog was visible or not by making the call >> browser.link(:xpath, close_button_xpath).visible? >> >> Depending on which page of the application that one is on, pressing the >> home page link may either navigate directly to the home page or first >> display the "are-you-sure?" dialog before proceeding to the home page. >> >> When making the above method call, I saw the exception: >> >> c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/container.rb:497:in >> `raise': exception class/object expected (TypeError) >> >> This refers to the raise() method call shown in the container.rb code: >> >> if md = /^(\w+)Error:(.*)$/.match(value) >> eval "class JS#{md[1]}Error\nend" >> raise (eval "JS#{md[1]}Error"), md[2] >> end >> >> I changed the above container.rb code to: >> >> if md = /^(\w+)Error:(.*)$/.match(value) >> klass = Class.new Exception >> Object.const_set "JS#{md[1]}Error", klass >> raise klass, md[2] >> end >> >> so that I could see the exception get thrown. >> >> I then re-ran my test and saw the exception: >> >> c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/container.rb:498:in >> `js_eval': element_xpath_17 is not defined (Reference) >> from >> c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/mozilla_base_element.rb:1005:in >> `visible?' >> >> At this point, I'm stuck. I'm guessing that the javascript context got >> reset when navigating to a different page. >> >> Thanks for your help. >> >> Andrew >> >> >> ------------------------------ >> Send e-mail faster without improving your typing skills. Get your >> Hotmail(R) account. >> >> _______________________________________________ >> Wtr-development mailing list >> Wtr-development at rubyforge.org >> http://rubyforge.org/mailman/listinfo/wtr-development >> >> >> >> >> -- >> Bret Pettichord >> GTalk: bpettichord at gmail.com >> CTO, WatirCraft LLC, http://www.watircraft.com >> Lead Developer, Watir, http://wtr.rubyforge.org >> Blog (Essays), http://www.io.com/~wazmo/blog >> MiniBlog (Links), http://feeds.feedburner.com/bretshotlist >> >> _______________________________________________ >> Wtr-development mailing list >> Wtr-development at rubyforge.org >> http://rubyforge.org/mailman/listinfo/wtr-development >> >> >> >> _______________________________________________ >> Wtr-development mailing list >> Wtr-development at rubyforge.org >> http://rubyforge.org/mailman/listinfo/wtr-development >> >> >> >> >> -- >> Bret Pettichord >> GTalk: bpettichord at gmail.com >> CTO, WatirCraft LLC, http://www.watircraft.com >> Lead Developer, Watir, http://wtr.rubyforge.org >> Blog (Essays), http://www.io.com/~wazmo/blog >> MiniBlog (Links), http://feeds.feedburner.com/bretshotlist >> >> _______________________________________________ >> Wtr-development mailing list >> Wtr-development at rubyforge.org >> http://rubyforge.org/mailman/listinfo/wtr-development >> >> >> >> ------------------------------ >> It's the same Hotmail(R). If by "same" you mean up to 70% faster. Get your >> account now. >> >> _______________________________________________ >> Wtr-development mailing list >> Wtr-development at rubyforge.org >> http://rubyforge.org/mailman/listinfo/wtr-development >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From welkin_inc at hotmail.com Wed Jan 21 16:58:35 2009 From: welkin_inc at hotmail.com (Andrew McFarlane) Date: Wed, 21 Jan 2009 14:58:35 -0700 Subject: [Wtr-development] FireWatir: container: js_eval: exception and javascript bugs? In-Reply-To: References: Message-ID: Angrez, Thanks. Looks good. Andrew Date: Wed, 21 Jan 2009 11:02:28 +0530 From: angrez at gmail.com To: wtr-development at rubyforge.org Subject: Re: [Wtr-development] FireWatir: container: js_eval: exception and javascript bugs? Hi Andrew, The reason for failure of code was that its been redirected to results page automatically once you get the results matching the criteria. When browser automatically redirects then the context was not getting refreshed. I have added a new event listener (onstatechange) to browser object in "gems\1.8\gems\firewatir-1.6.2\lib\firewatir\firefox.rb" which checks if page is loaded. If page is loaded it resets the context. Get the latest code from SVN and check if problem is resolved. - Angrez On Mon, Jan 5, 2009 at 11:02 AM, Angrez Singh wrote: Andrew, Thanks for the code will look into the problem. - Angrez On Fri, Jan 2, 2009 at 9:06 PM, Andrew McFarlane wrote: Angrez, I wrote a tiny bit of code (see below) that *should* have illustrated the problem, but FireWatir cannot find the link that I am attempting to click at the end of the code, although it does exist--FireWatir believes that it is on the previous ("searching") page. I even tried to do: browser.show_links(), and it said that there were 0 links on the page. I am a bit baffled. require 'rubygems' gem 'watir', '>=1.6.2' require 'watir' Watir::Browser.default = 'firefox' browser = Watir::Browser.new # Go to the home page browser.goto('http://www.frontierairlines.com') # Enter the origin city code. elem = browser.text_field(:id, 'flying_from') elem.value = 'DEN' elem.fire_event("onfocus") elem.fire_event('onKeyDown') sleep 0.2 elem.fire_event('onKeyUp') sleep 5 # Select the origin city description. browser.li(:class, 'ui-autocomplete-even ui-autocomplete-over').click # Enter the destination city code. elem = browser.text_field(:id, 'flying_to') elem.value = 'LAX' elem.fire_event("onfocus") elem.fire_event('onKeyDown') sleep 0.2 elem.fire_event('onKeyUp') sleep 5 # Select the destination city description. browser.li(:class, 'ui-autocomplete-even ui-autocomplete-over').click # Enter the departure date. date_leave = (Time.now() + 1*24*60*60).strftime('%m/%d/%Y') browser.text_field(:id, 'leaving').value = date_leave # Enter the return date. date_return = (Time.now() + 2*24*60*60).strftime('%m/%d/%Y') browser.text_field(:id, 'returning').value = date_return # Press the 'FIND FLIGHTS' image. browser.image(:id, 'findFlightsButton').click sleep 20 browser.link(:text, 'Start Over').click Andrew Date: Wed, 31 Dec 2008 12:02:20 +0530 From: angrez at gmail.com To: wtr-development at rubyforge.org Subject: Re: [Wtr-development] FireWatir: container: js_eval: exception and javascript bugs? Andrew, Can you post the code here which you were trying? - Angrez On Tue, Dec 30, 2008 at 8:42 PM, Bret Pettichord wrote: I'd like to have a better understanding of the cause of the problem first. Bret On Tue, Dec 30, 2008 at 12:25 AM, Angrez Singh wrote: Hi Bret, I didn't had a look into this but I was thinking if we try to locate element before every call, rather than using the old context. Like instead of storing the element name in some variable which gets obsolete when context changes we can try to find the element during each call. XPath works pretty fast in Firefox. I know there will be some speed issues but we will not be having much issues like this. Thoughts? - Angrez On Mon, Dec 29, 2008 at 9:42 PM, Bret Pettichord wrote: Clearly the code you fixed is incorrect. There is also clearly a larger problem. I don't have time right now to research this further. Can some one else help Andrew? Bret On Wed, Dec 24, 2008 at 2:46 PM, Andrew McFarlane wrote: I was running a test using Firewatir 1.6.2. I clicked on a link which navigates the user back to the home page. After clicking the link, I looked to make sure that the Close button on an "are-you-sure?" dialog was visible or not by making the call browser.link(:xpath, close_button_xpath).visible? Depending on which page of the application that one is on, pressing the home page link may either navigate directly to the home page or first display the "are-you-sure?" dialog before proceeding to the home page. When making the above method call, I saw the exception: c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/container.rb:497:in `raise': exception class/object expected (TypeError) This refers to the raise() method call shown in the container.rb code: if md = /^(\w+)Error:(.*)$/.match(value) eval "class JS#{md[1]}Error\nend" raise (eval "JS#{md[1]}Error"), md[2] end I changed the above container.rb code to: if md = /^(\w+)Error:(.*)$/.match(value) klass = Class.new Exception Object.const_set "JS#{md[1]}Error", klass raise klass, md[2] end so that I could see the exception get thrown. I then re-ran my test and saw the exception: c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/container.rb:498:in `js_eval': element_xpath_17 is not defined (Reference) from c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/mozilla_base_element.rb:1005:in `visible?' At this point, I'm stuck. I'm guessing that the javascript context got reset when navigating to a different page. Thanks for your help. Andrew Send e-mail faster without improving your typing skills. Get your Hotmail? account. _______________________________________________ Wtr-development mailing list Wtr-development at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-development -- Bret Pettichord GTalk: bpettichord at gmail.com CTO, WatirCraft LLC, http://www.watircraft.com Lead Developer, Watir, http://wtr.rubyforge.org Blog (Essays), http://www.io.com/~wazmo/blog MiniBlog (Links), http://feeds.feedburner.com/bretshotlist _______________________________________________ Wtr-development mailing list Wtr-development at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-development _______________________________________________ Wtr-development mailing list Wtr-development at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-development -- Bret Pettichord GTalk: bpettichord at gmail.com CTO, WatirCraft LLC, http://www.watircraft.com Lead Developer, Watir, http://wtr.rubyforge.org Blog (Essays), http://www.io.com/~wazmo/blog MiniBlog (Links), http://feeds.feedburner.com/bretshotlist _______________________________________________ Wtr-development mailing list Wtr-development at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-development It's the same Hotmail?. If by "same" you mean up to 70% faster. Get your account now. _______________________________________________ Wtr-development mailing list Wtr-development at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-development _________________________________________________________________ Windows Live? Hotmail?:?more than just e-mail. http://windowslive.com/explore?ocid=TXT_TAGLM_WL_t2_hm_justgotbetter_explore_012009 -------------- next part -------------- An HTML attachment was scrubbed... URL: From marekj.com at gmail.com Mon Jan 26 10:18:20 2009 From: marekj.com at gmail.com (marekj) Date: Mon, 26 Jan 2009 09:18:20 -0600 Subject: [Wtr-development] RadioGroup CheckboxGroup or List? Message-ID: Hi, I in Watirloo currently I have ducktaped Watir::IE and FireWatir::Firefox to return RadioGroup and CheckboxGroup. It returns an object with a list of Radios sharing the same :name attribute. It allows me to operate on them as I do on SelectList. RadioGroup acts like single SelectList and CheckboxGroup as multi SelectList I would like to write it up a bit better and perhaps make a patch for Watir so currenty instead of this: ie.radio(:name, 'radioname', 'value1') ie.radio(:name, 'radioname', 'value2') you can use this: rg = ie.radio_group('radioname') rg.size #=> 2 rg.values # => 'value1', 'value2' Questions: 1. Should I stick with the name RadioGroup or better call it RadioList? CheckboxList? and access it like this? ie.radio_list('radioname') ie.checkbox_list('cbname') Of course to this there would be corresponding ie.radio_lists or (radio_groups) that would return radio groupings in current DOM 2. I can rewrite it of course to adop the latest changes Bret is making with display method etc... call it group? or list? please vote. you can see this in action here: http://github.com/marekj/watirloo/ look at test/checkbox_group_test.rb and lib/watirloo/ducktape_watir.rb marekj | Semantic Page Objects Automation Watirloo: Browser Page Helper Framework http://github.com/marekj/watirloo/ for IE, Firefox and others? -------------- next part -------------- An HTML attachment was scrubbed... URL: From welkin_inc at hotmail.com Mon Jan 26 18:04:08 2009 From: welkin_inc at hotmail.com (Andrew McFarlane) Date: Mon, 26 Jan 2009 16:04:08 -0700 Subject: [Wtr-development] FireWatir: container: js_eval: exception and javascript bugs? In-Reply-To: References: Message-ID: Angrez, I am still running into a problem. I installed from SVN. I ran the following simple code: require 'rubygems' gem 'watir', '>=1.6.2' require 'watir' Watir::Browser.default = 'firefox' browser = Watir::Browser.new # Go to the home page browser.goto('http://www.frontierairlines.com') # Enter the origin city code. elem = browser.text_field(:id, 'flying_from') elem.value = 'DEN' elem.fire_event("onfocus") elem.fire_event('onKeyDown') sleep 0.2 elem.fire_event('onKeyUp') sleep 5 # Select the origin city description. browser.li(:class, 'ui-autocomplete-even ui-autocomplete-over').click # Enter the destination city code. elem = browser.text_field(:id, 'flying_to') elem.value = 'LAX' elem.fire_event("onfocus") elem.fire_event('onKeyDown') sleep 0.2 elem.fire_event('onKeyUp') sleep 5 # Select the destination city description. browser.li(:class, 'ui-autocomplete-even ui-autocomplete-over').click # Enter the departure date. date_leave = (Time.now() + 1*24*60*60).strftime('%m/%d/%Y') browser.text_field(:id, 'leaving').value = date_leave # Enter the return date. date_return = (Time.now() + 2*24*60*60).strftime('%m/%d/%Y') browser.text_field(:id, 'returning').value = date_return # Press the 'FIND FLIGHTS' image. browser.image(:id, 'findFlightsButton').click sleep 20 flight_table_index = 0 other_carrier_xpath = %Q(//div[@id="bodyBlock_#{flight_table_index}"]/div[@class="resultsArea"]/div[@class="footnote"]) if browser.element_by_xpath(other_carrier_xpath).exist? # There is one or more footnotes saying that flights are operated by other than Frontier. other_carriers = browser.element_by_xpath(other_carrier_xpath) puts "DEBUG: other_carriers inspection: #{other_carriers.inspect}" end I get an exception: c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/container.rb:495:in `raise': exception class/object expecte d (TypeError) from c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/container.rb:495:in `js_eval' from c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/container.rb:506:in `js_eval_method' from c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/mozilla_base_element.rb:127:in `get_attribute_value' from c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/mozilla_base_element.rb:169:in `string_creator ' from c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/mozilla_base_element.rb:1113:in `to_s' from c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/htmlelements.rb:850:in `to_s' from c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/mozilla_base_element.rb:749:in `inspect' from H:/dev/F9/firewatir_js_context_bug_test.rb:57 I changed container.rb near line 495 to look like: if md = /^(\w+)Error:(.*)$/.match(value) #eval "class JS#{md[1]}Error\nend" #raise (eval "JS#{md[1]}Error"), md[2] klass = Class.new Exception Object.const_set "JS#{md[1]}Error", klass raise klass, md[2] end I reran the script and got: c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/container.rb:498:in `js_eval': element_xpath_665 is not de fined (JSReferenceError) from c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/container.rb:506:in `js_eval_method' from c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/mozilla_base_element.rb:127:in `get_attribute_value' from c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/mozilla_base_element.rb:169:in `string_creator ' from c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/mozilla_base_element.rb:1113:in `to_s' from c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/htmlelements.rb:850:in `to_s' from c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/mozilla_base_element.rb:749:in `inspect' from H:/dev/F9/firewatir_js_context_bug_test.rb:57 Thanks for your help. Andrew Date: Wed, 21 Jan 2009 11:02:28 +0530 From: angrez at gmail.com To: wtr-development at rubyforge.org Subject: Re: [Wtr-development] FireWatir: container: js_eval: exception and javascript bugs? Hi Andrew, The reason for failure of code was that its been redirected to results page automatically once you get the results matching the criteria. When browser automatically redirects then the context was not getting refreshed. I have added a new event listener (onstatechange) to browser object in "gems\1.8\gems\firewatir-1.6.2\lib\firewatir\firefox.rb" which checks if page is loaded. If page is loaded it resets the context. Get the latest code from SVN and check if problem is resolved. - Angrez On Mon, Jan 5, 2009 at 11:02 AM, Angrez Singh wrote: Andrew, Thanks for the code will look into the problem. - Angrez On Fri, Jan 2, 2009 at 9:06 PM, Andrew McFarlane wrote: Angrez, I wrote a tiny bit of code (see below) that *should* have illustrated the problem, but FireWatir cannot find the link that I am attempting to click at the end of the code, although it does exist--FireWatir believes that it is on the previous ("searching") page. I even tried to do: browser.show_links(), and it said that there were 0 links on the page. I am a bit baffled. require 'rubygems' gem 'watir', '>=1.6.2' require 'watir' Watir::Browser.default = 'firefox' browser = Watir::Browser.new # Go to the home page browser.goto('http://www.frontierairlines.com') # Enter the origin city code. elem = browser.text_field(:id, 'flying_from') elem.value = 'DEN' elem.fire_event("onfocus") elem.fire_event('onKeyDown') sleep 0.2 elem.fire_event('onKeyUp') sleep 5 # Select the origin city description. browser.li(:class, 'ui-autocomplete-even ui-autocomplete-over').click # Enter the destination city code. elem = browser.text_field(:id, 'flying_to') elem.value = 'LAX' elem.fire_event("onfocus") elem.fire_event('onKeyDown') sleep 0.2 elem.fire_event('onKeyUp') sleep 5 # Select the destination city description. browser.li(:class, 'ui-autocomplete-even ui-autocomplete-over').click # Enter the departure date. date_leave = (Time.now() + 1*24*60*60).strftime('%m/%d/%Y') browser.text_field(:id, 'leaving').value = date_leave # Enter the return date. date_return = (Time.now() + 2*24*60*60).strftime('%m/%d/%Y') browser.text_field(:id, 'returning').value = date_return # Press the 'FIND FLIGHTS' image. browser.image(:id, 'findFlightsButton').click sleep 20 browser.link(:text, 'Start Over').click Andrew Date: Wed, 31 Dec 2008 12:02:20 +0530 From: angrez at gmail.com To: wtr-development at rubyforge.org Subject: Re: [Wtr-development] FireWatir: container: js_eval: exception and javascript bugs? Andrew, Can you post the code here which you were trying? - Angrez On Tue, Dec 30, 2008 at 8:42 PM, Bret Pettichord wrote: I'd like to have a better understanding of the cause of the problem first. Bret On Tue, Dec 30, 2008 at 12:25 AM, Angrez Singh wrote: Hi Bret, I didn't had a look into this but I was thinking if we try to locate element before every call, rather than using the old context. Like instead of storing the element name in some variable which gets obsolete when context changes we can try to find the element during each call. XPath works pretty fast in Firefox. I know there will be some speed issues but we will not be having much issues like this. Thoughts? - Angrez On Mon, Dec 29, 2008 at 9:42 PM, Bret Pettichord wrote: Clearly the code you fixed is incorrect. There is also clearly a larger problem. I don't have time right now to research this further. Can some one else help Andrew? Bret On Wed, Dec 24, 2008 at 2:46 PM, Andrew McFarlane wrote: I was running a test using Firewatir 1.6.2. I clicked on a link which navigates the user back to the home page. After clicking the link, I looked to make sure that the Close button on an "are-you-sure?" dialog was visible or not by making the call browser.link(:xpath, close_button_xpath).visible? Depending on which page of the application that one is on, pressing the home page link may either navigate directly to the home page or first display the "are-you-sure?" dialog before proceeding to the home page. When making the above method call, I saw the exception: c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/container.rb:497:in `raise': exception class/object expected (TypeError) This refers to the raise() method call shown in the container.rb code: if md = /^(\w+)Error:(.*)$/.match(value) eval "class JS#{md[1]}Error\nend" raise (eval "JS#{md[1]}Error"), md[2] end I changed the above container.rb code to: if md = /^(\w+)Error:(.*)$/.match(value) klass = Class.new Exception Object.const_set "JS#{md[1]}Error", klass raise klass, md[2] end so that I could see the exception get thrown. I then re-ran my test and saw the exception: c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/container.rb:498:in `js_eval': element_xpath_17 is not defined (Reference) from c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/mozilla_base_element.rb:1005:in `visible?' At this point, I'm stuck. I'm guessing that the javascript context got reset when navigating to a different page. Thanks for your help. Andrew Send e-mail faster without improving your typing skills. Get your Hotmail? account. _______________________________________________ Wtr-development mailing list Wtr-development at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-development -- Bret Pettichord GTalk: bpettichord at gmail.com CTO, WatirCraft LLC, http://www.watircraft.com Lead Developer, Watir, http://wtr.rubyforge.org Blog (Essays), http://www.io.com/~wazmo/blog MiniBlog (Links), http://feeds.feedburner.com/bretshotlist _______________________________________________ Wtr-development mailing list Wtr-development at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-development _______________________________________________ Wtr-development mailing list Wtr-development at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-development -- Bret Pettichord GTalk: bpettichord at gmail.com CTO, WatirCraft LLC, http://www.watircraft.com Lead Developer, Watir, http://wtr.rubyforge.org Blog (Essays), http://www.io.com/~wazmo/blog MiniBlog (Links), http://feeds.feedburner.com/bretshotlist _______________________________________________ Wtr-development mailing list Wtr-development at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-development It's the same Hotmail?. If by "same" you mean up to 70% faster. Get your account now. _______________________________________________ Wtr-development mailing list Wtr-development at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-development _________________________________________________________________ Hotmail? goes where you go. On a PC, on the Web, on your phone. http://www.windowslive-hotmail.com/learnmore/versatility.aspx#mobile?ocid=TXT_TAGHM_WL_HM_versatility_121208 -------------- next part -------------- An HTML attachment was scrubbed... URL: From angrez at gmail.com Tue Jan 27 05:09:44 2009 From: angrez at gmail.com (Angrez Singh) Date: Tue, 27 Jan 2009 15:39:44 +0530 Subject: [Wtr-development] FireWatir: container: js_eval: exception and javascript bugs? In-Reply-To: References: Message-ID: There was bug in the code that gets element by xpath. We need to replace the quotes from xpath query passed in with single quotes or we need to put "\" before every quote. I changed the code to reflect that and same is checked in. Also the xpath query you have written was not pointing to any element. I changed the code a bit and it works now. Here are last few lines of code: flight_table_index = 0 other_carrier_xpath = %Q(//div[@id="headBlock_#{flight_table_index}"]/div/h2) h2Element = browser.element_by_xpath(other_carrier_xpath) if h2Element.exist? puts 'here element exists' # There is one or more footnotes saying that flights are operated by other than Frontier. #other_carriers = browser.element_by_xpath(other_carrier_xpath) puts h2Element.innerHTML # puts "DEBUG: other_carriers inspection: #{divElement.inspect}" end - Angrez On Tue, Jan 27, 2009 at 4:34 AM, Andrew McFarlane wrote: > Angrez, > > I am still running into a problem. I installed from SVN. I ran the > following simple code: > > > require 'rubygems' > gem 'watir', '>=1.6.2' > require 'watir' > > > Watir::Browser.default = 'firefox' > browser = Watir::Browser.new > > # Go to the home page > browser.goto('http://www.frontierairlines.com') > > # Enter the origin city code. > elem = browser.text_field(:id, 'flying_from') > elem.value = 'DEN' > elem.fire_event("onfocus") > elem.fire_event('onKeyDown') > sleep 0.2 > elem.fire_event('onKeyUp') > sleep 5 > > # Select the origin city description. > browser.li(:class, 'ui-autocomplete-even ui-autocomplete-over').click > > # Enter the destination city code. > elem = browser.text_field(:id, 'flying_to') > elem.value = 'LAX' > elem.fire_event("onfocus") > elem.fire_event('onKeyDown') > sleep 0.2 > elem.fire_event('onKeyUp') > sleep 5 > > # Select the destination city description. > browser.li(:class, 'ui-autocomplete-even ui-autocomplete-over').click > > # Enter the departure date. > > date_leave = (Time.now() + 1*24*60*60).strftime('%m/%d/%Y') > browser.text_field(:id, 'leaving').value = date_leave > > # Enter the return date. > date_return = (Time.now() + 2*24*60*60).strftime('%m/%d/%Y') > browser.text_field(:id, 'returning').value = date_return > > # Press the 'FIND FLIGHTS' image. > browser.image(:id, 'findFlightsButton').click > > sleep 20 > > flight_table_index = 0 > > other_carrier_xpath = > %Q(//div[@id="bodyBlock_#{flight_table_index}"]/div[@class="resultsArea"]/div[@class="footnote"]) > > if browser.element_by_xpath(other_carrier_xpath).exist? > # There is one or more footnotes saying that flights are operated by > other than Frontier. > other_carriers = browser.element_by_xpath(other_carrier_xpath) > puts "DEBUG: other_carriers inspection: #{other_carriers.inspect}" > end > > I get an exception: > > c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/container.rb:495:in > `raise': exception class/object expecte > d (TypeError) > from > c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/container.rb:495:in > `js_eval' > from > c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/container.rb:506:in > `js_eval_method' > from > c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/mozilla_base_element.rb:127:in > `get_attribute_value' > from > c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/mozilla_base_element.rb:169:in > `string_creator > ' > from > c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/mozilla_base_element.rb:1113:in > `to_s' > from > c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/htmlelements.rb:850:in > `to_s' > from > c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/mozilla_base_element.rb:749:in > `inspect' > from H:/dev/F9/firewatir_js_context_bug_test.rb:57 > > I changed container.rb near line 495 to look like: > > if md = /^(\w+)Error:(.*)$/.match(value) > #eval "class JS#{md[1]}Error\nend" > #raise (eval "JS#{md[1]}Error"), md[2] > klass = Class.new Exception > Object.const_set "JS#{md[1]}Error", klass > raise klass, md[2] > end > > I reran the script and got: > > c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/container.rb:498:in > `js_eval': element_xpath_665 is not de > fined (JSReferenceError) > from > c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/container.rb:506:in > `js_eval_method' > from > c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/mozilla_base_element.rb:127:in > `get_attribute_value' > from > c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/mozilla_base_element.rb:169:in > `string_creator > ' > from > c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/mozilla_base_element.rb:1113:in > `to_s' > from > c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/htmlelements.rb:850:in > `to_s' > from > c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/mozilla_base_element.rb:749:in > `inspect' > from H:/dev/F9/firewatir_js_context_bug_test.rb:57 > > Thanks for your help. > > > > Andrew > > > > ------------------------------ > Date: Wed, 21 Jan 2009 11:02:28 +0530 > > From: angrez at gmail.com > To: wtr-development at rubyforge.org > Subject: Re: [Wtr-development] FireWatir: container: js_eval: exception and > javascript bugs? > > Hi Andrew, > > The reason for failure of code was that its been redirected to results page > automatically once you get the results matching the criteria. When browser > automatically redirects then the context was not getting refreshed. I have > added a new event listener (onstatechange) to browser object in > "gems\1.8\gems\firewatir-1.6.2\lib\firewatir\firefox.rb" which checks if > page is loaded. If page is loaded it resets the context. > > Get the latest code from SVN and check if problem is resolved. > > - Angrez > > > On Mon, Jan 5, 2009 at 11:02 AM, Angrez Singh wrote: > > Andrew, > > Thanks for the code will look into the problem. > > - Angrez > > > On Fri, Jan 2, 2009 at 9:06 PM, Andrew McFarlane wrote: > > Angrez, > > I wrote a tiny bit of code (see below) that *should* have illustrated the > problem, but FireWatir cannot find the link that I am attempting to click at > the end of the code, although it does exist--FireWatir believes that it is > on the previous ("searching") page. I even tried to do: > browser.show_links(), and it said that there were 0 links on the page. I am > a bit baffled. > > require 'rubygems' > gem 'watir', '>=1.6.2' > require 'watir' > > > Watir::Browser.default = 'firefox' > browser = Watir::Browser.new > > # Go to the home page > browser.goto('http://www.frontierairlines.com') > > # Enter the origin city code. > elem = browser.text_field(:id, 'flying_from') > elem.value = 'DEN' > elem.fire_event("onfocus") > elem.fire_event('onKeyDown') > sleep 0.2 > elem.fire_event('onKeyUp') > sleep 5 > > # Select the origin city description. > browser.li(:class, 'ui-autocomplete-even ui-autocomplete-over').click > > # Enter the destination city code. > elem = browser.text_field(:id, 'flying_to') > elem.value = 'LAX' > elem.fire_event("onfocus") > elem.fire_event('onKeyDown') > sleep 0.2 > elem.fire_event('onKeyUp') > sleep 5 > > # Select the destination city description. > browser.li(:class, 'ui-autocomplete-even ui-autocomplete-over').click > > # Enter the departure date. > > date_leave = (Time.now() + 1*24*60*60).strftime('%m/%d/%Y') > browser.text_field(:id, 'leaving').value = date_leave > > # Enter the return date. > date_return = (Time.now() + 2*24*60*60).strftime('%m/%d/%Y') > browser.text_field(:id, 'returning').value = date_return > > # Press the 'FIND FLIGHTS' image. > browser.image(:id, 'findFlightsButton').click > > sleep 20 > > browser.link(:text, 'Start Over').click > > > Andrew > > > ------------------------------ > Date: Wed, 31 Dec 2008 12:02:20 +0530 > From: angrez at gmail.com > To: wtr-development at rubyforge.org > Subject: Re: [Wtr-development] FireWatir: container: js_eval: exception and > javascript bugs? > > > Andrew, > > Can you post the code here which you were trying? > > - Angrez > > On Tue, Dec 30, 2008 at 8:42 PM, Bret Pettichord wrote: > > I'd like to have a better understanding of the cause of the problem first. > > Bret > > > On Tue, Dec 30, 2008 at 12:25 AM, Angrez Singh wrote: > > Hi Bret, > > I didn't had a look into this but I was thinking if we try to locate > element before every call, rather than using the old context. Like instead > of storing the element name in some variable which gets obsolete when > context changes we can try to find the element during each call. XPath works > pretty fast in Firefox. I know there will be some speed issues but we will > not be having much issues like this. > > Thoughts? > > - Angrez > > > On Mon, Dec 29, 2008 at 9:42 PM, Bret Pettichord wrote: > > Clearly the code you fixed is incorrect. > > There is also clearly a larger problem. I don't have time right now to > research this further. Can some one else help Andrew? > > Bret > > On Wed, Dec 24, 2008 at 2:46 PM, Andrew McFarlane > wrote: > > I was running a test using Firewatir 1.6.2. > > I clicked on a link which navigates the user back to the home page. After > clicking the link, I looked to make sure that the Close button on an > "are-you-sure?" dialog was visible or not by making the call > browser.link(:xpath, close_button_xpath).visible? > > Depending on which page of the application that one is on, pressing the > home page link may either navigate directly to the home page or first > display the "are-you-sure?" dialog before proceeding to the home page. > > When making the above method call, I saw the exception: > > c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/container.rb:497:in > `raise': exception class/object expected (TypeError) > > This refers to the raise() method call shown in the container.rb code: > > if md = /^(\w+)Error:(.*)$/.match(value) > eval "class JS#{md[1]}Error\nend" > raise (eval "JS#{md[1]}Error"), md[2] > end > > I changed the above container.rb code to: > > if md = /^(\w+)Error:(.*)$/.match(value) > klass = Class.new Exception > Object.const_set "JS#{md[1]}Error", klass > raise klass, md[2] > end > > so that I could see the exception get thrown. > > I then re-ran my test and saw the exception: > > c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/container.rb:498:in > `js_eval': element_xpath_17 is not defined (Reference) > from > c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/mozilla_base_element.rb:1005:in > `visible?' > > At this point, I'm stuck. I'm guessing that the javascript context got > reset when navigating to a different page. > > Thanks for your help. > > Andrew > > > ------------------------------ > Send e-mail faster without improving your typing skills. Get your Hotmail(R) > account. > > _______________________________________________ > Wtr-development mailing list > Wtr-development at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-development > > > > > -- > Bret Pettichord > GTalk: bpettichord at gmail.com > CTO, WatirCraft LLC, http://www.watircraft.com > Lead Developer, Watir, http://wtr.rubyforge.org > Blog (Essays), http://www.io.com/~wazmo/blog > MiniBlog (Links), http://feeds.feedburner.com/bretshotlist > > _______________________________________________ > Wtr-development mailing list > Wtr-development at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-development > > > > _______________________________________________ > Wtr-development mailing list > Wtr-development at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-development > > > > > -- > Bret Pettichord > GTalk: bpettichord at gmail.com > CTO, WatirCraft LLC, http://www.watircraft.com > Lead Developer, Watir, http://wtr.rubyforge.org > Blog (Essays), http://www.io.com/~wazmo/blog > MiniBlog (Links), http://feeds.feedburner.com/bretshotlist > > _______________________________________________ > Wtr-development mailing list > Wtr-development at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-development > > > > ------------------------------ > It's the same Hotmail(R). If by "same" you mean up to 70% faster. Get your > account now. > > _______________________________________________ > Wtr-development mailing list > Wtr-development at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-development > > > > > ------------------------------ > Hotmail(R) goes where you go. On a PC, on the Web, on your phone. See how. > > _______________________________________________ > Wtr-development mailing list > Wtr-development at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-development > -------------- next part -------------- An HTML attachment was scrubbed... URL: From welkin_inc at hotmail.com Thu Jan 29 14:18:47 2009 From: welkin_inc at hotmail.com (Andrew McFarlane) Date: Thu, 29 Jan 2009 12:18:47 -0700 Subject: [Wtr-development] (no subject) Message-ID: Has anyone thought about using Watir to do load testing using EC2 or something similar to Selenium Grid? Thanks. Andrew _________________________________________________________________ Windows Live? Hotmail?:?more than just e-mail. http://windowslive.com/explore?ocid=TXT_TAGLM_WL_t2_hm_justgotbetter_explore_012009 -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul.rogers at shaw.ca Thu Jan 29 19:02:10 2009 From: paul.rogers at shaw.ca (Paul Rogers) Date: Thu, 29 Jan 2009 17:02:10 -0700 Subject: [Wtr-development] (no subject) In-Reply-To: References: Message-ID: ec2 only gives you a linux machine with no gui. Use a load testing tool like jmeter Paul On Thu, Jan 29, 2009 at 12:18 PM, Andrew McFarlane wrote: > Has anyone thought about using Watir to do load testing using EC2 or > something similar to Selenium Grid? > > Thanks. > > Andrew > > ________________________________ > Windows Live? Hotmail(R):?more than just e-mail. Check it out. > _______________________________________________ > Wtr-development mailing list > Wtr-development at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-development > From welkin_inc at hotmail.com Thu Jan 29 19:56:47 2009 From: welkin_inc at hotmail.com (Andrew McFarlane) Date: Thu, 29 Jan 2009 17:56:47 -0700 Subject: [Wtr-development] (no subject) In-Reply-To: References: Message-ID: EC2 allows you to use a GUI. It also now allows you to use a Windows image. I see that people are doing cross-browser testing on EC2, so why not do automated load tests that way? The app that I am testing is too complicated to model using a simulated browser tool like Jmeter. I'm headed down this path--I'll let you know how it goes. Andrew > Date: Thu, 29 Jan 2009 17:02:10 -0700 > From: paul.rogers at shaw.ca > To: wtr-development at rubyforge.org > Subject: Re: [Wtr-development] (no subject) > > ec2 only gives you a linux machine with no gui. Use a load testing > tool like jmeter > > Paul > > On Thu, Jan 29, 2009 at 12:18 PM, Andrew McFarlane > wrote: > > Has anyone thought about using Watir to do load testing using EC2 or > > something similar to Selenium Grid? > > > > Thanks. > > > > Andrew > > > > ________________________________ > > Windows Live? Hotmail(R):?more than just e-mail. Check it out. > > _______________________________________________ > > Wtr-development mailing list > > Wtr-development at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-development > > > _______________________________________________ > Wtr-development mailing list > Wtr-development at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-development _________________________________________________________________ Hotmail? goes where you go. On a PC, on the Web, on your phone. http://www.windowslive-hotmail.com/learnmore/versatility.aspx#mobile?ocid=TXT_TAGHM_WL_HM_versatility_121208 -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul.rogers at shaw.ca Fri Jan 30 10:57:29 2009 From: paul.rogers at shaw.ca (Paul Rogers) Date: Fri, 30 Jan 2009 08:57:29 -0700 Subject: [Wtr-development] (no subject) In-Reply-To: References: Message-ID: do you have any links to what guis are available on ec2. I know windows server is available, burt my understanding is that it doesnt give you the windows desktop. I guess under linux you could run something like virtual box in headless mode and remote desktop in, but I think it would be unusable from the client because of the speed. Paul On Thu, Jan 29, 2009 at 5:56 PM, Andrew McFarlane wrote: > EC2 allows you to use a GUI. It also now allows you to use a Windows > image. I see that people are doing cross-browser testing on EC2, so why not > do automated load tests that way? The app that I am testing is too > complicated to model using a simulated browser tool like Jmeter. > > I'm headed down this path--I'll let you know how it goes. > > Andrew > >> Date: Thu, 29 Jan 2009 17:02:10 -0700 >> From: paul.rogers at shaw.ca >> To: wtr-development at rubyforge.org >> Subject: Re: [Wtr-development] (no subject) >> >> ec2 only gives you a linux machine with no gui. Use a load testing >> tool like jmeter >> >> Paul >> >> On Thu, Jan 29, 2009 at 12:18 PM, Andrew McFarlane >> wrote: >> > Has anyone thought about using Watir to do load testing using EC2 or >> > something similar to Selenium Grid? >> > >> > Thanks. >> > >> > Andrew >> > >> > ________________________________ >> > Windows Live? Hotmail(R):?more than just e-mail. Check it out. >> > _______________________________________________ >> > Wtr-development mailing list >> > Wtr-development at rubyforge.org >> > http://rubyforge.org/mailman/listinfo/wtr-development >> > >> _______________________________________________ >> Wtr-development mailing list >> Wtr-development at rubyforge.org >> http://rubyforge.org/mailman/listinfo/wtr-development > > ________________________________ > Hotmail(R) goes where you go. On a PC, on the Web, on your phone. See how. > _______________________________________________ > Wtr-development mailing list > Wtr-development at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-development > From tim.koops at gmail.com Fri Jan 30 16:39:55 2009 From: tim.koops at gmail.com (Tim Koopmans) Date: Sat, 31 Jan 2009 08:39:55 +1100 Subject: [Wtr-development] (no subject) In-Reply-To: References: Message-ID: Ec2 has win2k3 and it's perfectly viable for GUI automation or load testing. I'm using it for the latter. Regards, Tim Sent from my mobile... On 31/01/2009, at 2:57, Paul Rogers wrote: > do you have any links to what guis are available on ec2. I know > windows server is available, burt my understanding is that it doesnt > give you the windows desktop. I guess under linux you could run > something like virtual box in headless mode and remote desktop in, but > I think it would be unusable from the client because of the speed. > > Paul > > On Thu, Jan 29, 2009 at 5:56 PM, Andrew McFarlane > wrote: >> EC2 allows you to use a GUI. It also now allows you to use a Windows >> image. I see that people are doing cross-browser testing on EC2, >> so why not >> do automated load tests that way? The app that I am testing is too >> complicated to model using a simulated browser tool like Jmeter. >> >> I'm headed down this path--I'll let you know how it goes. >> >> Andrew >> >>> Date: Thu, 29 Jan 2009 17:02:10 -0700 >>> From: paul.rogers at shaw.ca >>> To: wtr-development at rubyforge.org >>> Subject: Re: [Wtr-development] (no subject) >>> >>> ec2 only gives you a linux machine with no gui. Use a load testing >>> tool like jmeter >>> >>> Paul >>> >>> On Thu, Jan 29, 2009 at 12:18 PM, Andrew McFarlane >>> wrote: >>>> Has anyone thought about using Watir to do load testing using EC2 >>>> or >>>> something similar to Selenium Grid? >>>> >>>> Thanks. >>>> >>>> Andrew >>>> >>>> ________________________________ >>>> Windows Live? Hotmail(R):?more than just e-mail. Check it out. >>>> _______________________________________________ >>>> Wtr-development mailing list >>>> Wtr-development at rubyforge.org >>>> http://rubyforge.org/mailman/listinfo/wtr-development >>>> >>> _______________________________________________ >>> Wtr-development mailing list >>> Wtr-development at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/wtr-development >> >> ________________________________ >> Hotmail(R) goes where you go. On a PC, on the Web, on your phone. >> See how. >> _______________________________________________ >> Wtr-development mailing list >> Wtr-development at rubyforge.org >> http://rubyforge.org/mailman/listinfo/wtr-development >> > _______________________________________________ > Wtr-development mailing list > Wtr-development at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-development