Thanks Mingfeng. I am glad you like it. :-)<br><br>Hi Wang,<br>If you have questions on getobjectnameatcoords(), just let me know. ;-)<br><br>Thanks,<br>John<br><br><div class="gmail_quote">2012/6/7 Mingfeng Zhu <span dir="ltr">&lt;<a href="mailto:mzhu@vmware.com" target="_blank">mzhu@vmware.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I vote for getobjectnameatcoords(waittime) too. ;-)<br>
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.<br>
<br>
Another way is to use a loop to look up the object name:<br>
<br>
a = getobjectlist(&quot;windowsname&quot;)<br>
for i in a:<br>
  if i.find(&quot;keyword&quot;) != -1:<br>
    if hasstate(&quot;windowsname&quot;, i, state.VISIBLE):<br>
      print i<br>
<div><div class="h5"><br>
-----Original Message-----<br>
From: ldtp-dev-bounces+mzhu=<a href="mailto:vmware.com@lists.freedesktop.org">vmware.com@lists.freedesktop.org</a> [mailto:<a href="mailto:ldtp-dev-bounces%2Bmzhu">ldtp-dev-bounces+mzhu</a>=<a href="mailto:vmware.com@lists.freedesktop.org">vmware.com@lists.freedesktop.org</a>] On Behalf Of Nagappan Alagappan<br>

Sent: Thursday, June 07, 2012 9:32 AM<br>
To: wangyubin<br>
Cc: <a href="mailto:ldtp-dev@lists.freedesktop.org">ldtp-dev@lists.freedesktop.org</a><br>
Subject: Re: [LDTP-Dev] object identification<br>
<br>
Hi Wang,<br>
<br>
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 ;-)<br>
<br>
API usage:<br>
<br>
getobjectnameatcoords(waittime), here waittime is optional and it will wait for given seconds, before getting the window name and object name.<br>
<br>
Thanks<br>
Nagappan<br>
<br>
----- Original Message -----<br>
From: &quot;wangyubin&quot; &lt;<a href="mailto:wangyubin@cn.fujitsu.com">wangyubin@cn.fujitsu.com</a>&gt;<br>
To: &quot;Onorato Vaticone&quot; &lt;<a href="mailto:onorato@onoratovaticone.it">onorato@onoratovaticone.it</a>&gt;<br>
Cc: <a href="mailto:ldtp-dev@lists.freedesktop.org">ldtp-dev@lists.freedesktop.org</a><br>
Sent: Wednesday, June 6, 2012 6:08:10 PM<br>
Subject: Re: [LDTP-Dev] object identification<br>
<br>
 Hi Onorato,<br>
<br>
I also found it&#39;s hard to identify the object in my application.<br>
especially some icon buttons with no label, these icon buttons were identified by Cobra(WinLDTP) with name btn1, btn2 ... etc.<br>
<br>
Now, I&#39;m using Cobra&#39;s API to found btn1, btn2 ... etc.<br>
<br>
ldtp.getwindowsize(win_name)<br>
#[-4, -4, 1448, 878]<br>
<br>
ldtp.getobjectsize(win_name,&#39;btn1&#39;)<br>
#[1, -1, 1326, 27]<br>
<br>
this will identify the object(&#39;btn1&#39;) by it&#39;s position.<br>
<br>
hope this will help!<br>
If there is any other easy way to identify the object, please help me!<br>
<br>
Thanks<br>
wangyubin<br>
<br>
________________________________<br>
<br>
        From: ldtp-dev-bounces+wangyubin=<a href="mailto:cn.fujitsu.com@lists.freedesktop.org">cn.fujitsu.com@lists.freedesktop.org</a> [mailto:<a href="mailto:ldtp-dev-bounces%2Bwangyubin">ldtp-dev-bounces+wangyubin</a>=<a href="mailto:cn.fujitsu.com@lists.freedesktop.org">cn.fujitsu.com@lists.freedesktop.org</a>] On Behalf Of Onorato Vaticone<br>

        Sent: Wednesday, June 06, 2012 6:37 PM<br>
        To: <a href="mailto:ldtp-dev@lists.freedesktop.org">ldtp-dev@lists.freedesktop.org</a><br>
        Subject: Re: [LDTP-Dev] object identification<br>
<br>
<br>
        I got the point.<br>
        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.<br>
<br>
        so the point, now, is this : how to get accessibility in my application ? great question .... i´ll move on.<br>
<br>
        bye.<br>
<br>
<br>
        On 6 June 2012 11:16, Onorato Vaticone &lt;<a href="mailto:onorato@onoratovaticone.it">onorato@onoratovaticone.it</a>&gt; wrote:<br>
<br>
<br>
                Hi all,<br>
                first of all, this project is very exiting :-)<br>
                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 :<br>

<br>
                from ldtp import *<br>
                guiexist (&#39;MyApp*&#39;)<br>
                click (&#39; MyApp *&#39;, &#39;btnUpdateInfo&#39;)<br>
<br>
                This work because I can see the name &quot;UpdateInfo&quot; in the VisualUIAVerify. but this example :<br>
<br>
                from ldtp import *<br>
                guiexist (&#39; MyApp *&#39;)<br>
                selectmenuitem (&#39; MyApp*&#39;, &#39;mnuFile;mnuOpen&#39;)<br>
<br>
                Doesn´t work maybe because I cannot see the &quot;File&quot; name property and &quot;Open&quot; name property in the VisualUIAVerify even though I have filled out in my application (i have source code).<br>

<br>
                My question is I´m proceeding correctly ? there is another way to identify the object in an application ?<br>
<br>
                I´m using the windows version of LDTP.<br>
<br>
                many thanks !!<br>
                                Onorato.<br>
<br>
<br>
<br>
<br>
        --<br>
<br>
        Onorato Vaticone<br>
        m : <a href="tel:%2B39.3336048864" value="+393336048864">+39.3336048864</a><br>
        email : <a href="mailto:onorato@onoratovaticone.it">onorato@onoratovaticone.it</a><br>
        web : <a href="http://www.onoratovaticone.it" target="_blank">www.onoratovaticone.it</a><br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
LDTP-dev mailing list<br>
<a href="mailto:LDTP-dev@lists.freedesktop.org">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>
</div></div>Linux Desktop (GUI Application) Testing Project - <a href="http://ldtp.freedesktop.org" target="_blank">http://ldtp.freedesktop.org</a> Cobra - Windows GUI Automation tool - <a href="https://github.com/ldtp/cobra" target="_blank">https://github.com/ldtp/cobra</a> <a href="http://nagappanal.blogspot.com" target="_blank">http://nagappanal.blogspot.com</a> _______________________________________________<br>

<div class="HOEnZb"><div class="h5">LDTP-dev mailing list<br>
<a href="mailto:LDTP-dev@lists.freedesktop.org">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>
LDTP-dev mailing list<br>
<a href="mailto:LDTP-dev@lists.freedesktop.org">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>
</div></div></blockquote></div><br>