GNOME Bugzilla – Bug 415167
LDTP should recognize window or widget by any of property of its.
Last modified: 2008-08-28 09:50:22 UTC
From at-poke, we can see each widget has many properties on it, like position, size, label, etc, from appmap, we can also see each widget has other properties on it, like index, parent, etc. But for now, ldtp only use label to operate them, like btnNew for hasing 'New' text on one button. For position we think we can also test on some unknown widget, for index, we can test for some dynamic changing label, etc, if only ldtp supported. Is it convenient to add thoes feature to ldtp? I met following issues if ldtp plan to add:) 1. For passing param as widget for componentName, how to define these properties, like coordinate, index, etc. 2. In one window, if there are two widgets have same child_index but the parant are difference, btn0={class=push_button,parent=flr1,child_index=0} btn1={class=push_button,parent=flr1,child_index=2} btnDetails={class=push_button,parent=flr11,child_index=0,label=Details} btnNew={class=push_button,parent=flr11,child_index=1,label=New} btnGoto={class=push_button,parent=flr11,child_index=2,label=Go to} however, for testing, we hope that we can deal with btn0 and btnDetails by ordered index, like click('frmtasks', 'btn#1') and click('frmtasks', 'btn#2'), so how to resolve this problem?
Two widgets should not have same child index and parent. Then there is a bug. Could you help me to reproduce this issue with an application in GNOME environment ?
I'll try later -Lavi,
Lavi, fixed them as part of 1.3.0 release, could you please retry the format btn#1, btn#2 etc ? As of now, this doesn't work well for window title ! except that, things are working fine in my test environment.
It's quite amazing, I will try that asap, much appreciated, nags. Lavi,
Oh, yes, it fixed. Congrats !! Python 2.5.1 (r251:54863, Mar 7 2008, 04:10:12) [GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import ldtp ldtp>>> frm = '*-gedit' >>> ldtp.getobjectlist(frm) Warning: AT-SPI error: pre method check: add: Unknown CORBA exception id: 'IDL:omg.org/CORBA/COMM_FAILURE:1.0' Warning: AT-SPI error: pre method check: add: Unknown CORBA exception id: 'IDL:omg.org/CORBA/COMM_FAILURE:1.0' Warning: AT-SPI error: pre method check: add: Unknown CORBA exception id: 'IDL:omg.org/CORBA/COMM_FAILURE:1.0' [u'mnuAutocheckSpelling', u'lbl', u'mnuVB.NET', u'mnuDTD', u'mnuCSS', u'mnuPerl', u'mnuBottomPane', u'mnuEdit', u'lblDocuments', u'tchDocuments', u'mnuFindNext', u'mnuContents', u'mnuMakefile', u'mnuIncrementalSearch', u'stat0', u'mnuEmpty', u'btnRedo', u'mnu.desktop', u'mnuSelectAll', u'mnuDiff', u'uknprint', u'mnuDocuments', u'mnuReportaProblem', u'ukngtk-file', u'mnuFind', u'mnuLaTeX', u'btnclose', u'uknopen', u'mnuGAP', u'mnuC++', u'mnuVerilog', u'ptabUnsavedDocument1', u'btnNew', u'mnuEmpty1', u'mnuHighlightMode', u'mnuEmpty2', u'mnuTexinfo', u'mnuEmpty3', u'mnuErlang', u'mnuEmpty4', u'pnl0', u'mnuEmpty5', u'pnl1', u'mnuEmpty6', u'pnl2', u'mnuInsertDateandTime', u'mnuEmpty7', u'mnuPageSetup', u'pnl3', u'mnuEmpty8', u'pnl4', u'mnuEmpty9', u'pnl5', u'pnl10', u'mnuGotoLine', u'mnuUnsavedDocument1', u'pnl6', u'pnl11', u'pnl7', u'pnl12', u'mnuScripts', u'pnl8', u'pnl13', u'mnuOpenLocation', u'pnl9', u'pnl14', u'mnuUndo', u'btnFind', u'pnl15', u'pnl16', u'pnl17', u'pnl18', u'lblINS', u'pnl19', u'mbr0', u'scpn0', u'scpn1', u'mnuSaveAs', u'mnuC#', u'statLn1,Col1', u'mnugettexttranslation', u'mnuSearch', u'btnCut', u'flr10', u'mnupkg-config', u'mnuPascal', u'btnclose1', u'mnuCloseAll', u'mnuCheckSpelling', u'lbl2', u'statINS', u'mnuScheme', u'mnuObjectiveCaml', u'mnum4', u'btnUndo', u'mnuPrintPreview', u'mnuHTML', u'mnuTranslateThisApplication', u'mnuTcl', u'mnuYacc', u'mnuChangeLog', u'lblLn1,Col1', u'pnl20', u'ptabDocuments', u'mnuScientific', u'mnuStatusbar', u'mnuSave', u'mnuQuit', u'mnuDPatch', u'mnuC/C++/ObjCHeader', u'mnuClearHighlight', u'mnuIDL', u'ukndialogerror', u'mnuToolbar', u'mnuNew', u'mnuEmpty10', u'mnuEmpty11', u'mnuEmpty12', u'mnuJava', u'tbl0', u'mnuAda', u'mnuClose', u'mnuPHP', u'mnuSources', u'mnuSetLanguage', u'ptl0', u'ptl1', u'mnuObjective-C', u'ukn10', u'mnuNextDocument', u'ptl2', u'mnuMSIL', u'ukn11', u'btnSave', u'mnuJavascript', u'mnuBoo', u'mnuFortran95', u'ukn12', u'mnuHaskell', u'mnuLua', u'mnulibtool', u'mnuGetHelpOnline', u'mnuXML', u'mnuNone', u'tbar0', u'mnuOpen', u'mnuOCL', u'mnuCut', u'mnuGtkRC', u'mnuSaveAll', u'mnuVHDL', u'mnuLiterateHaskell', u'mnuCopy', u'mnuMarkup', u'mnuTools', u'mnuOthers', u'mnuC', u'ukn0', u'mnuSidePane', u'mnuD', u'ukn1', u'mnuFile', u'mnu.ini', u'ukn2', u'mnuNemerle', u'ukn3', u'txt0', u'ukn4', u'ukn5', u'mnuHelp', u'ukn6', u'mnuRevert', u'ukn7', u'btnPaste', u'ukn8', u'ukn9', u'mnuAbout', u'btnOpen', u'mnuView', u'mnuPreferences', u'mnuDocumentStatistics', u'btnPrint', u'mnuR', u'mnuRPMspec', u'mnuVala', u'splt0', u'splt1', u'btnReplace', u'mnuPython', u'btnCopy', u'mnuawk', u'mnush', u'mnuFindPrevious', u'flr0', u'mnuOctave', u'flr1', u'tbtn0', u'flr2', u'mnuRedo', u'mnuDelete', u'flr3', u'mnuDocbook', u'mnuSQL', u'flr4', u'mnuRuby', u'mnuPaste', u'flr5', u'frmUnsavedDocument1-gedit', u'mnuMovetoNewWindow', u'flr6', u'flr7', u'mnuReplace', u'flr8', u'mnuPreviousDocument', u'flr9', u'mnuPrint', u'uknsave'] >>> ldtp.click(frm, 'btn#1') Warning: AT-SPI error: pre method check: add: Unknown CORBA exception id: 'IDL:omg.org/CORBA/COMM_FAILURE:1.0' Warning: AT-SPI error: pre method check: add: Unknown CORBA exception id: 'IDL:omg.org/CORBA/COMM_FAILURE:1.0' 1 >>> ldtp.click(frm, 'btn#0') Warning: AT-SPI error: pre method check: add: Unknown CORBA exception id: 'IDL:omg.org/CORBA/COMM_FAILURE:1.0' Warning: AT-SPI error: pre method check: add: Unknown CORBA exception id: 'IDL:omg.org/CORBA/COMM_FAILURE:1.0' 1 >>> ldtp.click(frm, 'btn#20') Warning: AT-SPI error: pre method check: add: Unknown CORBA exception id: 'IDL:omg.org/CORBA/COMM_FAILURE:1.0' (ldtp:12534): GLib-CRITICAL **: g_hash_table_insert: assertion `hash_table->ref_count > 0' failed (ldtp:12534): GLib-CRITICAL **: g_hash_table_insert: assertion `hash_table->ref_count > 0' failed Traceback (most recent call last):
+ Trace 205791
raise LdtpExecutionError ('click failed: ' + _responseStatus [1])
>>>