Re: [Wtr-general] url for link
On 2/2/07, Prema Arya [EMAIL PROTECTED] wrote: You can't use regular expression in xpath with XPATH 1.0, you can use it in XPATH 2.0 and rexml supports only xpath 1.0. You can use string operations like substring, string before, string after though. http://www.w3.org/TR/xpath#section-String-Functions. Thanks Prema, I will take a look (I do not really need it, I was just curious). -- Zeljko Filipin zeljkofilipin.com ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Everyday Scripting with Ruby (the book)
I've ordered one also. I was a reviewer for the early drafts of the book, which were very good, I'm looking forward to seeing how the final version came out! I was very excited for the release of this book (back when it was going to be called Scripting for Testers or something along those lines), and waited almost a year for it, however after flipping through it at the bookstore I'm not sure just how useful it is for anyone with intermediate (or so) Ruby skills. The test and watir coverage seemed pretty light overall, mostly covered basic Ruby stuff like working with Strings, Arrays, RegExp etc. and programming 101 - decision structures, variables etc. Maybe good for a beginner, but didn't turn out to be what I expected. No slight to Brian with whom some of you are probably well acquainted, just didn't seem to meet my needs/expectations. ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Unable to access a modal dialog box to select a
Bret, I think It is a modal_dialog box because Watir is able to close the box through the command 'ie.modal_dialog.close'. Also, the command, puts ie.modal_dialog.html outputs the '.html' of the dialog as the following: HTMLHEADTITLESelect/TITLE SCRIPT language=javascript !-- function init() { indow.returnValue = null; var savedIDs = ; var excludeID = ; var frameURL = ../Common/SelectLookupItem.aspx?FullListLookupType=LOCTYPEFULL; if (savedIDs.length 0) frameURL = frameURL + SavedIDs= + savedIDs; if (excludeID.length 0) frameURL = frameURL + ExcludeID= + excludeID; document.all.PopupFrame.src = frameURL; } function FrameCallback(selectedIDs) { window.returnValue = selectedIDs; window.close(); } // -- /SCRIPT /HEAD BODY onload=init(); MS_POSITIONING=GridLayoutIFRAME id=PopupFrame style=Z-INDEX: 5; WIDTH: 100%; POSITION: absolute; HEIGHT: 100% marginWidth=0 marginHeight=0 src=../Common/SelectLookupItem.aspx?FullListLookupType=LOCTYPEFULL frameBorder=0 noResize scrolling=yes /IFRAME/BODY/HTML I am sorry to say that I do not know how to use this '.html' to select a particular value from the dialog box and click the 'Ok' button to confirm the selection. Please help me to do this. Thank you for your time, Vijay. - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6357messageID=18074#18074 ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Unable to access a modal dialog box to select a
My best guess is that your modal dialog is using frames. The HTML that its returning is not the right frame. Thats my best guess and how i would approach the problem. - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6357messageID=18076#18076 ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Is there a way to over ride Watir's checking if IE is busy?
Thanks for all of the tips. I finally figured out that my test was actually taking a long time after firing an event onmouseover for my menus on pages with streaming content. I don't know why that was happening, but a put timeout blocks around each of my operations, hovering over the menu, and clicking on a menu item, and now my test works just fine. No my problem wasn't that the test never started, it was just that on some pages, specifically those with streaming content, I never regained control after hovering over the menus. There is seemingly a problem in the wait method in Watir 1.4.1 that causes this, though our website may be a special case. Anyway I resolved my problem, again, by placing timeout blocks around each of my operations. Thank you. Nathan - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6392messageID=18075#18075 ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Watir with Ajax
IE7 introduced some new properties to show when ajax requests were completed. I can take a look and see how useful those wuld be. would something like the following make more sense? # button click causes ajax request ie.button(:name , 'ff').click # wait for ajax request to finish ie.wait_for_ajax_requet_to_finish ie.select_list(..).exist? # returns true hopefully or should the existing wait methods be extended to encompass ajax functionality? Paul - Original Message - From: Prema Arya To: wtr-general@rubyforge.org Sent: Thursday, February 01, 2007 11:52 PM Subject: Re: [Wtr-general] Watir with Ajax You can wait in a loop till the select box is loaded or use some kind of indicators like in gamil the top right corner of window reads Loading... when the mails are being loaded. In your case you can wait for the control itself #while the control exists is false sleep while(!ie.select_list( :name , criteria[1][type_id]).exists?) sleep(2) end #the select box is loaded now go ahead with other operations. If some text is displayed on the page as result of ajax call, you can also check for that while(!isMessageDisplayed(text displayed on page)) end #The Ajax control is loaded end Hope this helps. Prema On 2/2/07, Naga Harish Kanegolla [EMAIL PROTECTED] wrote: I can't send a link to my application as it is in my local host. I am sorry for this. The select option will be generating after i click on the link. Its ajax stuff. So that select can't be shown in the html. It is generating after the whole page is loaded. So wat should be done for such type of application?? - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6378messageID=18056#18056 ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general -- Prema Arya -- ___ 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] saving screenshots with snagit
Thanks for help! -Dave - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6361messageID=18083#18083 ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Watir with Ajax
looks like this cant be done easily. the new properties are on a per request object basis, and not any easily acccessibl global object. so the best way is to use the loop below. I think there is a method in watir to do it directly, but I cant remember what it is Paul - Original Message - From: Paul Rogers To: wtr-general@rubyforge.org Sent: Friday, February 02, 2007 8:41 AM Subject: Re: [Wtr-general] Watir with Ajax IE7 introduced some new properties to show when ajax requests were completed. I can take a look and see how useful those wuld be. would something like the following make more sense? # button click causes ajax request ie.button(:name , 'ff').click # wait for ajax request to finish ie.wait_for_ajax_requet_to_finish ie.select_list(..).exist? # returns true hopefully or should the existing wait methods be extended to encompass ajax functionality? Paul - Original Message - From: Prema Arya To: wtr-general@rubyforge.org Sent: Thursday, February 01, 2007 11:52 PM Subject: Re: [Wtr-general] Watir with Ajax You can wait in a loop till the select box is loaded or use some kind of indicators like in gamil the top right corner of window reads Loading... when the mails are being loaded. In your case you can wait for the control itself #while the control exists is false sleep while(!ie.select_list( :name , criteria[1][type_id]).exists?) sleep(2) end #the select box is loaded now go ahead with other operations. If some text is displayed on the page as result of ajax call, you can also check for that while(!isMessageDisplayed(text displayed on page)) end #The Ajax control is loaded end Hope this helps. Prema On 2/2/07, Naga Harish Kanegolla [EMAIL PROTECTED] wrote: I can't send a link to my application as it is in my local host. I am sorry for this. The select option will be generating after i click on the link. Its ajax stuff. So that select can't be shown in the html. It is generating after the whole page is loaded. So wat should be done for such type of application?? - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6378messageID=18056#18056 ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general -- Prema Arya ___ 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] Installation Problem
I hope this is an acceptable topic for this list... I just installed Ruby 1.8.5 on my system, and then, with much effort, managed to get the watir-1.4.1.exe installed (it has a major install bug that I was able to circumvent). So after all that, I open a command prompt into the installation location, and run all_tests.rb as instructed, and I get the errors below: C:\Program Files\Watir\unittestsall_tests.rb C:/Program Files/Watir/unittests/../unittests/setup.rb:4:in `require': no such f ile to load -- watir (LoadError) from C:/Program Files/Watir/unittests/../unittests/setup.rb:4 from C:/Program Files/Watir/unittests/all_tests.rb:4:in 'require' from C:/Program Files/Watir/unittests/all_tests.rb:4 It looks like it might be a simple pathing issue, but I'm not sure. I do have the path setup so that I can run regular ruby, but I haven't tried to add anything for watir yet; I thought I would ask here first. I don't remember having this problem about eight months ago when I first tried Watir, but that was on another computer. Any help would be appreciated. Thanks! Rob ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Installation Problem
It's been a while since I tried an executable installer so I'm not sure about your specific problem. It looks like you've got a space in your path, which can cause problems in some scripts. As with all things Ruby, it tends to be easier to go the Ruby Way and use the gem installer. Figuring out the Ruby Way is the hard part : ) If you open your command prompt and type: gem install watir That should install Watir 1.4.1 as a Ruby gem, which will probably take care of the issue. You'll then be able to find the Watir install and unit tests under ruby/lib/ruby/gems/1.8/gems/watir . . . where the first ruby is your root ruby install directory. If that command (gem) is not a recognized command, then you do indeed have a path issue, and you might want to try reinstalling ruby under the C:\ directory, or following a howto on adding a directory to your PATH like http://www.computerhope.com/issues/ch000549.htm. Just add your ruby/ directory to the path and you should be all set. Ethan On 2/2/07, RobG [EMAIL PROTECTED] wrote: I hope this is an acceptable topic for this list... I just installed Ruby 1.8.5 on my system, and then, with much effort, managed to get the watir-1.4.1.exe installed (it has a major install bug that I was able to circumvent). So after all that, I open a command prompt into the installation location, and run all_tests.rb as instructed, and I get the errors below: C:\Program Files\Watir\unittestsall_tests.rb C:/Program Files/Watir/unittests/../unittests/setup.rb:4:in `require': no such f ile to load -- watir (LoadError) from C:/Program Files/Watir/unittests/../unittests/setup.rb:4 from C:/Program Files/Watir/unittests/all_tests.rb:4:in 'require' from C:/Program Files/Watir/unittests/all_tests.rb:4 It looks like it might be a simple pathing issue, but I'm not sure. I do have the path setup so that I can run regular ruby, but I haven't tried to add anything for watir yet; I thought I would ask here first. I don't remember having this problem about eight months ago when I first tried Watir, but that was on another computer. Any help would be appreciated. Thanks! Rob ___ 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] Installation Problem
Oh, yeah. I forgot all about the space in path thing. And for even more help, try this URL: http://www.openqa.org/watir/ sometimes, I forget and go to the old site: http://wtr.rubyforge.org/ On 2/2/07, Ethan Jewett [EMAIL PROTECTED] wrote: It's been a while since I tried an executable installer so I'm not sure about your specific problem. It looks like you've got a space in your path, which can cause problems in some scripts. As with all things Ruby, it tends to be easier to go the Ruby Way and use the gem installer. Figuring out the Ruby Way is the hard part : ) If you open your command prompt and type: gem install watir That should install Watir 1.4.1 as a Ruby gem, which will probably take care of the issue. You'll then be able to find the Watir install and unit tests under ruby/lib/ruby/gems/1.8/gems/watir . . . where the first ruby is your root ruby install directory. If that command (gem) is not a recognized command, then you do indeed have a path issue, and you might want to try reinstalling ruby under the C:\ directory, or following a howto on adding a directory to your PATH like http://www.computerhope.com/issues/ch000549.htm. Just add your ruby/ directory to the path and you should be all set. Ethan On 2/2/07, RobG [EMAIL PROTECTED] wrote: I hope this is an acceptable topic for this list... I just installed Ruby 1.8.5 on my system, and then, with much effort, managed to get the watir-1.4.1.exe installed (it has a major install bug that I was able to circumvent). So after all that, I open a command prompt into the installation location, and run all_tests.rb as instructed, and I get the errors below: C:\Program Files\Watir\unittestsall_tests.rb C:/Program Files/Watir/unittests/../unittests/setup.rb:4:in `require': no such f ile to load -- watir (LoadError) from C:/Program Files/Watir/unittests/../unittests/setup.rb:4 from C:/Program Files/Watir/unittests/all_tests.rb:4:in 'require' from C:/Program Files/Watir/unittests/all_tests.rb:4 It looks like it might be a simple pathing issue, but I'm not sure. I do have the path setup so that I can run regular ruby, but I haven't tried to add anything for watir yet; I thought I would ask here first. I don't remember having this problem about eight months ago when I first tried Watir, but that was on another computer. Any help would be appreciated. Thanks! Rob ___ 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 -- I am the most humble person in the world! ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Everyday Scripting with Ruby (the book)
The test and watir coverage seemed pretty light overall, mostly covered basic Ruby stuff like working with Strings, Arrays, RegExp etc. and programming 101 - decision structures, variables etc. Maybe good for a beginner, but didn't turn out to be what I expected. No slight to Brian with whom some of you are probably well acquainted, just didn't seem to meet my needs/expectations. I just got my copy, and I've been surfing the first 50 pages or so. For one thing, there are subtle programming hints, even in the most mundane exercises, that are very nice bits of design to learn. As an example, for one part of the very first exercise we want to ignore certain filenames in the script. Rather than a conditional statement, Brian has the scripter construct a method boring? that checks for boring strings.Blocks are also introduced before conditionals. Very slick. Even if you know this stuff, there are surprising little bits that will still probably take you by surprise, unless you are very, very good at Ruby. The book's philosophy re: testing per se is on page 4: Automating test execution is not the most efficient way to learn and Automating test execution may not be the most effective thing for you to do. But the 'test/unit' library is introduced in the second part, so testing is definitely a big part of the book. -Chris ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Unable to access a modal dialog box to select a
Hello people, I tried a few commands in an attempt to get more details about the objects in the modal dialog box. 1. Output of the command, puts ie.modal_dialog.frame(:index,1).html HTMLHEADTITLE/TITLELINK href=../../styles/css_remote/styles.css type=text/css rel=stylesheet/HEADBODY class=bodydialogFORM id=Form1 name=Form1 action=EmptyPage.aspx method=postINPUT type=hidden value=dDwtNjU0MzcyMTk1Ozs+2C7FwmeFdeDCpDsFGmQL7wdu1oU= name=__VIEWSTATE /FORM/BODY/HTML 2. output of the command, puts ie.modal_dialog.frame(:index,1).show_all_objects text/css id= hiddenname=__VIEWSTATEid= value=dDwtNjU0MzcyMTk1Ozs+2C7FwmeFdeDCpDsFGmQL7wdu1oU= alt= src= 3. Output of the command, puts ie.modal_dialog.frame(:index,1).text Blank 4. Output of the command, puts ie.modal_dialog.frame(:index,1),form(:id,'Form1').html FORM id=Form1 name=Form1 action=EmptyPage.aspx method=postINPUT type=hidden value=dDwtNjU0MzcyMTk1Ozs+2C7FwmeFdeDCpDsFGmQL7wdu1oU= name=__VIEWSTATE /FORM 5. Output of the commands, puts ie.modal_dialog.frame(:index,1).form(:id,'Form1').show_all_objects and puts ie.modal_dialog.frame(:index,1).form(:index,1).show_all_objects ---Objects in page - hiddenname=__VIEWSTATEid= value=dDwtNjU0MzcyMTk1Ozs+2C7FwmeFdeDCpDsFGmQL7wdu1oU= alt= src= 6. Output of the command, puts ie.modal_dialog.frame(:index,1).form(:index,2).html c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1145/./watir.rb:2297:in `assert_exists': Unable to locate object, using index and 2 (Watir::Exception::UnknownObjectException) 7. Output of the command, puts ie.modal_dialog.frame(:index,1).form(:index,2).show_all_objects ---Objects in page - c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1145/./watir.rb:1013:in `show_all_objects': undefined method `all' for nil:NilClass (NoMethodError) 8. Output of the command, puts ie.modal_dialog.frame(:index,1).text Blank I am not able to proceed anything beyond this. I do not know how to get the properties of the list of displayed values (from which I need to select a value) and the 'Ok' button. Also the command 'flash' is not 'flashing' the modal dialog box and the frame and the form within it. Please help me to make Watir to select a value from this dialog box and click the 'Ok' button.. Thanks for your time, Vijay. - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6357messageID=18107#18107 ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general