Re: [Wtr-general] How can my script wait until a new window has finished loading before using IE.attach?
Hi Bret, I tried this out in my test environment and yes, it works perfectly. Thanks.Paul.On 21/03/06, Bret Pettichord [EMAIL PROTECTED] wrote:The code base in development allows you to configure this. IE.attach_timeout = 10This is number of seconds to wait for the window specified in attachstatements to appear/load. This should be exactly what you are askingfor.Paul, Mark, Anyone: Lemme know happens if you try this out. Does it solve your problem?(There is a lot of great stuff in development, which is why i'm eagerto stabilize the code base and make a new release.) ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
[Wtr-general] How do you attach to a Tab in IE 7?
Is anyone else playing with Internet Explorer 7 (Beta)?I have a computer set up with Win XP Pro SP2 and Internet Explorer 7 Beta 1, and I ran one of my scripts to see what would happen. For the most part, everything ran as expected except for one thing - instead of opening a link in a new browser window, it opened it in a new tab. (Tabbed browsing is one of the new features of IE7.) I couldn't figure out how to switch to that tab in IE7 via Ruby/Watir. To illustrate, here's what I tried: in IE7 I had the first tab displaying our web application's Home page, and in a second tab I had the Google page up. I clicked on the first tab and noticed that the window title bar switched to show my app's Title. I opened up IRB in a new command prompt and tried: ie = IE.attach(:title, 'Google') -- It just sort of hangs until I manually click on the right tab in the browser. *Then* control returns to IRB. I don't know if this is on anybody's radar yet. It's not a part of my application or an immediate need. I'm just curious to know if anyone working on Watir has played with this yet.Do you think perhaps we can add a new command like: IE.tab(:title, /blah/) or would it be better to enhance IE.attach to sift through the tabs in addition to any other open browser windows? (Because we might not know if it's in a new tab or window depending on the user's browser settings.) Cheers. Paul.(In the meanwhile, I just enabled the IE7 option: Tools Intenet Options Advanced Tabbed Browsing Always open pop-ups in a new window and all's good.) ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] How do you attach to a Tab in IE 7?
On 3/21/06, Paul Carvalho [EMAIL PROTECTED] wrote: Is anyone else playing with Internet Explorer 7 (Beta)? We're scared. :) -Chris ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] How do you attach to a Tab in IE 7?
+1 :)On 3/21/06, Chris McMahon [EMAIL PROTECTED] wrote: We're scared.:) ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] How do you attach to a Tab in IE 7?
On 3/21/06, Paul Carvalho [EMAIL PROTECTED] wrote: Do you think perhaps we can add a new command like: IE.tab(:title, /blah/) or would it be better to enhance IE.attach to sift through the tabs in addition to any other open browser windows? (Because we might not know if it's in a new tab or window depending on the user's browser settings.) Cheers. Paul. (In the meanwhile, I just enabled the IE7 option: Tools Intenet Options Advanced Tabbed Browsing Always open pop-ups in a new window and all's good.) I like the idea of the IE#tab command and if someone writes it, we'll consider committing it. I'm reluctant to change the semantics of IE.attach as you suggest. For one, IE#tab would be an instance method and IE#attach is a class method. But this discussion is academic until someone figures out how to access tabs at all. Bret ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
[Wtr-general] undefined method `add_assertion' for nil:NilClass
Title: undefined method `add_assertion' for nil:NilClass Hello watir team, I tried to use assertion's in my code and had absolutely now success today. I always get following error: TEST FAILED.undefined method `add_assertion' for nil:NilClass c:/ruby/lib/ruby/1.8/test/unit/testcase.rb:115:in `add_assertion' c:/ruby/lib/ruby/1.8/test/unit/assertions.rb:353:in `_wrap_assertion' c:/ruby/lib/ruby/1.8/test/unit/assertions.rb:38:in `assert' ./utils.rb:1376:in `bpVerifyOnPage' Here is a code snipe (verify is a string that is passed to a function): The if statement works fine. The assert gives me trouble. Why? What is wrong? What is the nil class? class BPUtils Test::Unit::TestCase def initialize end def .some code begin assert($ie.contains_text( verify ) ) puts(TEST PASSED. Found test string #{verify}) #if $ie.contains_text( verify ) then # some #else # some code #end rescue = e puts(TEST FAILED. + e.message + \n + e.backtrace.join(\n)) # hand exception over to main program to quit the program raise QuitProgram, quit program, caller end end ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] undefined method `add_assertion' for nil:NilClass
On 3/21/06, Paatsch, Bernd [EMAIL PROTECTED] wrote: def .some code begin I suspect your problem is somewhere in here. ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Window attach problem.
This is a timing problem in IE#attach. It is fixed in development. See the recent email discussion regarding IE.attach_timeout. Bret On 3/21/06, Galina Maralina [EMAIL PROTECTED] wrote: Hello, I am having a problem to attach a window, this is a script: … $ie.link(:id, /ORG_POPUP/).click $ie1 = Watir::IE.attach(:title, C2P -) … First click works and the window opens, then it gives an error: Watir::Exception::NoMatchingWindowFoundException: Unable to locate a window with title of C2P – When I run the same using irb, everything works just fine… irb(main):032:0 ie1 = Watir::IE.attach(:title, C2P -) = #Watir::IE:0x2b340a8 @defaultSleepTime=0.1, @activeObjectHighLightColor=yel low, @pageHasReloaded=false, @enable_spinner=false, @url_list=[http://66.81.10 3.43:4040/c2p/imperativeTerritoryCoveredInitCreate.do], @logger=#Watir::Defaul tLogger:0x2b32c98 @progname=nil, @logdev=#Logger::LogDevice:0x2b325f0 @filename =nil, @dev=#IO:0x278e7d0, @shift_size=nil, @shift_age=nil, @level=2, @datetim e_format=%d-%b-%Y %H:%M:%S, @typingspeed=0.08, @form=nil, @ie=#WIN32OLE:0x2b 33b98, @down_load_time=0.047, @error_checkers=[#Proc:[EMAIL PROTECTED]:/ruby/lib/ru by/site_ruby/1.8/watir.rb:1135] irb(main):034:0 ie1.show_all_objects ---Objects in page - text/css id= text/css id= text/javascript id= src=/c2p/js/main.js text/javascript id= src=/c2p/js/imperatives/ImperativeMainPopu What can it be? Thank you, Gallina. ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] undefined method `add_assertion' for nil:NilCla ss
Title: RE: [Wtr-general] undefined method `add_assertion' for nil:NilClass Still the same after I changed the code to: def bpVerifyPopupWindowOpen( ieCont, verify) #how, what, framename, verify ) begin assert( ieCont.contains_text( verify) ) puts(TEST PASSED. Found test string 'Programming Ruby' ) rescue = e puts(TEST FAILED. + e.message + \n + e.backtrace.join(\n)) end -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Bret Pettichord Sent: Tuesday, March 21, 2006 5:46 PM To: wtr-general@rubyforge.org Subject: Re: [Wtr-general] undefined method `add_assertion' for nil:NilClass On 3/21/06, Paatsch, Bernd [EMAIL PROTECTED] wrote: def .some code begin I suspect your problem is somewhere in here. ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Window attach problem.
On 21/03/06, Galina Maralina [EMAIL PROTECTED] wrote: Hello,I am having a problem to attach a window, this is a script: … $ie.link(:id, /ORG_POPUP/).click $ie1 = Watir::IE.attach(:title, C2P -)…Hello there. I'm just curious.. should the extra space and dash be at the end of the title name? Is this the full title or just a part of it? Does it work if you try either of the following: $ie1 = Watir::IE.attach(:title, C2P)or $ie1 = Watir::IE.attach(:title, /C2P/) Paul. ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] undefined method `add_assertion' for nil:NilCla ss
Title: RE: [Wtr-general] undefined method `add_assertion' for nil:NilCla ss Now I get: TEST FAILED.undefined method `include' for (WebAC::BPUtils):WebAC::BPUtils -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Bret Pettichord Sent: Tuesday, March 21, 2006 6:37 PM To: wtr-general@rubyforge.org Subject: Re: [Wtr-general] undefined method `add_assertion' for nil:NilCla ss That's what i needed to see. Make this change... On 3/21/06, Paatsch, Bernd [EMAIL PROTECTED] wrote: Still the same after I changed the code to: def bpVerifyPopupWindowOpen( ieCont, verify) #how, what, framename, verify ) begin include Test::Unit::Assertions assert( ieCont.contains_text( verify) ) puts(TEST PASSED. Found test string 'Programming Ruby' ) rescue = e puts(TEST FAILED. + e.message + \n + e.backtrace.join(\n)) end -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Bret Pettichord Sent: Tuesday, March 21, 2006 5:46 PM To: wtr-general@rubyforge.org Subject: Re: [Wtr-general] undefined method `add_assertion' for nil:NilClass On 3/21/06, Paatsch, Bernd [EMAIL PROTECTED] wrote: def .some code begin I suspect your problem is somewhere in here. ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] undefined method `add_assertion' for nil:NilCla ss
Oops. Put the include statement before the def instead of inside it. On 3/21/06, Paatsch, Bernd [EMAIL PROTECTED] wrote: Now I get: TEST FAILED.undefined method `include' for (WebAC::BPUtils):WebAC::BPUtils -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bret Pettichord Sent: Tuesday, March 21, 2006 6:37 PM To: wtr-general@rubyforge.org Subject: Re: [Wtr-general] undefined method `add_assertion' for nil:NilCla ss That's what i needed to see. Make this change... On 3/21/06, Paatsch, Bernd [EMAIL PROTECTED] wrote: Still the same after I changed the code to: def bpVerifyPopupWindowOpen( ieCont, verify) #how, what, framename, verify ) begin include Test::Unit::Assertions assert( ieCont.contains_text( verify) ) puts(TEST PASSED. Found test string 'Programming Ruby' ) rescue = e puts(TEST FAILED. + e.message + \n + e.backtrace.join(\n)) end -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bret Pettichord Sent: Tuesday, March 21, 2006 5:46 PM To: wtr-general@rubyforge.org Subject: Re: [Wtr-general] undefined method `add_assertion' for nil:NilClass On 3/21/06, Paatsch, Bernd [EMAIL PROTECTED] wrote: def .some code begin I suspect your problem is somewhere in here. ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
[Wtr-general] Watir 1.5?
Hi Bret and anybody else hacking on the Watir library, What's the status on Watir 1.5? The changes I've heard about include effective ways of handling popups (confirm, alert, modal web dialogs, save-as) and more consistent returning of Watir wrappers rather than straight WIN32OLE handles, and I'm looking forward to the future. Do you have a time-frame in mind for a release? If I go to RubyForge and download stuff from CVS, should I expect problems with any particular areas? Thanks, Dave ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Watir 1.5?
Dave, First of all, you can look at the CVS code, but it would be better to look at our code on SVN (at openqa.org) or even just look at the versions that i posted to wiki.openqa.org the other day. They are both more current. The support for windows popups, however, is not really ready for testing yet. (The support for modal web popups, however, is 98% complete.) All the core-tests work, so the core code is stable. I've frequently pointed people to this build when they have found bugs in 1.4.1 that are fixed in dev and they usually come back satisfied. We've just started final regression testing on our main product at work, for the first release in six months, so that is probably going to be taking most of my energy for the next few weeks. I am in the process of moving the roadmap to jira, so we have an online map of what needs to be done to complete the release. Since moving the code to OpenQA, there are a lot of loose ends to tie up to explain what is going on. If you see one, it would help a lot if you could tie it off for us. The more help i get with the FAQ and the website, etc, the more time i have to write ruby code. Bret On 3/21/06, Dave Burt [EMAIL PROTECTED] wrote: Hi Bret and anybody else hacking on the Watir library, What's the status on Watir 1.5? The changes I've heard about include effective ways of handling popups (confirm, alert, modal web dialogs, save-as) and more consistent returning of Watir wrappers rather than straight WIN32OLE handles, and I'm looking forward to the future. Do you have a time-frame in mind for a release? If I go to RubyForge and download stuff from CVS, should I expect problems with any particular areas? Thanks, Dave ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Watir 1.5?
Hi Bret, Thanks for your complete and helpful answer. I'll probably grab the dev code when I get a chance. Bret said: Since moving the code to OpenQA, there are a lot of loose ends to tie up to explain what is going on. If you see one, it would help a lot if you could tie it off for us. The more help i get with the FAQ and the website, etc, the more time i have to write ruby code. Are these loose ends the same thing as the FAQ and the website, etc? Or are they inconsistencies in Watir 1.5's object model? Or something else entirely? How can I help with the FAQ and the website, etc.? Cheers, Dave ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general