To export a code to Perl, you need to do the following things:
- Code in Perl language
- Integrate SeeTestAutomation and Perl.
Get script code in Perl:
Step 1: Create a test case.
Step 2: Click on the Code tab.
Step 3: Click on the drop down button of Languages and Select Perl.
Code will automatically generate in Perl language.
Step 4: Copy the generated code in Perl and paste into a text file. Here is an example of such a generated code:
Step 5: Save it with .pl extension.
Integrate to Perl:
- Need to integrate the perl environment with SeeTestAutomation built-in clients located in the installation folder under the ../clients/perl subfolder
- Copy the file ExperitestClient.pm ( located in <installation folder>\clients\perl) and paste it on the same directory where your Perl script is saved.
- Need to install RPC::XML module:
- Open ppm.bat (Perl Package Manager)
- Search for "rpc xml data"
- Select this package
- Click on 'Run marked Actions'.
- Wait for installation.
Run your script:
- From the command line go to the script location and run it using the command: perl <ScriptName>
Another way to run the Perl Script is on the PerlIDE "Padre".
- You can download the PerlIDE from the Link given below:-
DWIM Perl 220.127.116.11 (v7).
- Install this IDE and add rpc::xml module.You should download the module librpc-xml-perl_0.77.orig.tar.gz file.
- You can add this module by clicking on Tools -> Module Tools -> Install Local Distribution.
In the following screenshot you will see that rpc::xml module is installing.
Run the Script:-
- Copy the code from SeeTestAutomation and paste in the framework.
- Save the ExperitestClient.pm file on the same directory with your Script.
- Click on 'Run Script' and execute the script.