<p>Welcome to Libcvautomation! Libcvautomation is a GUI automation and testing tool based on image recognition and response. This program was designed as a direct replacement for <ahref="http://sikuli.org">Sikuli</a> and <ahref="https://wiki.ubuntu.com/Xpresser">Xpresser</a>. I was having incredible difficulty getting either of these solutions to work - Sikuli would crash whenever I tried to take a screenshot, and Xpresser was both too new for our Prominent North American Enterprise Linux systems, but also didn't work or <code>import</code> correctly. I really liked the way each of these programs approached GUI automation, but they simply didn't work. Additionally, I wanted to create a simple solution - it does what you want it to, and that's it. </p>
<h2><aclass="anchor"id="how_it_works"></a>
How Libcvautomation Works</h2>
<p>Libcvautomation represents two software products coming together - <ahref="http://opencv.willowgarage.com/wiki/">OpenCV</a> and the <ahref="http://www.x.org/docs/Xext/xtest.pdf">XTest extension</a> to the X11 server. OpenCV is used for image recognition, and XTest is used to actually drive the X server. You can dig into <aclass="el"href="libcvautomation-xtest_8h.html">libcvautomation-xtest.h</a> to get an idea of what all this library is capable of. <br/>
Basically what happens is that for whenever you need to do image recognition, OpenCV is used to find the images, and XTest is used to generate any events needed. Libcvautomation is mostly a wrapper to integrate both of these products, but also adds some functions like <aclass="el"href="libcvautomation-xlib_8h.html#abdedf5cd2aceeda00f665747bf1eeece"title="Return the location of a sub image in the X11 root window.">matchSubImage_X11()</a> that allow you to match an image against the X11 root window in place. This means no more <code>'xwd | convert "<out_name>"'</code>. </p>
<p>Installing Libcvautomation is easy. You can either manually install packages, add the Libcvautomation repository, or install from tarball (the first option is recommended). </p>
<h3><aclass="anchor"id="main_rpm"></a>
Install Libcvautomation RPM Repository</h3>
<p>If you want to make sure that you're using the latest (stable) version of Libcvautomation, you can add the Libcvautomation repository to yum. First, a new configuration file for the Libcvautomation repository: </p>
<divclass="fragment"><preclass="fragment"> sudo vim /etc/yum.repos.d/libcvautomation.repo
</pre></div><p> After you have the file open, put the following content in it: </p>
</pre></div><p> And once this is done, clean out the cache, and you should be good to go! </p>
<divclass="fragment"><preclass="fragment"> sudo yum clean all
</pre></div><p> Finally, if you want to begin developing application tests, you will need the following packages: <code>libcvautomation</code>, and <code>libcvautomation-examples</code>. </p>
<h3><aclass="anchor"id="main_apt"></a>
Install Libcvautomation APT Repository</h3>
<p>If you want to make sure that you're using the latest (stable) version of Libcvautomation, you can add the Libcvautomation repository to APT. First, open up your <code>sources.list</code></p>
<divclass="fragment"><preclass="fragment"> sudo vim /etc/apt/sources.list
</pre></div><p> Add the following content at the end: </p>
</pre></div><p> Finally, if you want to begin developing application tests, you will need the following packages: <code>libcvautomation-dev</code>, and <code>libcvautomation-examples</code>. </p>
<h3><aclass="anchor"id="main_download"></a>
Manual Download Packages</h3>
<p>If you want to manually download the packages, see the Github downloads page for libcvautomation: <ahref="https://github.com/DjBushido/libcvautomation/downloads">https://github.com/DjBushido/libcvautomation/downloads</a></p>
<h3><aclass="anchor"id="main_tarball"></a>
Manual Tarball Installation</h3>
<p>If you want to install Libcvautomation via tarball, you can do that too. Download a release tarball from the Downloads page on Github: <ahref="https://github.com/DjBushido/libcvautomation/downloads">https://github.com/DjBushido/libcvautomation/downloads</a> The source itself uses autotools, so it's incredibly easy to work with: </p>
<divclass="fragment"><preclass="fragment"> cd <location_of_tarball>
I'm so glad you asked! I've provided a few reference programs - <code>cva-match</code> and <code>cva-input</code> - that can be used to demonstrate most of libcvautomation's capabilities. I've even provided a BASH wrapper to make it incredibly easy to use BASH with libcvautomation as well (requires that <code>cva-match</code> and <code>cva-input</code> are installed). Python bindings are on their way too. <br/>
Finally, if you want to know how to write your own application tests, please see <aclass="el"href="writing_app_tests.html">Writing Application Tests</a> for more information on that. I've provided code to give you a basic idea of how they work. </p>
<h2><aclass="anchor"id="questions"></a>
Questions? Comments? Concerns?</h2>
<p>Please send any feedback to <<ahref="mailto:bspeice@uncc.edu">bspeice@uncc.edu</a>>. Pull requests can be submitted to <ahref="https://github.com/DjBushido/libcvautomation">my github repository</a>. </p>