3 new revisions:

Revision: ba4c19dbe1bb
Branch:   default
Author:   Tatu Kairi <[email protected]>
Date:     Mon May 13 06:53:01 2013
Log:      Updated user guide...
http://code.google.com/p/robotframework/source/detail?r=ba4c19dbe1bb

Revision: 9fc0aa03b072
Branch:   default
Author:   Tatu Kairi <[email protected]>
Date:     Mon May 13 06:53:09 2013
Log:      Regen user guide
http://code.google.com/p/robotframework/source/detail?r=9fc0aa03b072

Revision: 20ced542971a
Branch:   default
Author:   Tatu Kairi <[email protected]>
Date:     Mon May 13 06:53:24 2013
Log:      merge
http://code.google.com/p/robotframework/source/detail?r=20ced542971a

==============================================================================
Revision: ba4c19dbe1bb
Branch:   default
Author:   Tatu Kairi <[email protected]>
Date:     Mon May 13 06:53:01 2013
Log:      Updated user guide

Update issue 996

Updated user guide. Keyword documentation missing.
http://code.google.com/p/robotframework/source/detail?r=ba4c19dbe1bb

Modified:
 /doc/userguide/src/CreatingTestData/CreatingUserKeywords.rst

=======================================
--- /doc/userguide/src/CreatingTestData/CreatingUserKeywords.rst Mon Oct 15 03:52:11 2012 +++ /doc/userguide/src/CreatingTestData/CreatingUserKeywords.rst Mon May 13 06:53:01 2013
@@ -581,6 +581,46 @@
    Return Three Values  [Return]      foo             bar          zap
=================== ============ ============== =========== ==========

+You can also return values from keyword using the :name:`Return From Keyword` keyword. Return values using this keyword works as described above. Using both the keyword and the :opt:`[Return]` setting makes it possible to return different things from the user keyword, depending which one is encountered first. Thus, :name:`Return From Keyword` provides a mechanism to return earlier from the user keyword.
+
+Keyword :name:`Return From Keyword If` provides a shorthand to use instead of :name:`Run Keyword If` ... :name:`Return From Keyword` combination.
+
+.. table:: :name:`Return From Keyword` and :name:`Return From Keyword If`
+    :class: example
+
+ ============= ============== ============== ======== ======== ======== + Test Case Action Argument Argument Argument Argument + ============= ============== ============== ======== ======== ========
+    Simple Return  ${ret}=         Return Things
+    \              Some Keyword    ${ret}
+    \
+    Find Index     @{list}=        Create List     foo       bar       baz
+    \              ${index}=       Get Index       baz       @{list}
+    \              Should Be True  ${index} == 2
+    \              ${index}=       Get Index       corge     @{list}
+    \              Should Be True  ${index} == -1
+ ============= ============== ============== ======== ======== ========
+
+.. table::
+   :class: example
+
+ ============= =================== ====================== ========================= ============ + Keyword Action Argument Argument Argument + ============= =================== ====================== ========================= ============
+   Return Things  ${value}=            Get Some Value
+   \              Return From Keyword  ${value}
+   \
+   Get Index      [Arguments]          ${element}              @{list}
+   \              ${index}=            Set Variable            ${0}
+ \ :FOR ${item} IN @{list} + \ Return From Keyword If '${item}' == '${element}' ${index} + \ ${index}= Set Variable ${index + 1}
+   \              [Return]             ${-1}
+ ============= =================== ====================== ========================= ============
+
+.. note::
+ :name:`Return From Keyword` and :name:`Return From Keyword If` are new keywords introduced in Robot 2.8.
+
 Keyword teardown
 ~~~~~~~~~~~~~~~~


==============================================================================
Revision: 9fc0aa03b072
Branch:   default
Author:   Tatu Kairi <[email protected]>
Date:     Mon May 13 06:53:09 2013
Log:      Regen user guide
http://code.google.com/p/robotframework/source/detail?r=9fc0aa03b072

Modified:
 /doc/userguide/RobotFrameworkUserGuide.html

=======================================
--- /doc/userguide/RobotFrameworkUserGuide.html Fri May 10 04:34:38 2013
+++ /doc/userguide/RobotFrameworkUserGuide.html Mon May 13 06:53:09 2013
@@ -4915,8 +4915,7 @@
 <div class="section" id="screenshot-library">
 <h4><a class="toc-backref" href="#id440">Screenshot library</a></h4>
 <p>The Screenshot library has keywords to capture and store screenshots
-of the whole desktop. This library is implemented with Java AWT APIs,
-so it can be used only when running Robot Framework on Jython.</p>
+of the whole desktop.</p>
<p>For more information, see the <a class="reference external" href="../libraries/Screenshot.html">Screenshot library documentation</a>.</p>
 </div>
 <div class="section" id="remote-library">
@@ -7814,6 +7813,163 @@
 </tr>
 </tbody>
 </table>
