Hi Jared Currently, I would like get test the data in table as like this ----------------------------------------------- |Time | Event |... ----------------------------------------------- |2005/07/19 10:49:30 |Exposure end (normal) ----------------------------------------------- |2005/07/19 10:58:12 |Event 2 ----------------------------------------------- |2005/07/19 11:03:44 |Exposure end (Error) ----------------------------------------------- ...
Bc have several table like this, so I develop the procedure check the result Def check_result(array_input, expected_result) .... End So I would like to know the array_input content how many data, And I compare one by one with expected_result Thank for help Hue -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, July 25, 2005 11:20 AM To: wtr-general@rubyforge.org Subject: Wtr-general Digest, Vol 20, Issue 39 Send Wtr-general mailing list submissions to wtr-general@rubyforge.org To subscribe or unsubscribe via the World Wide Web, visit http://rubyforge.org/mailman/listinfo/wtr-general or, via email, send a message with subject or body 'help' to [EMAIL PROTECTED] You can reach the person managing the list at [EMAIL PROTECTED] When replying, please edit your Subject line so it is more specific than "Re: Contents of Wtr-general digest..." Today's Topics: 1. new support for referencing frames (Bret Pettichord) 2. finding javascript-created browser window (Kurt Sussman) 3. Re:Multiple Inheritance (boni uday) 4. Re: Access is denied and Exception Errors (Bret Pettichord) 5. RE: finding javascript-created browser window (Zeljko Filipin) 6. Re: finding javascript-created browser window (Bret Pettichord) 7. Get 2D Array size? (Hue Mach Dieu) 8. Re: finding javascript-created browser window (Shao Kang Tat) 9. Re: finding javascript-created browser window (Kurt Sussman) 10. Re: Get 2D Array size? (Jared Quinert) ---------------------------------------------------------------------- Message: 1 Date: Fri, 22 Jul 2005 18:49:31 -0500 From: Bret Pettichord <[EMAIL PROTECTED]> Subject: [Wtr-general] new support for referencing frames To: wtr-general@rubyforge.org Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset="us-ascii"; format=flowed I have committed changes that allow you to reference frames using id's or regexps: ie.frame(:name, /foo/) ie.frame(:id, 'whatever') Bret _____________________ Bret Pettichord www.pettichord.com ------------------------------ Message: 2 Date: Sat, 23 Jul 2005 00:30:31 -0700 From: Kurt Sussman <[EMAIL PROTECTED]> Subject: [Wtr-general] finding javascript-created browser window To: wtr-general@rubyforge.org Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset=us-ascii I'm trying to write a script that tests a relatively simple web app. There are two factors that make this difficult: the page I need to test is created by a javascript function (indirectly via a link), and the developers are unwilling to make any changes to that code to increase testability. My first thought was to sleep for a while, waiting for the javascript function to run and load the new window, then find it by name. This isn't working for me and I can't figure out why. Any ideas? If the archives were searchable, I'd search them before asking... I hope this isn't a common question. I did browse the archives, but that's not the same as searching. Thanks. --Kurt -- ---------------------------------------------------------------------- Merlot Research Group, Inc http://www.merlot.com kls[at]merlot.com GPG key 82505A74 Jabber: MerlotQA ------------------------------ Message: 3 Date: Sat, 23 Jul 2005 10:39:55 +0100 (BST) From: boni uday <[EMAIL PROTECTED]> Subject: [Wtr-general] Re:Multiple Inheritance To: ruby form <wtr-general@rubyforge.org> Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset="iso-8859-1" Hi I've One user defined calss whose defination is as follows: class TestForViewingProjectDetails < Test::Unit::TestCase def x end end Now i want to inherit another class (CreateLogger) for this class Is it possible pls help me --------------------------------- How much free photo storage do you get? Store your friends n family photos for FREE with Yahoo! Photos. http://in.photos.yahoo.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050723/3457d129/attachment-0001.htm ------------------------------ Message: 4 Date: Sat, 23 Jul 2005 12:04:00 -0500 From: Bret Pettichord <[EMAIL PROTECTED]> Subject: Re: [Wtr-general] Access is denied and Exception Errors To: wtr-general@rubyforge.org Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset="iso-8859-1"; format=flowed Try these: ie.goto("https://qa-b1.test.com/araneae/login") ie.goto("https://qa-b1.test.com/include/blank.html") Bret At 06:27 PM 7/22/2005, Tuyet Cong-Ton-Nu wrote: >You are right. The development servers can serve the page from different >servers because there is a traffic cop server that manages the load. I >don t think that s the case for our staging server. > >I hope I included the info you need below, but if not, please let me know >the exact irb command result(s) I need to send you. Thanks! I appreciate it. > > > > > >irb(main):008:0> ie = Watir::IE.new > >=> #<Watir::IE:0x2ad45b8 @defaultSleepTime=0.1, >@error_checkers=[#<Proc:0x02ac09 > >[EMAIL PROTECTED]:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1213>], >@logger=#<Watir::DefaultLogge > >r:0x2ad44c8 @level=2, @datetime_format="%d-%b-%Y %H:%M:%S", @progname=nil, >@logd > >ev=#<Logger::LogDevice:0x2ad43f0 @shift_age=nil, @filename=nil, >@dev=#<IO:0x278e > >7d0>, @shift_size=nil>>, @typingspeed=0.08, >@activeObjectHighLightColor="yellow" > >, @enable_spinner=false, @url_list=[], @form=nil, @ie=#<WIN32OLE:0x2ad4558>> > > > >irb(main):009:0> ie.goto("https://qa-b1.test.com/araneae/app") > >W, [22-Jul-2005 16:11:30#2708] WARN -- : frame error in waitdocument > > OLE error code:80070005 in <Unknown> > > Access is denied. > > > > HRESULT error code:0x80020009 > > Exception occurred. > >c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1470:in `method_missing' > >c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1470:in `waitForIE' > >c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1469:in `upto' > >c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1469:in `waitForIE' > >c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1332:in `goto' > >(irb):9:in `irb_binding' > >c:/ruby/lib/ruby/1.8/irb/workspace.rb:52:in `irb_binding' > >c:/ruby/lib/ruby/1.8/irb/workspace.rb:52 > >W, [22-Jul-2005 16:11:30#2708] WARN -- : runtime error in wait > >=> 0.391 > > > >irb(main):010:0> ie.html > >=> "<FRAMESET border=0 frameSpacing=0 rows=0,* frameBorder=0><FRAME >border=0 nam > >e=relay marginWidth=0 marginHeight=0 src=\"/include/blank.html\" >frameBorder=\"\ > >" noResize scrolling=no><FRAME border=0 name=main marginWidth=0 >marginHeight=0 s > >rc=\"/araneae/login\" frameBorder=0 scrolling=no></FRAMESET>" > >irb(main):011:0> ie.show_frames > >there are 2 frames > >frame index: 0 --Access Denied-- > >frame index: 1 --Access Denied-- > >ð 0..1 > > > >irb(main):012:0> ie.frame(:index, 1).show_all_objects > >-----------Objects in page ------------- > >WIN32OLERuntimeError: document > > OLE error code:80070005 in <Unknown> > > Access is denied. > > > > HRESULT error code:0x80020009 > > Exception occurred. > > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1844:in `method_missing' > > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1844:in `getDocument' > > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1667:in > `show_all_objects' > > from (irb):12 > > > >irb(main):013:0> ie.frame(:index, 2).show_all_objects > >-----------Objects in page ------------- > >WIN32OLERuntimeError: document > > OLE error code:80070005 in <Unknown> > > Access is denied. > > > > HRESULT error code:0x80020009 > > Exception occurred. > > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1844:in `method_missing' > > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1844:in `getDocument' > > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1667:in > `show_all_objects' > > from (irb):13 > > > >irb(main):015:0> ie.show_all_objects > >-----------Objects in page ------------- > > id= src=/include/top.js > >HTML >Document name=relay id= src=/include/blank.htm > >l > >HTML Document name=main id= src=/araneae/login > > > >ð nil > > > > > >irb(main):016:0> ie.frame("main").show_all_objects > >Watir::Exception::UnknownFrameException: Unable to locate a frame with >name main > > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1832:in `initialize' > > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:218:in `new' > > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:218:in `frame' > > from (irb):16 > > from :0 > > > >irb(main):017:0> ie.frame("relay").show_all_objects > >Watir::Exception::UnknownFrameException: Unable to locate a frame with >name relay > > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1832:in `initialize' > > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:218:in `new' > > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:218:in `frame' > > from (irb):17 > > from :0 >_______________________________________________ >Wtr-general mailing list >Wtr-general@rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com ------------------------------ Message: 5 Date: Sat, 23 Jul 2005 22:49:44 +0200 From: "Zeljko Filipin" <[EMAIL PROTECTED]> Subject: RE: [Wtr-general] finding javascript-created browser window To: <wtr-general@rubyforge.org> Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset="us-ascii" For searching archives try this in Google: site:rubyforge.org "[Wtr-general]" javascript (instead of "javascript" you can use anything you think can be usefull) Zeljko -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Kurt Sussman Sent: Saturday, July 23, 2005 9:31 AM To: wtr-general@rubyforge.org Subject: [Wtr-general] finding javascript-created browser window I'm trying to write a script that tests a relatively simple web app. There are two factors that make this difficult: the page I need to test is created by a javascript function (indirectly via a link), and the developers are unwilling to make any changes to that code to increase testability. My first thought was to sleep for a while, waiting for the javascript function to run and load the new window, then find it by name. This isn't working for me and I can't figure out why. Any ideas? If the archives were searchable, I'd search them before asking... I hope this isn't a common question. I did browse the archives, but that's not the same as searching. Thanks. --Kurt -- ---------------------------------------------------------------------- Merlot Research Group, Inc http://www.merlot.com kls[at]merlot.com GPG key 82505A74 Jabber: MerlotQA _______________________________________________ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general ------------------------------ Message: 6 Date: Sun, 24 Jul 2005 01:02:13 -0500 From: Bret Pettichord <[EMAIL PROTECTED]> Subject: Re: [Wtr-general] finding javascript-created browser window To: wtr-general@rubyforge.org Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset="us-ascii"; format=flowed At 02:30 AM 7/23/2005, Kurt Sussman wrote: >I'm trying to write a script that tests a relatively simple web app. >There are two factors that make this difficult: the page I need to test >is created by a javascript function (indirectly via a link), and the >developers are unwilling to make any changes to that code to increase >testability. > >My first thought was to sleep for a while, waiting for the javascript >function to run and load the new window, then find it by name. This >isn't working for me and I can't figure out why. > >Any ideas? > >If the archives were searchable, I'd search them before asking... I hope >this isn't a common question. I did browse the archives, but that's not >the same as searching. > >Thanks. This is the biggest weakness with Watir: modal javascript popups. None of us have figured out a way to get to the popups DOM, and from what i've been able to tell, this actually stems from a weakness in the DOM specification, rather than a fault in the Microsoft implementation. I did find a MS technical note that indicated a workaround, but it would have to be coded in C and would require an optional Accessibility feature -- i'm not sure whether it is worth pursuing. (I'm offline at the moment, google for ihtmldocument2 and its the third or fourth link.) In the mean time, the best we've been able to to do is to send key events to the popup window to get it to go away. This "solution" is in the FAQ. Bret _____________________ Bret Pettichord www.pettichord.com ------------------------------ Message: 7 Date: Mon, 25 Jul 2005 10:06:38 +0700 From: "Hue Mach Dieu" <[EMAIL PROTECTED]> Subject: [Wtr-general] Get 2D Array size? To: <wtr-general@rubyforge.org> Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset="us-ascii" Dear ALL I would like get size of 2D array, as like this table_data = ie.frame("rightframe").frame("result").table(:id, "table").to_a puts table_data.length But it's seemed incorrect. And Do you have any suggestion for verify value in table? Thank you for help Hue ------------------------------ Message: 8 Date: Sun, 24 Jul 2005 23:46:47 -0400 From: Shao Kang Tat <[EMAIL PROTECTED]> Subject: Re: [Wtr-general] finding javascript-created browser window To: wtr-general@rubyforge.org Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset=ISO-8859-1 Speaking of modal dialogs, one of the developers from my company has figured out a way to deal with them (by changing them into regular pop ups at run time). There is one trick that must be employed, and that is to have a check in the Javascript code, for example, in pseudo code (since I don't remember the exact coding from home) if showModal not defined give a regular alert box else show them the modal dialog end Now, in the browser, if you type in the URL: javascript: var x; showModal = x; and hit enter any action you do that would normally generate the modal dialog would generate a regular alert pop up which you can use autoit to get rid of. The only problem with this is that if you use WATIR to set the URL to line mentioned above, it hangs.. ------------------------------ Message: 9 Date: Sun, 24 Jul 2005 21:17:37 -0700 From: Kurt Sussman <[EMAIL PROTECTED]> Subject: Re: [Wtr-general] finding javascript-created browser window To: wtr-general@rubyforge.org Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset=us-ascii Bret Pettichord ([EMAIL PROTECTED]) typed this ... > At 02:30 AM 7/23/2005, Kurt Sussman wrote: > >I'm trying to write a script that tests a relatively simple web app. > >There are two factors that make this difficult: the page I need to test > >is created by a javascript function (indirectly via a link), and the Replying to myself... I think the 'attach' method might work for me... I'll check as soon as my test system is available again. http://rubyforge.org/pipermail/wtr-general/2005-June/002142.html > >If the archives were searchable, I'd search them before asking... I hope Thatks for the reminder about google's 'site:' tag. That helped a lot. > This is the biggest weakness with Watir: modal javascript popups. It's not a modal javascript popup; it's a new browser window spawned by a javascript function. The original page goes to a new URL after spawning the new window. > In the mean time, the best we've been able to to do is to send key events > to the popup window to get it to go away. This "solution" is in the FAQ. I don't want the popup to go away. The app I need to test is in it. If I wanted it to go away, the FAQ would probably have gotten me there. Does this clarify the problem I'm having? Do you think the 'attach' method is the right approach? Now I'm trying to get my client to think about giving the testers a direct URL instead of this javascript-spawned indirection. The dev-test people test the engine without these tricks on the front end; their clients add all kinds of impediments to testing the apps that are built using the engine. Maybe the solution is bureacratic instead of technical. #:) Thanks for the tips. --Kurt -- ---------------------------------------------------------------------- Merlot Research Group, Inc http://www.merlot.com kls[at]merlot.com GPG key 82505A74 Jabber: MerlotQA ------------------------------ Message: 10 Date: Mon, 25 Jul 2005 14:24:45 +1000 From: Jared Quinert <[EMAIL PROTECTED]> Subject: Re: [Wtr-general] Get 2D Array size? To: wtr-general@rubyforge.org Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset=ISO-8859-1; format=flowed What was returned, and what were you expecting? Could you get the information by using table.row_count and table.column_count? Jared Hue Mach Dieu wrote: >Dear ALL >I would like get size of 2D array, as like this > >table_data = ie.frame("rightframe").frame("result").table(:id, >"table").to_a > >puts table_data.length > >But it's seemed incorrect. > >And Do you have any suggestion for verify value in table? > >Thank you for help > >Hue > > >_______________________________________________ >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 End of Wtr-general Digest, Vol 20, Issue 39 ******************************************* _______________________________________________ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general