Author: laukpe
Date: Sun Nov 23 12:47:54 2008
New Revision: 1066

Modified:
   trunk/src/robot/libraries/Screenshot.py
   trunk/src/robot/libraries/Telnet.py

Log:
1) Doc enhancements partly related to latest changes to libdoc.py 2) Small fixes to Screenshot library

Modified: trunk/src/robot/libraries/Screenshot.py
==============================================================================
--- trunk/src/robot/libraries/Screenshot.py     (original)
+++ trunk/src/robot/libraries/Screenshot.py     Sun Nov 23 12:47:54 2008
@@ -39,27 +39,38 @@
     ROBOT_LIBRARY_VERSION = utils.get_version()

     def __init__(self, default_directory=None, log_file_directory=None):
- """The library can be initialized with two arguments: `default_directory` - and `log_file_directory`. If the `default_directory` is provided, all the
-        screenshots will be saved under that directory by default. If the
- `default_directory` is not provided, the system temporary directory is
-        used as default.
+        """Screenshot library can be imported with optional arguments.

- `log_file_directory` is used to create relative paths when screenshots are
-        logged. By default, absolute paths are used."""
+ If the `default_directory` is provided, all the screenshots are saved + into that directory by default. Otherwise the default location is the
+        system temporary directory.
+
+ `log_file_directory` is used to create relative paths when screenshots + are logged. By default the paths to images in the log file are absolute.
+
+        Examples (use only one of these):
+
+        | *Setting* | *Value*  | *Value* | *Value* |
+        | Library | Screenshot |         |         |
+        | Library | Screenshot | ${CURDIR}/images | |
+        | Library | Screenshot | ${OUTPUTDIR} | ${OUTPUTDIR} |
+
+        It is also possible to set these directories using `Set Screenshot
+        Directories` keyword.
+        """
self.set_screenshot_directories(default_directory, log_file_directory)

     def set_screenshot_directories(self, default_directory=None,
-                                 log_file_directory=None):
+                                   log_file_directory=None):
         """Used to set `default_directory` and `log_file_directory`.

-        See the library documentation for details.
+        See the `library importing` for details.
         """
-        if default_directory is None:
+        if not default_directory:
             self._default_dir = tempfile.gettempdir()
         else:
self._default_dir = os.path.normpath(default_directory.replace('/', os.sep))
-        if log_file_directory is None:
+        if not log_file_directory:
             self._log_file_dir = None
         else:
self._log_file_dir = os.path.normpath(log_file_directory.replace('/', os.sep))

Modified: trunk/src/robot/libraries/Telnet.py
==============================================================================
--- trunk/src/robot/libraries/Telnet.py (original)
+++ trunk/src/robot/libraries/Telnet.py Sun Nov 23 12:47:54 2008
@@ -29,14 +29,13 @@
     ROBOT_LIBRARY_SCOPE = 'TEST_SUITE'
     ROBOT_LIBRARY_VERSION = utils.get_version()

-    def __init__(self, timeout=3.0, newline='CRLF',
-                 prompt=None, prompt_is_regexp=False):
-        """This library takes the optional arguments `timeout`, `newline`,
- `prompt` and `prompt_is_regexp`. These are default values used when a - new connection is opened with the keyword `Open Connection`, and they - can be overridden. They can also be set after opening the connection - using the `Set Timeout`, `Set Newline` and `Set Prompt` keywords. See
-        these keywords for more information.
+ def __init__(self, timeout=3.0, newline='CRLF', prompt=None, prompt_is_regexp=False):
+        """Telnet library can be imported with optional arguments.
+
+        Initialization parameters are used as default values when new
+ connections are opened with `Open Connection` keyword. They can also be + set after opening the connection using the `Set Timeout`, `Set Newline` and
+        `Set Prompt` keywords. See these keywords for more information.

         Examples (use only one of these):

@@ -101,8 +100,8 @@

The `timeout`, `newline`, `prompt` and `prompt_is_regexp` arguments get
         default values when the library is taken into use, but setting them
-        here overrides those values for this connection. See `library
-        initialization` for more information.
+ here overrides those values for this connection. See `importing` for
+        more information.
         """
         if timeout is None or timeout == '':
             timeout = self._timeout
@@ -183,7 +182,7 @@
         """Sets the timeout used in read operations to the given value.

         `timeout` is given in Robot Framework's time format
-        (e.g. 1 minute 20 seconds).
+        (e.g. 1 minute 20 seconds) that is explained in the User Guide.

         Read operations that expect some output to appear (`Read
         Until`, `Read Until Regexp`, `Read Until Prompt`) use this

Reply via email to