Re: [Wtr-general] ignoring the SELECT option
hi, sorry for my english in a list from 0 to 10 if SELECT = 0 you've just to write this variable = ie.select_list( name,ctl00$ContentPlaceHolder$ddlClientList).getAllContents varRand = variable[rand(variable.length )] varRand += 1 if varRand 10 varRand = 10 end ie.select_list(:name, ctl00$ContentPlaceHolder1$ddlClientList).select(varRand) The Rand will be not equal to 0. Disadvantage for this method : in a list from 0 to 10 you've : - 10 % to choose 1..9 - 20% to choose 10 i hope i help you - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6141messageID=17227#17227 ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Handling verification codes (shown as img), used to prevent automation
Plz mention the function for deleting that '#' character from the end of the string - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6130messageID=17233#17233 ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Handling verification codes (shown as img), used to prevent automation
I got it: ReadTextField = ReadTextField.delete # - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6130messageID=17237#17237 ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Handling verification codes (shown as img), used to prevent automation
hi, use the chop method : 1L4TR6B9#.chop #= 1L4TR6B9 i hope i help you - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6130messageID=17236#17236 ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Is there a way to make file_field.set faster?
On 1/17/07, Bret Pettichord [EMAIL PROTECTED] wrote: I also know that this was broken in 1.5 until recently, so you must have been referring to 1.4.1. Correct? No. I was referring to development gem 1.5.1.1081, the last gem that I could make FileField#set to work. I am curious whether the new implementation in 1.5 HEAD is ok. It works just fine with revision 1144. It takes only 2 seconds to set file field. Much better than 10 seconds when using development gem 1.5.1.1081. That 10 seconds are from my first report. I tried 1081 gem today and measured 13 seconds to set file field (tree tries). -- Zeljko Filipin zeljkofilipin.com ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
[Wtr-general] FireWatir version 1.0.1 released
Hi, We have released FireWatir version 1.0.1 For new features and future enhancements please go through release notes at http://code.google.com/p/firewatir/wiki/ReleaseNotes . Main features of this release are: 1. Main concern was speed. It has been improved significantly and now it's faster than Watir on IE. 2. You don't have to start the Firefox browser manually its started uisng a script. Currently it works only on windows. 3. Its platform independent as there is no platform specific component. It has been tested on Windows.Though not tested on Linux and Mac. 4. Tested on Firefox version 1.5, 1.5.0.4, 1.5.0.7 , 2.0 and 2.0.0.1 on Windows. 5. Can run script on a remote machine. Please get the code from http://code.google.com/p/firewatir and follow the installation guide document to use it. Any suggestions, comments and experiences (with FireWatir) are highly appreciated. Regards, Happy Testing using FireWatir!! FireWatir Team ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] ignoring the SELECT option
Here is my $0.02. lbDocTypeID = [] lbDocTypeID = $ie.frame(:index, 4).select_list( :name, 'DocTypeID').getAllContents cnt = rand(lbDocTypeID.length) next if #{lbDocTypeID} == (-- Select Doc Type --) $ie.frame(:index, 4).selectBox( :name, 'DocTypeID').select(#{lbDocTypeID[cnt]}) --Mark -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of sarita Sent: Tuesday, January 16, 2007 9:39 PM To: wtr-general@rubyforge.org Subject: [Wtr-general] ignoring the SELECT option In a combobox, first option is 'SELECT' for user convenience. Each time the test is run, a random option is selected from the combobox. For that I used the following code: variable = ie.select_list( :name,ctl00$ContentPlaceHolder$ddlClientList).getAllContents ie.select_list(:name, ctl00$ContentPlaceHolder1$ddlClientList).select(variable[rand(variable .length)]) Sometime SELECT option itself can be selected. Then the test fails. Want to ignore the SELECT option, please help. Regards, Sarita - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6141messageID=17224#17224 ___ 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] Two queries in Watir
hi, 1) require 'watir' # the watir controller include Watir test_site = 'http://www.rediff.com/' ie1 = IE.new ie1.goto(test_site) ie1.text_field(:name, login).set(toto) ie1.text_field(:name, passwd).set(tata) ie1.image(:src,'http://im.rediff.com/uim/news/SignUp-btn.gif').click - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6068messageID=17247#17247 ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Speed of Firewatir vs. Watir
Hi Angrez, I just installed the latest gem, 1.0.1. I ran the same test again the script errors at this line: $FF.button(:src, 'http://www.anntaylor.com/Images/Global/placeitemsinbag.gif').click I get the following error: 1) Error: test_1(TestCase): FireWatir::Exception::UnknownObjectException: Unable to locate object, using src and http://www.anntaylor.com/Images/Global/placeitemsinbag.gif C:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.0.1-mswin32/./MozillaBaseElement.rb:739:in `assert_exists' C:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.0.1-mswin32/./MozillaBaseElement.rb:897:in `click' FireWatir_AnnTaylor.rb:18:in `test_1' - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6078messageID=17256#17256 ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Is there a way to make file_field.set faster?
Željko Filipin wrote: It works just fine with revision 1144. It takes only 2 seconds to set file field. Much better than 10 seconds when using development gem 1.5.1.1081. That 10 seconds are from my first report. I tried 1081 gem today and measured 13 seconds to set file field (tree tries). Thanks for the report. The method was completely rewritten shortly after 1081, which broke it, but when i recently repaired it (with a one-word fix), it seems that the new code is in fact significantly better. Good to hear. Thanks to Charley for the new method. Bret ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] FireWatir version 1.0.1 released
Great job with FireWatir! I get these 2 errors, using ruby 1.8.4 (2005-12-24) on FireFox 1.5.0.9 1) Error: test_simply_attach_to_new_window_using_title(TC_NewWindow): FireWatir::Exception::NoMatchingWindowFoundException: Unable to locate window, using title and Pass Page C:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.0.1-mswin32/unittests/../firewatir.rb:427:in `find_window' C:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.0.1-mswin32/unittests/../firewatir.rb:364:in `attach' C:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.0.1-mswin32/unittests/../unittests/attach_to_new_window_test.rb:16:in `test_simply_attach_to_new_window_using_title' 2) Error: test_simply_attach_to_new_window_using_url(TC_NewWindow): FireWatir::Exception::NoMatchingWindowFoundException: Unable to locate window, using url and (?-mix:pass\.html) C:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.0.1-mswin32/unittests/../firewatir.rb:427:in `find_window' C:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.0.1-mswin32/unittests/../firewatir.rb:364:in `attach' C:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.0.1-mswin32/unittests/../unittests/attach_to_new_window_test.rb:24:in `test_simply_attach_to_new_window_using_url' I may have some setting to prevent popups - I'll try and find out Paul - Original Message - From: Angrez Singh To: wtr-general@rubyforge.org ; [EMAIL PROTECTED] Sent: Wednesday, January 17, 2007 6:15 AM Subject: [Wtr-general] FireWatir version 1.0.1 released Hi, We have released FireWatir version 1.0.1 For new features and future enhancements please go through release notes at http://code.google.com/p/firewatir/wiki/ReleaseNotes . Main features of this release are: 1. Main concern was speed. It has been improved significantly and now it's faster than Watir on IE. 2. You don't have to start the Firefox browser manually its started uisng a script. Currently it works only on windows. 3. Its platform independent as there is no platform specific component. It has been tested on Windows.Though not tested on Linux and Mac. 4. Tested on Firefox version 1.5, 1.5.0.4, 1.5.0.7 , 2.0 and 2.0.0.1 on Windows. 5. Can run script on a remote machine. Please get the code from http://code.google.com/p/firewatir and follow the installation guide document to use it. Any suggestions, comments and experiences (with FireWatir) are highly appreciated. Regards, Happy Testing using FireWatir!! FireWatir Team -- ___ 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] Encrypt password
hi, I need to encrypt it because i don't want to hardcode the password in the script so as to make it a bit secure from data theft .. this option is there in all the other tool such as Winrunner,QTP,TP .. maloy - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6142messageID=17267#17267 ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Encrypt password
On 1/17/07, Maloy kanti debnath [EMAIL PROTECTED] wrote: hi, I need to encrypt it because i don't want to hardcode the password in the script so as to make it a bit secure from data theft .. this option is there in all the other tool such as Winrunner,QTP,TP .. OK. How do those other tools do encryption and decription? I've never used them. Sorry, I'm not trying to be difficult, but in my experience, it's rare that data theft is an issue in a test environment. You could take Mr. Kruse's suggestion and rot13 it, which can be decoded easily, or you could use a Basic Authentication scheme which is user:password encoded in base64, and a little bit harder to decode (although wireshark/ethereal decrypts it for you on the fly), or you can use any other encryption scheme you'd like. I'll suggest that it is unlikely that any kind of password encryption will ever be built into Watir directly, but there are any number of encryption schemes available in Ruby. Google for ruby encryption to get an idea of what's available. ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] FireWatir version 1.0.1 released
Hi Paul, These errors are because either Firefox is opening new link in a new tab. or blocking up the pop up. Run the unit test alone and allow the pop ups. I think this should resolve the error. Regards, Angrez On 1/18/07, Paul Rogers [EMAIL PROTECTED] wrote: Great job with FireWatir! I get these 2 errors, using ruby 1.8.4 (2005-12-24) on FireFox 1.5.0.9 1) Error: test_simply_attach_to_new_window_using_title(TC_NewWindow): FireWatir::Exception::NoMatchingWindowFoundException: Unable to locate window, using title and Pass Page C:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.0.1-mswin32/unittests/../firewatir.rb:427:in `find_window' C:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.0.1-mswin32/unittests/../firewatir.rb:364:in `attach' C:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.0.1-mswin32/unittests/../unittests/attach_to_new_window_test.rb:16:in `test_simply_attach_to_new_window_using_title' 2) Error: test_simply_attach_to_new_window_using_url(TC_NewWindow): FireWatir::Exception::NoMatchingWindowFoundException: Unable to locate window, using url and (?-mix:pass\.html) C:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.0.1-mswin32/unittests/../firewatir.rb:427:in `find_window' C:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.0.1-mswin32/unittests/../firewatir.rb:364:in `attach' C:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.0.1-mswin32/unittests/../unittests/attach_to_new_window_test.rb:24:in `test_simply_attach_to_new_window_using_url' I may have some setting to prevent popups - I'll try and find out Paul - Original Message - *From:* Angrez Singh [EMAIL PROTECTED] *To:* wtr-general@rubyforge.org ; [EMAIL PROTECTED] *Sent:* Wednesday, January 17, 2007 6:15 AM *Subject:* [Wtr-general] FireWatir version 1.0.1 released Hi, We have released FireWatir version 1.0.1 For new features and future enhancements please go through release notes at http://code.google.com/p/firewatir/wiki/ReleaseNotes . Main features of this release are: 1. Main concern was speed. It has been improved significantly and now it's faster than Watir on IE. 2. You don't have to start the Firefox browser manually its started uisng a script. Currently it works only on windows. 3. Its platform independent as there is no platform specific component. It has been tested on Windows.Though not tested on Linux and Mac. 4. Tested on Firefox version 1.5, 1.5.0.4, 1.5.0.7 , 2.0 and 2.0.0.1 on Windows. 5. Can run script on a remote machine. Please get the code from http://code.google.com/p/firewatir and follow the installation guide document to use it. Any suggestions, comments and experiences (with FireWatir) are highly appreciated. Regards, Happy Testing using FireWatir!! FireWatir Team -- ___ 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] how to catpure image
hi, I have a problem saving image or getting image from a web site can any one please help me i tried a) image(:alt,'name').save(path) b) image(:alt,'name').getImage( how, what ) which is in Watir::SupportsSubElements module or if i am wrong please give me the exect syntax for doing so thank you maloy - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6155messageID=17275#17275 ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] how to catpure image
Hi, the method save run corretly for me : test_site = 'http://site/' ie1 = IE.new ie1.goto(test_site) ie1.image(:src,'http://site/images/logo.gif').save(c:\\logo.gif) Here the 'save As' window is opened. I hope I help you - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6155messageID=17276#17276 ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general