Release version 1.3 documentation

This commit is contained in:
Bradlee Speice
2012-07-23 13:00:32 -04:00
parent 295c31692c
commit cf50da75fb
71 changed files with 445 additions and 4417 deletions

View File

@ -3,7 +3,7 @@
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>libcvautomation: Appendix of Wrapper Functions</title>
<title>libcvautomation: Appendix of Wrapper Functions and Environment Variables</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
@ -34,7 +34,7 @@
<td style="padding-left: 0.5em;">
<div id="projectname">libcvautomation
&#160;<span id="projectnumber">1.2</span>
&#160;<span id="projectnumber">1.3</span>
</div>
</td>
@ -77,11 +77,45 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
</div>
<div class="header">
<div class="headertitle">
<div class="title">Appendix of Wrapper Functions </div> </div>
<div class="title">Appendix of Wrapper Functions and Environment Variables </div> </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><h2><a class="anchor" id="appendix_click"></a>
Click the mouse</h2>
<div class="textblock"><h2><a class="anchor" id="appendix_variables"></a>
Environment Variables</h2>
<h3><a class="anchor" id="appendix_search"></a>
Search Method</h3>
<div class="fragment"><pre class="fragment"> SEARCH_METHOD
</pre></div><p> This controls how each of the functions searches for an image. See <a class="el" href="libcvautomation_search_methods.html">Libcv Search Methods</a> for more instruction on how to use this option.</p>
<h3><a class="anchor" id="appendix_tolerance"></a>
Tolerance</h3>
<div class="fragment"><pre class="fragment"> TOLERANCE
USE_SANE_TOLERANCE
</pre></div><p> These control how tolerant each function is when searching for an image. Acceptable values are anywhere between <code>INT_MIN</code> to <code>INT_MAX</code>. See <a class="el" href="libcvautomation_search_methods.html">Libcv Search Methods</a> for more information on how the tolerance values work. Additionally, the cva-input and cva-match programs (which this wrapper depends on) implement a "sane-tolerance" option. This allows you to set a tolerance between 1 - 100, where: \( 1 \approx 0 \), and \( 100 \approx INT\_MAX \) By default, functions will not use sane tolerance. To make the functions search using sane tolerance, set </p>
<div class="fragment"><pre class="fragment"> USE_SANE_TOLERANCE=<span class="stringliteral">&quot;yes&quot;</span>
</pre></div><h3><a class="anchor" id="appendix_center"></a>
Center</h3>
<div class="fragment"><pre class="fragment"> USE_CENTER
</pre></div><p> This controls whether each function will return a value based on the center of the sub-image, rather than the top-left corner. By default, functions will use center-based matching. To make the functions use the top-left corner, set </p>
<div class="fragment"><pre class="fragment"> USE_CENTER=<span class="stringliteral">&quot;&quot;</span>
</pre></div><h3><a class="anchor" id="appendix_wait"></a>
Wait</h3>
<div class="fragment"><pre class="fragment"> USE_WAIT
TIMEOUT
</pre></div><p> These control how the "waitfor" function is used. By default, all image-matching functions will wait for an image to appear, and then click on it. This way, it won't click randomly if it can or can't find an image, and provides very easy error recognition. The functions will wait for a period of <code>TIMEOUT</code> seconds before complaining. To disable waiting before performing an action, set </p>
<div class="fragment"><pre class="fragment"> USE_WAIT=<span class="stringliteral">&quot;&quot;</span>
</pre></div> <dl class="warning"><dt><b>Warning:</b></dt><dd>Without setting a tolerance value, the waitfor function becomes totally useless, as the first search will always find an image. <code>Make sure to set the tolerance</code> (or just leave it as the default value in the wrapper).</dd></dl>
<h3><a class="anchor" id="appendix_output"></a>
Output and Debugging</h3>
<div class="fragment"><pre class="fragment"> OUTFILE
ERRFILE
</pre></div><p> These files control the reporting of libcvautomation_funcs. The wrapper generates a decent amount of output to help in debugging application tests, and by default these get redirected to /dev/null. To instead redirect them to a file, you can do something like this: </p>
<div class="fragment"><pre class="fragment"> OUTFILE=`mktemp`; echo <span class="stringliteral">&quot;Logfile: &quot;</span> $OUTFILE
ERRFILE=`mktemp`; echo <span class="stringliteral">&quot;Error file: &quot;</span> $ERR_FILE
</pre></div><p> This will redirect the output and error output to a file you own, and inform you of what that file is.</p>
<h2><a class="anchor" id="appendix_functions"></a>
Functions</h2>
<h3><a class="anchor" id="appendix_click"></a>
Click the mouse</h3>
<div class="fragment"><pre class="fragment"> click
</pre></div><p> Click the mouse where it is currently located <br/>
<br/>
@ -100,11 +134,11 @@ Also, note that a positive <code>x-increment</code> moves the mouse to the right
</dd></dl>
<div class="fragment"><pre class="fragment"> click_i &lt;filename&gt;
</pre></div><p> Click the mouse on a screenshot from <code>filename</code> </p>
<dl class="note"><dt><b>Note:</b></dt><dd>This is affected by the <code>CENTER</code>, <code>TOLERANCE</code>, and <code>SEARCH_METHOD</code> variables. See <a class="el" href="writing_app_tests.html#testing_test_wrapper">Testing the Testing Wrapper</a> for more information on these. <br/>
<dl class="note"><dt><b>Note:</b></dt><dd>This is affected by the <code>CENTER</code>, <code>TOLERANCE</code>, and <code>SEARCH_METHOD</code> variables. See <a class="el" href="wrapper_functions.html#appendix_variables">Environment Variables</a> for more information on these. <br/>
<br/>
</dd></dl>
<h2><a class="anchor" id="appendix_move"></a>
Move the mouse</h2>
<h3><a class="anchor" id="appendix_move"></a>
Move the mouse</h3>
<div class="fragment"><pre class="fragment"> hover_xy &lt;x-coordinate&gt; &lt;y-increment&gt;
</pre></div><p> Move the mouse to a location on screen using absolute positioning <br/>
<br/>
@ -116,22 +150,25 @@ Move the mouse</h2>
</dd></dl>
<div class="fragment"><pre class="fragment"> hover_i &lt;filename&gt;
</pre></div><p> Move the mouse to a location on screen based on screenshot </p>
<dl class="note"><dt><b>Note:</b></dt><dd>This is affected by the <code>CENTER</code>, <code>TOLERANCE</code>, and <code>SEARCH_METHOD</code> variables. See <a class="el" href="writing_app_tests.html#testing_test_wrapper">Testing the Testing Wrapper</a> for more information on these. <br/>
<dl class="note"><dt><b>Note:</b></dt><dd>This is affected by the <code>CENTER</code>, <code>TOLERANCE</code>, and <code>SEARCH_METHOD</code> variables. See <a class="el" href="wrapper_functions.html#appendix_variables">Environment Variables</a> for more information on these. <br/>
<br/>
</dd></dl>
<div class="fragment"><pre class="fragment"> mouse_scrollu
</pre></div><p> Scroll the mouse wheel up one</p>
<div class="fragment"><pre class="fragment"> mouse_scrolld
</pre></div><p> Scroll the mouse wheel down one</p>
<h2><a class="anchor" id="appendix_find"></a>
Find an Image</h2>
<h3><a class="anchor" id="appendix_find"></a>
Find an Image</h3>
<div class="fragment"><pre class="fragment"> image_location &lt;filename&gt;
</pre></div><p> Get the location of an image on screen </p>
<dl class="note"><dt><b>Note:</b></dt><dd>This is affected by the <code>CENTER</code>, <code>TOLERANCE</code>, and <code>SEARCH_METHOD</code> variables. See <a class="el" href="writing_app_tests.html#testing_test_wrapper">Testing the Testing Wrapper</a> for more information on these. <br/>
<dl class="note"><dt><b>Note:</b></dt><dd>This is affected by the <code>CENTER</code>, <code>TOLERANCE</code>, and <code>SEARCH_METHOD</code> variables. See <a class="el" href="wrapper_functions.html#appendix_variables">Environment Variables</a> for more information on these. <br/>
<br/>
</dd></dl>
<h2><a class="anchor" id="appendix_keyboard"></a>
Click the keyboard</h2>
<div class="fragment"><pre class="fragment"> waitfor &lt;filename&gt;
</pre></div><p> Wait for an image to display on screen </p>
<dl class="note"><dt><b>Note:</b></dt><dd>This is affected by the <code>TOLERANCE</code>, <code>SEARCH_METHOD</code>, and <code>TIMEOUT</code> variables. See <a class="el" href="wrapper_functions.html#appendix_variables">Environment Variables</a> for more information on these.</dd></dl>
<h3><a class="anchor" id="appendix_keyboard"></a>
Click the keyboard</h3>
<div class="fragment"><pre class="fragment"> key_str <span class="stringliteral">&quot;&lt;string&gt;&quot;</span>
</pre></div><p> Enter a string of characters on the keyboard rather than a single character at a time. </p>
<dl class="warning"><dt><b>Warning:</b></dt><dd>This function <b>does not</b> accept key strings like "Space" as <code>key_down</code>, <code>key_up</code>, and <code>key_click</code> do. If you pass in "Space", that is exactly what will be typed. <br/>
@ -139,21 +176,21 @@ Click the keyboard</h2>
</dd></dl>
<div class="fragment"><pre class="fragment"> key_down <span class="stringliteral">&quot;&lt;key-name&gt;&quot;</span>
</pre></div><p> Press a key down and leave it down </p>
<dl class="note"><dt><b>Note:</b></dt><dd>This function accepts special keys like "Space" - see <a class="el" href="XTest_key_strings.html">XTest Key Strings</a> for a full list of characters allowed. <br/>
<dl class="note"><dt><b>Note:</b></dt><dd>This function accepts special keys like "Space" - see <a class="el" href="xtest_key_strings.html">XTest Key Strings</a> for a full list of characters allowed. <br/>
<br/>
</dd></dl>
<div class="fragment"><pre class="fragment"> key_up <span class="stringliteral">&quot;&lt;key-name&gt;&quot;</span>
</pre></div><p> Release a key </p>
<dl class="note"><dt><b>Note:</b></dt><dd>This function accepts special keys like "Space" - see <a class="el" href="XTest_key_strings.html">XTest Key Strings</a> for a full list of characters allowed. <br/>
<dl class="note"><dt><b>Note:</b></dt><dd>This function accepts special keys like "Space" - see <a class="el" href="xtest_key_strings.html">XTest Key Strings</a> for a full list of characters allowed. <br/>
<br/>
</dd></dl>
<div class="fragment"><pre class="fragment"> key_click <span class="stringliteral">&quot;&lt;key-name&gt;&quot;</span>
</pre></div><p> Press a key down and then release it immediately after </p>
<dl class="note"><dt><b>Note:</b></dt><dd>This function accepts special keys like "Space" - see <a class="el" href="XTest_key_strings.html">XTest Key Strings</a> for a full list of characters allowed. <br/>
<dl class="note"><dt><b>Note:</b></dt><dd>This function accepts special keys like "Space" - see <a class="el" href="xtest_key_strings.html">XTest Key Strings</a> for a full list of characters allowed. <br/>
<br/>
</dd></dl>
<h2><a class="anchor" id="appendix_utilities"></a>
Useful extras</h2>
<h3><a class="anchor" id="appendix_utilities"></a>
Useful extras</h3>
<div class="fragment"><pre class="fragment"> run_process <span class="stringliteral">&quot;&lt;process-name&gt;&quot;</span>
</pre></div><p> Start a process on the system, background it, and return the PID of the created process. <br/>
<br/>
@ -182,7 +219,7 @@ Useful extras</h2>
<hr class="footer"/><address class="footer"><small>
Generated on Wed Jul 18 2012 14:10:15 for libcvautomation by &#160;<a href="http://www.doxygen.org/index.html">
Generated on Mon Jul 23 2012 12:58:26 for libcvautomation by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.6.1
</small></address>