[LDTP-Dev] object identification

Yingjun Li yingjunli at gmail.com
Wed Jun 6 19:33:50 PDT 2012


Thanks Mingfeng. I am glad you like it. :-)

Hi Wang,
If you have questions on getobjectnameatcoords(), just let me know. ;-)

Thanks,
John

2012/6/7 Mingfeng Zhu <mzhu at vmware.com>

> 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.com at lists.freedesktop.org [mailto:
> ldtp-dev-bounces+mzhu=vmware.com at lists.freedesktop.org] On Behalf Of
> Nagappan Alagappan
> Sent: Thursday, June 07, 2012 9:32 AM
> To: wangyubin
> Cc: ldtp-dev at 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" <wangyubin at cn.fujitsu.com>
> To: "Onorato Vaticone" <onorato at onoratovaticone.it>
> Cc: ldtp-dev at 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.com at lists.freedesktop.org [mailto:ldtp-dev-bounces+wangyubin=
> cn.fujitsu.com at lists.freedesktop.org] On Behalf Of Onorato Vaticone
>        Sent: Wednesday, June 06, 2012 6:37 PM
>        To: ldtp-dev at 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 <onorato at 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 : onorato at onoratovaticone.it
>        web : www.onoratovaticone.it
>
>
>
>
> _______________________________________________
> 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 Cobra - Windows GUI Automation tool -
> https://github.com/ldtp/cobra http://nagappanal.blogspot.com_______________________________________________
> LDTP-dev mailing list
> LDTP-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/ldtp-dev
> _______________________________________________
> LDTP-dev mailing list
> LDTP-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/ldtp-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/ldtp-dev/attachments/20120607/d52576ab/attachment.htm>


More information about the LDTP-dev mailing list