Hi Shaheed,<br>
<br>
The selectmenuitem is working now. Thanks.<br>
<br>
I have followed the new &quot;How to write test scripts in python&quot; and another similar error is happening. See below:<br>
<br>
Traceback (most recent call last):<br>
&nbsp; File &quot;simple.py&quot;, line 13, in ?<br>
&nbsp;&nbsp;&nbsp; click('dlgOpenFile', 'btnCancel')<br>
ldtp.error: Unable to get gui handle ldtp.c 494<br>
<br>
The gedit.map that show the dlgOpenFile is:<br>
[dlgOpenFile...]<br>
dlgOpenFile={class=dialog,parent=gedit,child_index=1,label=Open File...}<br>
flr0={class=filler,parent=dlgOpenFile,child_index=0}<br>...<br>
btnOpen={class=push_button,parent=flr13,child_index=0,label=Open}<br>
btnCancel={class=push_button,parent=flr13,child_index=1,label=Cancel}<br>
<br>
The script is:<br>
<br>
initappmap('/home/mauricio/teste/gedit.map')<br>
<br>
launchapp('gedit')<br>
<br>
selectmenuitem ('frmUnsavedDocument1-gedit', 'mnuFile;mnuOpen')<br>
<br>
guiexist ('dlgOpenFile')<br>
<br>
click('dlgOpenFile', 'btnCancel')<br>
<br>
BR,<br>
<br>
Mauricio Lin.<br>
<br><div><span class="gmail_quote">On 10/21/05, <b class="gmail_sendername">Shaheed Shaik</b> &lt;<a href="mailto:sshaik@novell.com">sshaik@novell.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Mauricio,<br><br>Check whether the window name you passed to 'selectmenuitem' or 'click'<br>is matching with the one in your 'gedit.map', if you are using latest<br>appmap module, it would have been generated as<br>'frmUnsavedDocument1-gedit'. If that is the case, your selectmenuitem
<br>should be as follows,<br>selectmenuitem ('frmUnsavedDocument1-gedit', 'mnuFile;mnuOpen').<br><br>Also cross check whether the accessibility is enabled or not.<br><br>Cheers,<br>Shaheed.<br><br>&gt;&gt;&gt; Mauricio Lin &lt;
<a href="mailto:mauriciolin@gmail.com">mauriciolin@gmail.com</a>&gt; 10/20/05 8:37 pm &gt;&gt;&gt;<br>Hi all,<br><br>I have followed the instruction from<br><a href="http://gnomebangalore.org/ldtp/index.php/How_to_create_Test_Scripts_for_PY-">
http://gnomebangalore.org/ldtp/index.php/How_to_create_Test_Scripts_for_PY-</a><br>LDTPin<br>order to create my simple script, but it is not working.<br><br>The error message is printed as follow:<br><br>Traceback (most recent call last):
<br>File &quot;teste.py&quot;, line 9, in ?<br>selectmenuitem ('gedit', 'mnuFile;mnuOpen')<br>ldtp.error: Unable to get gui handle ldtp.c 1236<br><br>This happens after I execute the python script.<br><br>**************************************************************
<br>from ldtp import *<br>from ldtputils import *<br>import sys, string<br><br>initappmap('/home/mauricio/teste/gedit.map')<br><br>launchapp('gedit')<br><br>selectmenuitem ('gedit', 'mnuFile;mnuOpen')<br><br>click ('gedit', 'btnOpen')
<br>**************************************************************<br><br>Any idea?<br><br>BR,<br><br>Mauricio Lin.<br><br></blockquote></div><br>