Revision: 3039
Author: janne.t.harkonen
Date: Tue Apr 20 00:47:35 2010
Log: regen
http://code.google.com/p/robotframework/source/detail?r=3039
Modified:
/trunk/doc/userguide/RobotFrameworkUserGuide.html
=======================================
--- /trunk/doc/userguide/RobotFrameworkUserGuide.html Mon Apr 19 13:57:23
2010
+++ /trunk/doc/userguide/RobotFrameworkUserGuide.html Tue Apr 20 00:47:35
2010
@@ -2336,14 +2336,38 @@
<div class="section" id="named-arguments">
<h4><a class="toc-backref" href="#id278">Named arguments</a></h4>
<p>If a keyword accepts arguments that have default values, it is also
possible to
-give the arguments using named argument syntax, 'argname=value'. This is
especially
-useful if a keyword accepts multiple arguments that have default
values.</p>
-<p>Consider using keyword <cite>Start Process</cite> from OperatingSystem
library which takes
-following arguments: <cite>command, stdin=None, alias=None</cite>. Using
named arguments
-it is possible to set <cite>alias</cite> wihtout specifying
<cite>stdin</cite>:</p>
+give the arguments using named argument syntax, 'argname=value'. This is
+especially useful if a keyword accepts multiple arguments that have default
+values.</p>
+<p>This syntax can be used with user keywords and in importing test
libraries and
+using keywords from test libraries that are implemented with Python and
that
+are not using the <a class="reference internal"
href="#dynamic-library-api">dynamic library API</a></p>
+<p>Following table demonstrates using named arguments in different
scenarios:</p>
<table border="1" class="example docutils">
<caption>Named argument examples</caption>
<colgroup>
+<col width="17%" />
+<col width="21%" />
+<col width="27%" />
+<col width="35%" />
+</colgroup>
+<thead valign="bottom">
+<tr><th class="head">Setting</th>
+<th class="head">Argument</th>
+<th class="head">Argument</th>
+<th class="head">Argument</th>
+</tr>
+</thead>
+<tbody valign="top">
+<tr><td>Library</td>
+<td>Telnet</td>
+<td>prompt=$</td>
+<td> </td>
+</tr>
+</tbody>
+</table>
+<table border="1" class="example docutils">
+<colgroup>
<col width="17%" />
<col width="21%" />
<col width="27%" />
@@ -2362,10 +2386,44 @@
<td>${process name}</td>
<td>alias=MyAlias</td>
</tr>
+<tr><td>Example</td>
+<td>My User Keyword</td>
+<td>arg2=Hello</td>
+<td>arg3=World</td>
+</tr>
</tbody>
</table>
-<p>This syntax can be used with user keywords and test libraries that are
implemented
-with Python and that are not using the <a class="reference internal"
href="#dynamic-library-api">dynamic library API</a>.</p>
+<table border="1" class="example docutils">
+<colgroup>
+<col width="18%" />
+<col width="22%" />
+<col width="14%" />
+<col width="22%" />
+<col width="22%" />
+</colgroup>
+<thead valign="bottom">
+<tr><th class="head">Keywords</th>
+<th class="head">Action</th>
+<th class="head">Argument</th>
+<th class="head">Argument</th>
+<th class="head">Argument</th>
+</tr>
+</thead>
+<tbody valign="top">
+<tr><td>User Keyword</td>
+<td>[Arguments]</td>
+<td>${arg1}</td>
+<td>${arg2}=default</td>
+<td>${arg3}=default</td>
+</tr>
+<tr><td>...</td>
+<td> </td>
+<td> </td>
+<td> </td>
+<td> </td>
+</tr>
+</tbody>
+</table>
<div class="note">
<p class="first admonition-title">Note</p>
<p class="last">Using named arguments only works with Robot Framework 2.5
or newer.</p>
@@ -12274,7 +12332,7 @@
<div class="footer">
<hr class="footer" />
<p>Generated by <a class="reference external"
href="http://docutils.sourceforge.net/rst.html">reStructuredText</a>.
Syntax highlighting by <a class="reference external"
href="http://pygments.org/">Pygments</a>.</p>
-<p>Generated on: 2010-04-19 20:55 UTC.
+<p>Generated on: 2010-04-20 07:47 UTC.
</p>
</div>
--
Subscription settings:
http://groups.google.com/group/robotframework-commit/subscribe?hl=en