1,072
edits
No edit summary |
|||
| Line 81: | Line 81: | ||
=== Comments on the SIDE script exporter for Python === | === Comments on the SIDE script exporter for Python === | ||
*'''Indent the body of the script. '''A code block in Python is defined by indention rather than delimiters such as { }. While the exporter correctly indents the Python testing functions that drive the script, most of the converted IDE commands are not. Those statements need to be indented to the same level as the sel = self.selenium statement - 8 spaces. Note that | *'''Indent the body of the script. '''A code block in Python is defined by indention rather than delimiters such as { }. While the exporter correctly indents the Python testing functions that drive the script, most of the converted IDE commands are not. Those statements need to be indented to the same level as the sel = self.selenium statement - 8 spaces. Note that indention is in spaces and not tabs. Mixing them causes errors. | ||
<blockquote>The VI editor can insert spaces | <blockquote>The VI editor can insert with spaces as follows: 1) in visual mode type capital V and highlight the lines to indent. 2) in command mode enter <pre>'<,'>s/^/ /</pre> | ||
which | which inserts at the beginning of each highlighted line the spaces between the last two slashes. Identation within functions, while-loops, if-then statements, etc is normally 4 spaces.<br> | ||
</blockquote> | </blockquote> | ||
*'''while, whileEnd, goto, gotoIf, label''' and other commands that are not Selenium built-ins are converted as a call to the selenium class and marked as a comment. The commands can be found by searching for "# sel."<br> | *'''while, whileEnd, goto, gotoIf, label''' and other commands that are not Selenium built-ins are converted as a call to the selenium class and marked as a comment. The commands can be found by searching for "# sel."<br> | ||
edits