Hi Ara,<br><br>Apologize for my delayed response. Got busy with VMware Workstation 7.0 release. Will be released by next week.<br><br>Have fixed these in LDTPv2, will check in the code tonight.<br><br>Now, hasstate, getallstates can recognize the menu hierarchy, though the last object in the menu will be checked for state. This has been extended to guiexist, waittillguiexist, waittillguinotexist functions as well.<br>
<br>I haven't tested ooldtp on v2. We are ready to fix any issues reported on this.<br><br>Thanks<br>Nagappan<br><br><div class="gmail_quote">On Wed, Oct 14, 2009 at 11:23 PM, Ara Pulido <span dir="ltr"><<a href="mailto:ara@ubuntu.com">ara@ubuntu.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hello all,<br>
<br>
I've always found the way LDTP deals with menus a bit weird.<br>
<br>
I think it is much better if all the functions dealing with menus would use some kind of hierarchy. Or better, if it could be set in the parameters:<br>
<br>
ldtp.doesmenuitemexist(windows_name, "mnuFile;mnuCloseAll", hierarchy=true)<br>
<br>
ldtp.doesmenuitemexist(windows_name, "mnuCloseAll", hierarchy=false)<br>
<br>
One question for LDTPv2, would this inconsistencies be solved? Would be ooldtp be better in LDTPv2?<br>
<br>
Thanks,<br>
Ara.<br>
<br>
On 14/10/09 17:00, Nagappan Alagappan wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Scott,<br>
<br>
On Wed, Oct 14, 2009 at 4:02 AM, Wang Qi, Scott <<a href="mailto:wangqi.s@gmail.com" target="_blank">wangqi.s@gmail.com</a><br>
<mailto:<a href="mailto:wangqi.s@gmail.com" target="_blank">wangqi.s@gmail.com</a>>> wrote:<br>
<br>
Hi Nagappan,<br>
<br>
I saw some inconsistency in the parameter when calling these two<br>
functions : hasstate () and doesmenuitemexist().<br>
<br>
1) ldtp.doesmenuitemexist(windows_name, 'mnuFile;mnuCloseAll')<br>
<br>
doesmenuitemexist () requires the full path which is the<br>
'mnuFile;mnuCloseAll' menu.<br>
<br>
2) ldtp.hasstate(windows_name, 'mnuCloseAll', ldtp.state.SENSITIVE)<br>
<br>
hasstate () only requires the last node which is 'mnuCloseAll'.<br>
<br>
Is this design deliberately as this?<br>
<br>
<br>
hasstate is a general function, which works for all object type. To work<br>
with menu, we have to follow the hierarchy. If its a requirement we can<br>
implement it on LDTPv2.<br>
<br>
<br>
<br>
The second question is that if 2 root menus has a submenu with the<br>
same name for example, 'mnuFile;mnuCloseAll' and<br>
'mnuProject;mnuCloseAll'. How ldtp.hasstate() will return the status<br>
with input of 'mnuCloseAll'? Will it only return the first found mnu<br>
named "mnuCloseAll"? I did a simple experiment. It seems it indeed<br>
returns the attribute for the first mnu. So how to get the attribute<br>
for the 2nd sub menu item.<br>
<br>
<br>
'mnuCloseAll1' should return the state of it :)<br>
<br>
Thanks<br>
Nagappan<br>
<br>
<br>
Thanks<br>
Scott<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
LDTP-dev mailing list<br>
<a href="mailto:LDTP-dev@lists.freedesktop.org" target="_blank">LDTP-dev@lists.freedesktop.org</a> <mailto:<a href="mailto:LDTP-dev@lists.freedesktop.org" target="_blank">LDTP-dev@lists.freedesktop.org</a>><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/ldtp-dev" target="_blank">http://lists.freedesktop.org/mailman/listinfo/ldtp-dev</a><br>
<br>
<br>
<br>
<br>
--<br>
Linux Desktop (GUI Application) Testing Project -<br>
<a href="http://ldtp.freedesktop.org" target="_blank">http://ldtp.freedesktop.org</a><br>
<a href="http://nagappanal.blogspot.com" target="_blank">http://nagappanal.blogspot.com</a><br>
<br>
<br>
<br>
_______________________________________________<br>
LDTP-dev mailing list<br>
<a href="mailto:LDTP-dev@lists.freedesktop.org" target="_blank">LDTP-dev@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/ldtp-dev" target="_blank">http://lists.freedesktop.org/mailman/listinfo/ldtp-dev</a><br>
</blockquote>
<br>
</blockquote></div><br><br clear="all"><br>-- <br>Linux Desktop (GUI Application) Testing Project - <a href="http://ldtp.freedesktop.org">http://ldtp.freedesktop.org</a><br><a href="http://nagappanal.blogspot.com">http://nagappanal.blogspot.com</a><br>