[LDTP-Dev] Inconsistency in APIs to use mnu object name

Nagappan Alagappan nagappan at gmail.com
Wed Oct 14 08:00:41 PDT 2009


Hi Scott,

On Wed, Oct 14, 2009 at 4:02 AM, Wang Qi, Scott <wangqi.s at gmail.com> wrote:

> Hi Nagappan,
>
> I saw some inconsistency in the parameter when calling these two functions
> : hasstate () and doesmenuitemexist().
>
> 1) ldtp.doesmenuitemexist(windows_name, 'mnuFile;mnuCloseAll')
>
> doesmenuitemexist () requires the full path which is the
> 'mnuFile;mnuCloseAll' menu.
>
> 2) ldtp.hasstate(windows_name, 'mnuCloseAll', ldtp.state.SENSITIVE)
>
> hasstate () only requires the last node which is 'mnuCloseAll'.
>
> Is this design deliberately as this?
>

hasstate is a general function, which works for all object type. To work
with menu, we have to follow the hierarchy. If its a requirement we can
implement it on LDTPv2.

>
>
> The second question is that if 2 root menus has a  submenu with the same
> name for example, 'mnuFile;mnuCloseAll' and 'mnuProject;mnuCloseAll'. How
> ldtp.hasstate() will return the status with input of 'mnuCloseAll'? Will it
> only return the first found mnu named "mnuCloseAll"?  I did a simple
> experiment. It seems it indeed returns the attribute for the first mnu. So
> how to get the attribute for the 2nd sub menu item.
>

'mnuCloseAll1' should return the state of it :)

Thanks
Nagappan

>
> Thanks
> Scott
>
>
>
>
> _______________________________________________
> LDTP-dev mailing list
> LDTP-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/ldtp-dev
>
>


-- 
Linux Desktop (GUI Application) Testing Project -
http://ldtp.freedesktop.org
http://nagappanal.blogspot.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/ldtp-dev/attachments/20091014/2e9832a9/attachment.htm 


More information about the LDTP-dev mailing list