|
View:
New views
5 Messages
—
Rating Filter:
Alert me
|
|
|
Inconsistency in APIs to use mnu object nameHi 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? 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. Thanks Scott _______________________________________________ LDTP-dev mailing list LDTP-dev@... http://lists.freedesktop.org/mailman/listinfo/ldtp-dev |
|
|
Re: Inconsistency in APIs to use mnu object nameHi Scott,
On Wed, Oct 14, 2009 at 4:02 AM, Wang Qi, Scott <wangqi.s@...> wrote: Hi Nagappan, 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.
'mnuCloseAll1' should return the state of it :) Thanks Nagappan
-- Linux Desktop (GUI Application) Testing Project - http://ldtp.freedesktop.org http://nagappanal.blogspot.com _______________________________________________ LDTP-dev mailing list LDTP-dev@... http://lists.freedesktop.org/mailman/listinfo/ldtp-dev |
|
|
Re: Inconsistency in APIs to use mnu object nameHello all,
I've always found the way LDTP deals with menus a bit weird. 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: ldtp.doesmenuitemexist(windows_name, "mnuFile;mnuCloseAll", hierarchy=true) ldtp.doesmenuitemexist(windows_name, "mnuCloseAll", hierarchy=false) One question for LDTPv2, would this inconsistencies be solved? Would be ooldtp be better in LDTPv2? Thanks, Ara. On 14/10/09 17:00, Nagappan Alagappan wrote: > Hi Scott, > > On Wed, Oct 14, 2009 at 4:02 AM, Wang Qi, Scott <wangqi.s@... > <mailto:wangqi.s@...>> 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@... <mailto:LDTP-dev@...> > http://lists.freedesktop.org/mailman/listinfo/ldtp-dev > > > > > -- > Linux Desktop (GUI Application) Testing Project - > http://ldtp.freedesktop.org > http://nagappanal.blogspot.com > > > > _______________________________________________ > LDTP-dev mailing list > LDTP-dev@... > http://lists.freedesktop.org/mailman/listinfo/ldtp-dev _______________________________________________ LDTP-dev mailing list LDTP-dev@... http://lists.freedesktop.org/mailman/listinfo/ldtp-dev |
|
|
Re: Inconsistency in APIs to use mnu object nameNagappan,
I agree with Ara. Personally, I feel it is always more comfortable to address any menu in the full hierarchy. The 'mnuCloseAll1' tip you give is working. But it requires a bit of logic from user's code to follow LDTP's naming convention on the anonymous objects. But for menu, full hierarchy is already a simple solution to avoid the name collision in sub-menus in UI design. Thanks for the help. Scott On Thu, Oct 15, 2009 at 2:23 PM, Ara Pulido <ara@...> wrote: Hello all, _______________________________________________ LDTP-dev mailing list LDTP-dev@... http://lists.freedesktop.org/mailman/listinfo/ldtp-dev |
|
|
Re: Inconsistency in APIs to use mnu object nameHi Ara,
Apologize for my delayed response. Got busy with VMware Workstation 7.0 release. Will be released by next week. Have fixed these in LDTPv2, will check in the code tonight. 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. I haven't tested ooldtp on v2. We are ready to fix any issues reported on this. Thanks Nagappan On Wed, Oct 14, 2009 at 11:23 PM, Ara Pulido <ara@...> wrote: Hello all, -- Linux Desktop (GUI Application) Testing Project - http://ldtp.freedesktop.org http://nagappanal.blogspot.com _______________________________________________ LDTP-dev mailing list LDTP-dev@... http://lists.freedesktop.org/mailman/listinfo/ldtp-dev |
| Free embeddable forum powered by Nabble | Forum Help |