+<p>You can also return values from keyword using the <span class="name">Return From Keyword</span> keyword. Return values using this keyword works as described above. Using both the keyword and the <span class="opt">[Return]</span> setting makes it possible to return different things from the user keyword, depending which one is encountered first. Thus, <span class="name">Return From Keyword</span> provides a mechanism to return earlier from the user keyword.</p> +<p>Keyword <span class="name">Return From Keyword If</span> provides a shorthand to use instead of <span class="name">Run Keyword If</span> ... <span class="name">Return From Keyword</span> combination.</p>
+<table border="1" class="example docutils">
+<caption><span class="name">Return From Keyword</span> and <span class="name">Return From Keyword If</span></caption>
+<colgroup>
+<col width="20%" />
+<col width="22%" />
+<col width="22%" />
+<col width="12%" />
+<col width="12%" />
+<col width="12%" />
+</colgroup>
+<thead valign="bottom">
+<tr><th class="head">Test Case</th>
+<th class="head">Action</th>
+<th class="head">Argument</th>
+<th class="head">Argument</th>
+<th class="head">Argument</th>
+<th class="head">Argument</th>
+</tr>
+</thead>
+<tbody valign="top">
+<tr><td>Simple Return</td>
+<td>${ret}=</td>
+<td>Return Things</td>
+<td>&nbsp;</td>
+<td>&nbsp;</td>
+<td>&nbsp;</td>
+</tr>
+<tr><td></td>
+<td>Some Keyword</td>
+<td>${ret}</td>
+<td>&nbsp;</td>
+<td>&nbsp;</td>
+<td>&nbsp;</td>
+</tr>
+<tr><td></td>
+<td>&nbsp;</td>
+<td>&nbsp;</td>
+<td>&nbsp;</td>
+<td>&nbsp;</td>
+<td>&nbsp;</td>
+</tr>
+<tr><td>Find Index</td>
+<td>&#64;{list}=</td>
+<td>Create List</td>
+<td>foo</td>
+<td>bar</td>
+<td>baz</td>
+</tr>
+<tr><td></td>
+<td>${index}=</td>
+<td>Get Index</td>
+<td>baz</td>
+<td>&#64;{list}</td>
+<td>&nbsp;</td>
+</tr>
+<tr><td></td>
+<td>Should Be True</td>
+<td>${index} == 2</td>
+<td>&nbsp;</td>
+<td>&nbsp;</td>
+<td>&nbsp;</td>
+</tr>
+<tr><td></td>
+<td>${index}=</td>
+<td>Get Index</td>
+<td>corge</td>
+<td>&#64;{list}</td>
+<td>&nbsp;</td>
+</tr>
+<tr><td></td>
+<td>Should Be True</td>
+<td>${index} == -1</td>
+<td>&nbsp;</td>
+<td>&nbsp;</td>
+<td>&nbsp;</td>
+</tr>
+</tbody>
+</table>
+<table border="1" class="example docutils">
+<colgroup>
+<col width="14%" />
+<col width="21%" />
+<col width="24%" />
+<col width="27%" />
+<col width="13%" />
+</colgroup>
+<thead valign="bottom">
+<tr><th class="head">Keyword</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>Return Things</td>
+<td>${value}=</td>
+<td>Get Some Value</td>
+<td>&nbsp;</td>
+<td>&nbsp;</td>
+</tr>
+<tr><td></td>
+<td>Return From Keyword</td>
+<td>${value}</td>
+<td>&nbsp;</td>
+<td>&nbsp;</td>
+</tr>
+<tr><td></td>
+<td>&nbsp;</td>
+<td>&nbsp;</td>
+<td>&nbsp;</td>
+<td>&nbsp;</td>
+</tr>
+<tr><td>Get Index</td>
+<td>[Arguments]</td>
+<td>${element}</td>
+<td>&#64;{list}</td>
+<td>&nbsp;</td>
+</tr>
+<tr><td></td>
+<td>${index}=</td>
+<td>Set Variable</td>
+<td>${0}</td>
+<td>&nbsp;</td>
+</tr>
+<tr><td></td>
+<td>:FOR</td>
+<td>${item}</td>
+<td>IN</td>
+<td>&#64;{list}</td>
+</tr>
+<tr><td></td>
+<td>&nbsp;</td>
+<td>Return From Keyword If</td>
+<td>'${item}' == '${element}'</td>
+<td>${index}</td>
+</tr>
+<tr><td></td>
+<td>&nbsp;</td>
+<td>${index}=</td>
+<td>Set Variable</td>
+<td>${index + 1}</td>
+</tr>
+<tr><td></td>
+<td>[Return]</td>
+<td>${-1}</td>
+<td>&nbsp;</td>
+<td>&nbsp;</td>
+</tr>
+</tbody>
+</table>
+<div class="note">
+<p class="first admonition-title">Note</p>
+<p class="last"><span class="name">Return From Keyword</span> and <span class="name">Return From Keyword If</span> are new keywords introduced in Robot 2.8.</p>
+</div>
 </div>
 <div class="section" id="keyword-teardown">
<h3><a class="toc-backref" href="#id485">2.6.6&nbsp;&nbsp;&nbsp;Keyword teardown</a></h3>
@@ -16670,7 +16826,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: 2013-05-10 11:22 UTC.
+<p>Generated on: 2013-05-13 13:50 UTC.
 </p>

 </div>

==============================================================================
Revision: 20ced542971a
Branch:   default
Author:   Tatu Kairi <[email protected]>
Date:     Mon May 13 06:53:24 2013
Log:      merge
http://code.google.com/p/robotframework/source/detail?r=20ced542971a


--

--- You received this message because you are subscribed to the Google Groups "robotframework-commit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to