Hi Philippe,<div><br></div><div>I guess the API syntax you are using is incorrect, you have to use this [1], rather than [2].</div><div><br></div><div>Same applies to waitTillGuiExist. Not sure, why it waits for infinite, as the default wait time is 30 seconds.</div>
<div><br></div><div>Thanks</div><div>Nagappan</div><div><br></div><div>[1] - <a href="http://ldtp.freedesktop.org/javadoc/com/cobra/ldtp/Ldtp.html#guiExist()">http://ldtp.freedesktop.org/javadoc/com/cobra/ldtp/Ldtp.html#guiExist()</a></div>
<div>[2] - <a href="http://ldtp.freedesktop.org/javadoc/com/cobra/ldtp/Ldtp.html#guiExist(java.lang.String)">http://ldtp.freedesktop.org/javadoc/com/cobra/ldtp/Ldtp.html#guiExist(java.lang.String)</a><br><br><div class="gmail_quote">
On Thu, Oct 18, 2012 at 3:55 PM, phlinux <span dir="ltr"><<a href="mailto:philippe.legay@keynectis.com" target="_blank">philippe.legay@keynectis.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Hello,<br>
<br>
I am new with Ldtp, but the tools seems to be very interresting. I am<br>
working on windows (seven) with Java.<br>
I do a getWindowsList() : OK. From this list, I get an window item.<br>
guiExist() will return false for this item,<br>
but getObjectList on this item is OK. The documentation "How to enable the<br>
accessibility" explains what to do for Gnome, not for Windows.<br>
<br>
In fact, in real life, the list[1] windows will not present at start time,<br>
but few seconds later. So I need to wait for this windows. But if exist does<br>
not work, when the windows is here, this will explain why the<br>
waiTilGuiExist does not work.<br>
<br>
I do not understand why list, access are OK, but exist fails.<br>
<br>
Have you ideas, pointers, solutions ?<br>
<br>
Thanks,<br>
<br>
==== The code ======<br>
<br>
Ldtp l = new Ldtp("frmWebDriver - Windows Internet Explorer") ;<br>
<br>
list = l.getWindowList() ;<br>
for (int i = 0 ; i < list.length ; i ++) {<br>
System.out.println("Windowlist ["+i+"] = "+list[i]) ; }<br>
<br>
=== Output ===<br>
Windowlist [0] = frmWebDriver - Windows Internet Explorer<br>
Windowlist [1] = dlgWindows Security<br>
Windowlist [2] = pane<br>
Windowlist [3] = pane0<br>
....<br>
==============<br>
<br>
System.out.println("Exist "+l.guiExist("*"+list[1]+"*")) ;<br>
=== Output ===<br>
0<br>
===============<br>
<br>
Ldtp certif = new Ldtp(list[1]) ;<br>
list = certif.getObjectList() ;<br>
for (int i = 0 ; i < list.length ; i ++) {<br>
System.out.println("Object ["+i+"] = "+list[i]) ; }<br>
<br>
=== Output ===<br>
Object [0] = paneWindowsSecurity<br>
Object [1] = pane1<br>
Object [2] = btnOK<br>
....<br>
===============<br>
l.waitTillGuiExist(list[1]) ; // Infinite Wait !<br>
<span class="HOEnZb"><font color="#888888">--<br>
View this message in context: <a href="http://old.nabble.com/Windows-Vistat-%3A-getWindownList-OK%2C-but-guiExist-KO.-tp34575303p34575303.html" target="_blank">http://old.nabble.com/Windows-Vistat-%3A-getWindownList-OK%2C-but-guiExist-KO.-tp34575303p34575303.html</a><br>
Sent from the Free Desktop - LDTP mailing list archive at Nabble.com.<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>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div>Cross platform GUI testing</div>Linux Desktop (GUI Application) Testing Project - <a href="http://ldtp.freedesktop.org" target="_blank">http://ldtp.freedesktop.org</a><br>
Cobra - Windows GUI Automation tool - <a href="https://github.com/ldtp/cobra" target="_blank">https://github.com/ldtp/cobra</a><div>ATOMac - Mac GUI Automation tool - <a href="https://github.com/pyatom/pyatom" target="_blank">https://github.com/pyatom/pyatom</a></div>
<div><a href="http://nagappanal.blogspot.com" target="_blank">http://nagappanal.blogspot.com</a></div><br>
</div>