I vote for getobjectnameatcoords(waittime) too. ;-) I think this function on Windows side works better than on Linux side. On Linux side, in some situation, it only return the parent object name instead of the desired object name.
Another way is to use a loop to look up the object name: a = getobjectlist("windowsname") for i in a: if i.find("keyword") != -1: if hasstate("windowsname", i, state.VISIBLE): print i -----Original Message----- From: ldtp-dev-bounces+mzhu=vmware....@lists.freedesktop.org [mailto:ldtp-dev-bounces+mzhu=vmware....@lists.freedesktop.org] On Behalf Of Nagappan Alagappan Sent: Thursday, June 07, 2012 9:32 AM To: wangyubin Cc: ldtp-dev@lists.freedesktop.org Subject: Re: [LDTP-Dev] object identification Hi Wang, For now this is better idea I think. Recently John have committed code (on Windows side, Linux one exist since long time) to get object name at co-ordinates. Can you try with that and bug him ;-) API usage: getobjectnameatcoords(waittime), here waittime is optional and it will wait for given seconds, before getting the window name and object name. Thanks Nagappan ----- Original Message ----- From: "wangyubin" <wangyu...@cn.fujitsu.com> To: "Onorato Vaticone" <onor...@onoratovaticone.it> Cc: ldtp-dev@lists.freedesktop.org Sent: Wednesday, June 6, 2012 6:08:10 PM Subject: Re: [LDTP-Dev] object identification Hi Onorato, I also found it's hard to identify the object in my application. especially some icon buttons with no label, these icon buttons were identified by Cobra(WinLDTP) with name btn1, btn2 ... etc. Now, I'm using Cobra's API to found btn1, btn2 ... etc. ldtp.getwindowsize(win_name) #[-4, -4, 1448, 878] ldtp.getobjectsize(win_name,'btn1') #[1, -1, 1326, 27] this will identify the object('btn1') by it's position. hope this will help! If there is any other easy way to identify the object, please help me! Thanks wangyubin ________________________________ From: ldtp-dev-bounces+wangyubin=cn.fujitsu....@lists.freedesktop.org [mailto:ldtp-dev-bounces+wangyubin=cn.fujitsu....@lists.freedesktop.org] On Behalf Of Onorato Vaticone Sent: Wednesday, June 06, 2012 6:37 PM To: ldtp-dev@lists.freedesktop.org Subject: Re: [LDTP-Dev] object identification I got the point. I need to be sure that my application is accessibility enabled .... I´m checking it through the link in the README.txt from installation folder. so the point, now, is this : how to get accessibility in my application ? great question .... i´ll move on. bye. On 6 June 2012 11:16, Onorato Vaticone <onor...@onoratovaticone.it> wrote: Hi all, first of all, this project is very exiting :-) I´m trying to understand if CobraWinLDTP is suitable for our project so I´m making some test. One problem I have is in identification of object in the GUI. I´ll try to explain better. Through VisualUIAVerify I can see the name of the button, menú item etc. but in some case there is not a name and so I can´t access to the object. Example : from ldtp import * guiexist ('MyApp*') click (' MyApp *', 'btnUpdateInfo') This work because I can see the name "UpdateInfo" in the VisualUIAVerify. but this example : from ldtp import * guiexist (' MyApp *') selectmenuitem (' MyApp*', 'mnuFile;mnuOpen') Doesn´t work maybe because I cannot see the "File" name property and "Open" name property in the VisualUIAVerify even though I have filled out in my application (i have source code). My question is I´m proceeding correctly ? there is another way to identify the object in an application ? I´m using the windows version of LDTP. many thanks !! Onorato. -- Onorato Vaticone m : +39.3336048864 email : onor...@onoratovaticone.it web : www.onoratovaticone.it _______________________________________________ LDTP-dev mailing list LDTP-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/ldtp-dev -- Linux Desktop (GUI Application) Testing Project - http://ldtp.freedesktop.org Cobra - Windows GUI Automation tool - https://github.com/ldtp/cobra http://nagappanal.blogspot.com _______________________________________________ LDTP-dev mailing list LDTP-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/ldtp-dev _______________________________________________ LDTP-dev mailing list LDTP-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/ldtp-dev