kaykay, am not sure why it din't work...but you may be missing last "\
\" in the directory path from the Freddy's example ?
On Mar 10, 10:13 pm, Freddy Vega <
freddy.vega...@gmail.com> wrote:
> Sorry for the late reply. My apologies also for assuming that it
> would be obvious that my
> Example was just that a sample and although it does work, it may not
> work in all systems.
>
> Do you haveperlin your path?
>
> On Feb 15, 12:48 pm, kaykay <
keerthi....@gmail.com> wrote:
>
>
>
>
>
>
>
> > Hi All,
>
> > thanks for your reply.
>
> > @Freddy: I tried using your method Selenium RC server is unable to get
> > the connection and hence thetestis not running. I mean theperlfile
> > which I am trying to connect to RC Server is not working
>
> > This is my file
>
> > my $result_dir = "C:\\Users\\Keerthi\\Desktop\\Try";
>
> > opendir (my $dh, $result_dir) or die "can't open dir: $!";
> > while (readdir $dh){
> > if ($_ =~ /pl$/){
> > system ( $_ );
> > }
>
> > }
>
> > I have tenperlscripts in C:\\Users\\Keerthi\\Desktop\\Try and tried
> > executing all of them as atestsuite. Its not working.
>
> > Would be helpful if someone has shed some light on this
>
> > Thanks once again.
>
> > Regards,
> > Keerthi
>
> > On Feb 12, 12:50 am, Freddy Vega <
freddy.vega...@gmail.com> wrote:
>
> > > This is essentially what the command
> > > perl-MTest::Harness -e "@ARGV= map glob, @ARGV if $^O =~ /
> > > ^MSWin/; runtests @ARGV;" Tests/*.pl
>
> > > is doing. Is going into the directory that holds the scripts and
> > > executing them one by one usingTest::Harness (aperlmodule).
>
> > > You can achieve the same thing by creating a driver script that calls
> > > all of yourperlscripts in order. This driver script could be a
> > > windows .bat file, linux shell script or even aperlscript that
> > > simply contains 10 system calls to your individual scripts.
>
> > > For example:
> > > Assuming that your scripts reside in the directory C:\Automation
> > > \Scripts\, this is how i would do it inperl.
>
> > > my $result_dir = "C:\\Automation\\Results\\"
>
> > > opendir (my $dh, $result_dir) or die "can't open dir: $!";
> > > while (readdir $dh){
> > > if ($_ =~ /pl$/){
> > > system ( $_ );
> > > }
>
> > > }
>
> > > The above:
> > > 1. Opens the directory
> > > 2. Reads the directory
> > > 3. If the file ends in PL it gets executed by the system call
>
> > > Hope this helps.
>
> > > On Feb 11, 11:35 am, kaykay <
keerthi....@gmail.com> wrote:
>
> > > > Hi All,
>
> > > > I am new to this group. I have created separatePERLscripts using
> > > > Selenium IDE. Record a script and export the script using Selenium IDE
> > > > (Exporttestcase asPERL) and saved it as
script1.pl. The list goes
> > > > to
script10.pl
>
> > > > I am able to playback all the tenperlscripts individually using
> > > > Selenium RC without any problem. But, my task is to have all tenperl
> > > > scripts in one file and should be called using Selenium RC by a single
> > > >perlfile. I am able to do this by HTML file using the above code.
> > > > C:\Program Files (x86)\Java\jre6\bin>java -jar selenium-server.jar -
> > > > htmlSuite "*firefox" "
http://www.google.com" "C:\Program Files
> > > > (x86)\Java\jre6\bin\Selenium\testsuite.html" "C:\Program Files
> > > > (x86)\Java\jre6\bin\Selenium\results.html".
>
> > > > But unfrotunately forPERLI do not know how to do this. I saw this
> > > > code snippet in the internet forPERL. Follwed the same instructions
> > > > but it did not work.
>
> > > > REM Run alltestscripts in the Tests directory.
>
> > > > set SE_BROWSER=firefox
> > > > set SE_SITE=
tst11.dev
> > > > set SE_BUILD=0037_00
>
> > > >perl-MTest::Harness -e "@ARGV= map glob, @ARGV if $^O =~ /^MSWin/;