#!/usr/bin/perl use strict; use warnings; use WWW::Selenium; $ENV{PATH}="c:\\progra~1\\mozill~1;$ENV{PATH}"; # The first argument "1" is to make this run in the background # and not block on Windows. You would of course do this # differently on a *nix or other system. system(1, "java", "-jar", "c:/selenium/seleni~1.0-b/seleni~1.0-b/se23ae~1.0-b/seleni~1.jar", "-firefoxProfileTemplate", "c:/selenium/firefox", "-trustAllSSLCertificates", ); my $base = "https://xxxxx.xxxxx"; my $url = "$base/login/login.asp"; my $sel = WWW::Selenium->new( host => 'localhost', port => 4444, browser => "*firefox", # browser => '*custom firefox -no-remote -profile c:/selenium/firefox', browser_url => $base, ); $sel->start(); $sel->open($url); #And at the end... $sel->stop(); $sel->do_command('shutDownSeleniumServer');