1,072
edits
No edit summary |
|||
| (6 intermediate revisions by the same user not shown) | |||
| Line 34: | Line 34: | ||
*The Selenium IDE can generate Python code for individual SIDE commands by exporting a "script" to Python that contains only one or a few commands. The exporter does not require a fully operational script. An single SIDE command may be translated to one or more Python functions. For example, the verifyXYZ IDE commands are generally translated to a get_xyz( ) passed to an assertion function. | *The Selenium IDE can generate Python code for individual SIDE commands by exporting a "script" to Python that contains only one or a few commands. The exporter does not require a fully operational script. An single SIDE command may be translated to one or more Python functions. For example, the verifyXYZ IDE commands are generally translated to a get_xyz( ) passed to an assertion function. | ||
<br> | ==== Shared Libraries ==== | ||
[[Code libraries for AMO pages]] are available to help centralize code and simplify python scripts. They contain functions that execute features and locators for page elements.<br> | |||
<br> | |||
=== Setting Up Selenium RC === | === Setting Up Selenium RC === | ||
| Line 55: | Line 59: | ||
<br> | <br> | ||
=== Running the Selenium script in Python | === Running the Selenium script in Python === | ||
==== In Windows ==== | ==== In Windows ==== | ||
| Line 73: | Line 77: | ||
*To start a script in the debugger enter<br> | *To start a script in the debugger enter<br> | ||
<blockquote>python -m pdb ''myscript''<br> where ''myscript'' is the script file. More information about the debugger [http://docs.python.org/library/pdb.html here]. </blockquote> | <blockquote>python -m pdb ''myscript''<br> where ''myscript'' is the script file. More information about the debugger [http://docs.python.org/library/pdb.html here]. </blockquote> | ||
<br> | <br> | ||
edits