[LDTP-Dev] An easy way to integrate LDTP with Sikuli

Yingjun Li yingjunli at gmail.com
Wed Jun 13 22:08:59 PDT 2012


Hi all,

Some controls such as toolbar on WS haven’t enabled accessibility. In this
situation, Sikuli may be the only choice to operate them. So I wrote a
simple Sikuli function to handle toolbar on WS, and call it from LDTP
scripts.



*Prerequisites:*

1.       Install LDTP/Cobra and Sikuli

2.       Open WS, take at least one snapshot for VM



Place LDTP-Sikuli.py and handleToolbar.sikuli.zip on Desktop, extract the
zip file, then run LDTP-Sikuli.py.

LDTP-Sikuli.py will open dialogs of taking snapshot, reverting snapshot and
managing snapshot one by one from toolbar on WS and close them accordingly.
handleToolbar.sikuli.zip is the underlying Sikuli library which has
function to handle toolbar.



*Notes:*

1.       Toolbar on WS haven’t enabled accessibility, but windows/dialogs
opened from the icons on toolbar have enabled accessibility. So write
Sikuli library to handle the controls which haven’t enabled accessibility,
then call the library from LDTP scripts. This is easy to maintain, just
update icon files in handleToolbar.sikuli.zip if they are changed in
future(WS 10).

2.       We can even get original icon files from developers, no need to
capture them from Sikuli anymore. This may be helpful to improve accuracy
of Sikuli library.

3.       In LDTP-Sikuli.py, I get a smaller searching scope by LDTP API and
pass it to Sikuli library. So Sikuli library will run robustly and fast in
this way.

4.       I tested on Windows 7 and XP, it works well.



Thanks,

Yingjun
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/ldtp-dev/attachments/20120614/a5e7aa55/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: LDTP-Sikuli.py
Type: application/octet-stream
Size: 897 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/ldtp-dev/attachments/20120614/a5e7aa55/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: handleToolbar.sikuli.zip
Type: application/zip
Size: 4832 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/ldtp-dev/attachments/20120614/a5e7aa55/attachment.zip>


More information about the LDTP-dev mailing list