[Wtr-general] DL::DLError: too many callbacks are defined
After running a lengthy script that processes lots of modal dialogs and javascript alerts, I get the infamous error, DL::DLError: too many callbacks are defined. I am running Ruby 1.8.5-21 and Watir 1.5.0.1100 and it has been able to handle modal dialogs and javascript alerts with a modification to watir.rb (added include Win32 stmt after line “module PageContainer”) I reviewed 2 threads on this issue, each with their own modifications to winClicker.rb. The first solution removes return statements from enum procs for getChildHandle and getWindowHandle. The second solution adds DL.remove_callback to winClicker.rb methods with DL.callback calls. Looking at winClicker.rb, I see the 2nd solution implemented for Watir 1.5.0.1100. Is there a validated solution for this problem? - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6594messageID=18826#18826 ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Referencing dynamically generated objects
Thanks Brett, that worked! Is there documentation that describes the arguments available for each object? - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=5974messageID=16751#16751 ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Select List in Modal Dialog
It turns out that there are multiple paths to my select_list and one of them worked. - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=5982messageID=16771#16771 ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] CRITICAL---Clicking Image Button in Application
Woud you post the html for the image? - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=5867messageID=16714#16714 ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
[Wtr-general] Referencing dynamically generated objects
Happy New Year! p I have a question that concerns dynamically generated html tags and how to reference them. In a specific frame, a certain operation creates a new object. This object was given a name by my automation tool to make it unique and recognizable by my tool. p I can reference the object using ...image( :id,'imgTreeNodePlusMinus_8158' ) which is a product generated identifier which is a value that I cannot predict. What I want to use is the identifier that my tool generates, in this case 'A0MGdyn0.78108587205286'. p The html for the object is: p Active Element: [SPAN], Frame: [fraNavigation], Index: [150] SPAN class=DATAZONE-TREE-NODE-TEXT id=spnNodeText_8158 onmouseover=treeItemMouseOver(); style=COLOR: #7d69d6; TEXT-DECORATION: underline onclick=navToASPPageForNode(); onmouseout=treeItemMouseOut(); udefModuleID=8 udefNodeDesc=A0MGdyn0.78108587205286 for DEV2003DC udefModuleName=Administration udefNodeID=158 udefASP= udefContext=machines udefNodeTitle=A0MGdyn0.78108587205286 udefHelp=AdminMachMngrMGDynam.htm udefParentNodeID=7 A0MGdyn0.78108587205286/SPAN p The only unchanging identifier for this object is the value 'A0MGdyn0.78108587205286'. Is there a way to reference the object using this value? p I have tried: .image( :id, /A0MGdyn0.78108587205286/ ).click .image( :id, 'A0MGdyn0.78108587205286' ).click .image( :title, 'A0MGdyn0.78108587205286' ).click as well as .span with the above parameters. - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=5974messageID=16727#16727 ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Simulate CNTRL-LEFT CLICK
Here is the html for the object I want to control-leftclick: I do not see that action described in the html, but I can manually make it happen. ie.frame('fraNavigation').span(:id,'spnNodeText_120').html = SPAN class=DATAZONE-TREE-ITEM-TEXT id=spnNodeText_120 onmouseover=treeItemMouseOver(); style=\CURSOR: wait; COLOR: white; BACKGROUND-COLOR: yellow; TEXT-DECORATION: none\ onclick=navToASPPageForNode(); onmouseout=treeItemMouseOut(); udefModuleID=\1\ udefNodeDesc=\This view shows a central repository of Event Log Settings for all machines in the Machine Group. Event Log Settings determin e log size and overwrite policy (what happens when the log fills up). Tip: Watch the oldest event to determine if your log size is correct. If log sizes are too small, the oldest event will be very recent.\ udefModuleName=\Console\ u defNodeID=\20\ udefASP=\LaunchNodeSRSReport.asp?strReportPath=/ECM Reports/Standard/strReportName=Node - Event LogSettingsstrAltASP=datazone_list_grid.aspSRSListCol=evt_settings_source\ udefContext=\machines\ udefNodeTitle=\Settings\ udefHelp=\ConEventLogSettings.htm\ udefParentNodeID=\18Settings/SPAN - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=5490messageID=16565#16565 ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Simulate CNTRL-LEFT CLICK
I have seen examples that double click on an object ( fire_event(onDblClick) ), but have been unable to simulate a Control-Left Click. Any ideas? - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=5490messageID=16331#16331 ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Simulate CNTRL-LEFT CLICK
The control left click on a specific object will invoke a frame with a list of data. No url's involved... - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=5490messageID=16357#16357 ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] How to Find count for the text_field with same names
That's where accessing an object by index may work. Try something like: ie.frame('ifyouhaveaframe').button(:index,2).html to see if it is accessing the correct object, then .click it. - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=5774messageID=16189#16189 ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Memory access errors
Reinstalling IE6 fixed the problem. It appears that an install of QTP6 affected some critical dlls. - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=4779messageID=15781#15781 ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Deeply Nested html from Microsoft Report Server Viewer
Using irb, flashing areas of the report window, and following html links eventually gets to answers. - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=5041messageID=15783#15783 ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Modal Dialog dismissal launching Javascript alert window
Managed to get this working, using click within modal_dialog and the recommended javascript alert window processing code. - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=4892messageID=15782#15782 ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] setting text field in table
Thanks Paul. Referencing the text_field by index does indeed work. - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=5520messageID=15507#15507 ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
[Wtr-general] setting text field in table
This problem seems to defy conventional solutions. Does someone have a solution ? The html: irb ie.frame('fraDataZone').table(:index,1).table(:index,1)[1].html = \r\nTR udefReportName=\Dashboard - Machine Change Management\TD vAlign=bottom align=right udefParmName=\StartDate\Start Date/TD\r\nTDINPUT value=\11/22/2006 2:53:28 PM\/TD/TR The screen has a lable, Start Date, followed by a text field. I have tried accessing the text field by :name and :id, and irb just whines: irb ie.frame('fraDataZone').table(:index,1).table(:index,1)[1].text_field(:name,'Start Date').set('11/11/2005 12:00:00PM') irb ie.frame('fraDataZone').table(:index,1).table(:index,1)[1][2].text_field(:name,'Start Date').set('11/11/2005 12:00:00PM') Watir::Exception::UnknownObjectException: Unable to locate object, using name and Start Date - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=5520messageID=15373#15373 ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
[Wtr-general] Simulate CNTRL-LEFT CLICK
I have the following html and I want to navigate to Best Practices - Operating System and CNTL-LEFT CLICK. 1) How do I reference that value? 2) How can a CNTRL-LEFT CLICK be simulated? irb ie.frame('fraDataZone').form(:index,2).html = \r\nFORM id=frmGridParms style=\DISPLAY: none\ action=# method=post target=\\INPUT id=lngNodeID type=hidden value=109 name=lngNodeID INPUT id=strModuleName type=hidden value=Compliance name=strModuleName INPUT id=lngModuleID type=hidden value=2 name=lngModuleID INPUT id=strNodeTitle type=hidden value=\Best Practices - Operating Systems\ name=strNodeTitle INPUT id=strNodeName type=hidden name=strNodeName INPUT id=strNodeDescription type=hidden name=strNodeDescription INPUT id=strNodeImage type=hidden value=http://perform-coll/L1033/images/imgIcoComplTemplateSetFolder16.gif name=strNodeImage INPUT id=strDataFilter type=hidden name=strDataFilter INPUT id=strSRSFilter type=hidden name=strSRSFilter INPUT id=strDataFilterOriginal type=hidden name=strDataFilterOriginal INPUT id=strFilterOn type=hidden value=0 name=strFilterOn INPUT id=strFilterOnOriginal type=hidden value=0 name=strFilterOnOriginal INPUT id=strHelp type=hidden value=CompTemplates IncRuleGrp.htm name=strHelp INPUT id=strShowTitle type=hidden value=1 name=strShowTitle INPUT id=strContext type=hidden value=machines name=strContext INPUT id=strReportName type=hidden value=\Node - Compliance Results\ name=strReportName INPUT id=strReportPath type=hidden value=\Reports/Standard/\ name=strReportPath INPUT id=strParameters type=hidden value=RunID;11 name=strParameters INPUT id=strSRSSummary type=hidden value=1 name=strSRSSummary INPUT id=strAltASP type=hidden value=datagrid.asp name=strAltASP INPUT id=Dashboard type=hidden value=0 name=Dashboard INPUT id=SRSListCol type=hidden name=SRSListCol INPUT id=SRSListColOriginal type=hidden name=SRSListColOriginal INPUT id=strComplianceResults type=hidden value=1 name=strComplianceResults INPUT id=strReportWindowStatus type=hidden value=closed name=strReportWindowStatus INPUT id=DynamicParmName type=hidden name=DynamicParmName INPUT id=DynamicParmValue type=hidden name=DynamicParmValue /FORM - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=5490messageID=15296#15296 ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] WIN32OLERuntimeError - I get this error after two hours - see details
Can you break up the test into smaller chunks? Say test1 checks one type of link and exits, Test2 checks another type of link and exits, Perhaps this workaround will get you more complete results, assuming it's a timing or space issue. - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=5183messageID=14406#14406 ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
[Wtr-general] Deeply Nested html from Microsoft Report Server Viewer
I am dealing with many reports that were generated from the Microsoft Report Server Viewer, according to the html. I want to code a wait_until that senses when the report is done being generated. Each report has a Document Map that appears after the message 'Report is being generated' disappears. For 2 reports I have been able to find the html and text that has a value of either or Document Map and signals that the report has been generated. It was buried 3 frames deep. Is there a way to speed up the search in heavily nested html? Using irb, it's a game of manually following many paths - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=5041messageID=14032#14032 ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Javascript Alert windows
I tried method 1 and method 2, with no success. I am using Watir 1.5 to support modal dialogs. Using irb I can access certain portions of the Javascript alert window, such as the title (I attach to the window by title) and 3 text areas that are DIV areas. The window has 2 buttons at the bottom. I want to click on the CLOSE button. I have tried accessing the button as follows: ie.table(:index,1)[5].image(:id,'imgFinishButton').flash The button is defined outside of a SPAN or DIV but is within a TABLE. Here is the html that contains that button (id='imgFinishButton'): irb ie.table(:index,1)[5].html = \r\nTRTD class=wizButtons colSpan=2 height=27IMG height=19 src=\images/spacer.gif\ width=10 align=left INPUT id=imgHelpButton onmouseover=swapImage(); onfocus=checkFocus(); onclick=cmdHelp_Click(); onmouseout=swapImage(); type=image height=20 width=80 src=\http://qlwdmunns2k3/ecm4/L103 3/images/imgHelpButton.gif\ align=left border=0 udefDisabled=\false\ \r\nDIV style=\DISPLAY: none\INPUT id=imgCancelButton onmouseover=swapImage(); onfocus=checkFocus(); onclick=cmdCancel_Click(); onmouseout=swapImage(); type=image height=20 width=80 src=\images\\imgCancelButton.gif\ bord er=0 udefDisabled=\false\ IMG height=19 src=\images/spacer.gif\ width=8 INPUT id=imgBackButton onmouseover=swapImage(); onfocus=checkFocus(); accessKey=B onclick=cmdBack_Click(); onmouseout=swapImage(); type=image height=20 width=80 src=\http://qlwdmunns2k3/ecm4/L1033/images/imgBackButtonDi sabled.gif\ border=0 udefDisabled=\true\ udefACCESSKEY=\2\ IMG height=19 src=\images/spacer. gif\ width=8 INPUT id=imgNextButton onmouseover=swapImage(); onfocus=checkFocus(); accessKey=N onclick=cmdNext_Click(); onmouseout=swapImage(); type=image height=20 width=80 src=\http://qlwdmunns2 k3/ecm4/L1033/images/imgNextButtonDisabled.gif\ border=0 udefDisabled=\true\ udefACCESSKEY=\14\ IMG height=19 src=\images/spacer.gif\ width=8 /DIVINPUT id=imgFinishButton onmouseover=swap Image(); onfocus=checkFocus(); onclick=cmdFinish_Click(); onmouseout=swapImage(); type=image height=20 width=80 src=\http://qlwdmunns2k3/ecm4/L1033/images/imgCloseButton.gif\; border=0 udefDisabled=\false\ IMG height=19 src=\images/spacer.gif\ width=10 /TD/TR - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=4669messageID=13906#13906 ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Handling multiple versions of a website [advice needed]
I have written a product testing tool that automates the navigation (detecting GUI changes) through 320+ classes in a web-based gui. It also generates performance measurements. The tool is designed in 3 levels ( each in an rb file): 1) the high level test classes (named to easily map to the GUI object screen labels) and a main method with navigation steps, 2) a middle level that processes table row and column data, and 3) a low level that identifies each web object by html tag. The product's GUI does change with each release and even between builds. Separating the html tag identifiers (level 3) from the data level (level 2) from the navigation (level 1) helps with these changes in that it is easy to know which file and class needs changing. Additions are also easily made to the correct file, so entropy does not creep in, maintenance does not suffer. By incorporating the test automation tool into the product build process, the goal is to determine when the product is ready to hand over to the QA dept. Time will tell if this simple approach can keep up with a commercial software product lifecycle. - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=4936messageID=13721#13721 ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Modal Dialog and checkbox
Without a sufficient delay (in this case 10 seconds), checkboxes are not recognized in the modal dialog - running (nodebug) in Eclipse or running from the command line. This workaround is simple and acceptable short term. Would retry logic in watir be a possible long term solution? - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=4874messageID=13555#13555 ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
[Wtr-general] Modal Dialog and checkbox
I am navigating a modal dialog with radio buttons, buttons, and checkboxes. Everything works when I run in debug mode (using Eclipse). When I run nondebug, the checkbox identifiers (by id) are not recognized. Example code: ie.modal_dialog.checkbox( :id, 'inpCheckBoxDC_19' ).set ie.modal_dialog.checkbox( :id, 'inpCheckBoxDC_23' ).set ie.modal_dialog.checkbox( :id, 'inpCheckBoxDC_20' ).set ie.modal_dialog.checkbox( :id, 'inpCheckBoxDC_1' ).set ie.modal_dialog.checkbox( :id, 'inpCheckBoxDC_2' ).set I added a sleep stmt between checkbox stmts to slow things down and watir still complains: in `assert_exists': Unable to locate object, using id and inpCheckBoxDC_19 (Watir::Exception::UnknownObjectException) Any tips on how to make watir happy? - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=4874messageID=13517#13517 ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Modal Dialog and checkbox
I'll answer my own question. If the code sleeps long enough, in this case 10 seconds, the checkboxes are recognized and set. This seems to be the common cure for Modal dialog-itis - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=4874messageID=13530#13530 ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Memory access errors
The error comes from an iexpore.exe - Application Error window: The instruction at 0x4a5b02f1 referenced memory at 0x0004. The memory could not be read. At 1st I thought it was my test tool, but when I run the product I am testing, I get the same error message. I reinstalled the product as well as Ruby and Watir and still get this error. Why would IE suddenly start complaining? Could Ruby/watir corrupt files in IE? - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=4779messageID=13296#13296 ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] cell access
Span and theIndex are good for locating items. In order to construct a loop and access all items, how does one find out the number of items in a span element? - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=4509messageID=13072#13072 ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
[Wtr-general] links in a frame
After reviewing the forum and trying various ways to access a list of links in a frame, I now ask here. Given a frame that appears to contain a list of links, how does one click on one of these links? Using irb, I have tested variants on: ie.frame(fraDataZone).link(:text, ADF).click irb returns an UnknownObjectException: Unable to locate object, using text and AFD I am guessing that I am dealing with a list of links, is there a way to verify this? - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=4718messageID=13033#13033 ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] links in a frame
Thanks to other postings, I found a solution using irb which is extremely helpful. 0) irb 1) ie = Watir::IE.start(url of product) 2) ie = Watir::IE.attach( :title, / Product Title/) 3) ie.show_frames 4) ie.frame(frame-of-interest).show_frames 5) ie.frame(frame-of-interest).frame(nested-frame-of-interest).show_frames 6) ie.frame(frame-of-interest).frame(nested-frame-of-interest) .frame(:index,1).span(:text,list-value-of-interest).click Even though the items in the list appeared as links, the span class was the key to accessing the object of interest. - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=4718messageID=13044#13044 ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] How do you access an image that doesn't have img in the HTML tag?
Try ie.button( :src, \images\SelectRow1.gif ).click You may to specify the full directory path (C:\whatever...\images\SelectRow1.gif) - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=4672messageID=12948#12948 ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
[Wtr-general] Navigating in IE frames
Hi. I am building a test tool to automate navigation through a UI with IE frames. Text fields, buttons, lists, and web dialog boxes are all targets for my tool. The examples I see in the watir user guide don't mention frames. I have tried navigating to a text field, using the user guide example, but watir complains that my text field identifier (inpListFilter) is not found (I identified it with SpySmith). Do I have to qualify the identifier with a frame name or set the frame context ? Here is the offending line: ECMTestFixture.text_field(:name, inpListFilter ).set(adm ) - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=3459messageID=9657#9657 ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general