use strict;
use warnings;
use Time::HiRes qw(sleep);
use Test::WWW::Selenium;
use Test::More "no_plan";
use Test::Exception;
my $sel = Test::WWW::Selenium->new(
host => "localhost",
port => 4444,
browser => "*firefox",
browser_url => "http://10.201.3.192:8000/"
);
$sel->open_ok("/abc-dd/");
$sel->window_maximize();
$sel->$sel->$sel->$sel->_ok();
$sel->close_ok();
上面的代码适用于单个 URL。我需要对另一个 URL 执行相同的操作。以下代码仅完成了第一部分的执行。
use strict;
use warnings;
use Time::HiRes qw(sleep);
use Test::WWW::Selenium;
use Test::More "no_plan";
use Test::Exception;
my $sel = Test::WWW::Selenium->new(
host => "localhost",
port => 4444,
browser => "*firefox",
browser_url => "http://10.201.3.192:8000/"
);
$sel->open_ok("/abc-dd/");
$sel->window_maximize();
$sel->$sel->$sel->$sel->_ok();
$sel->close_ok();
$sel->open_ok("http://10.201.3.195:8000/abc-dd/");
$sel->window_maximize();
$sel->$sel->$sel->$sel->_ok();
$sel->close_ok();
我必须对单个 Perl 文件中的两个 URL 执行操作:
http://10.201.3.192:8000/abc-dd/
http://10.201.3.195:8000/abc-dd/
如何附加第二个 URL?