このページからリンクを抽出するために HTML::SimpleLinkExtor を使用しています : http://cpc.cs.qub.ac.uk/authorIndex/AUTHOR_index.html文字としての「Ç」。何をするか %C7 に変更します。したがって、プログラムの残りの部分でリンクを使用すると、コード 404 エラーが発生します。これが私のコードです:
#!/usr/bin/perl
use strict;
use warnings;
use HTML::SimpleLinkExtor;
use Time::HiRes qw(sleep);
use Test::WWW::Selenium;
use Test::More "no_plan"; #tests => 37; #
#use Test::Exception;
Test::More->builder->output ('result.txt');
Test::More->builder->failure_output ('errors.txt');
my $base = "http://cpc.cs.qub.ac.uk/authorIndex/AUTHOR_index.html";
my $sel = Test::WWW::Selenium->new( host => "localhost",
port => 4444,
browser => "*firefox",
browser_url => "http://cpc.cs.qub.ac.uk/" );
################################################
my $extor = HTML::SimpleLinkExtor->new($base);
$extor->parse_url($base);
my @all_links = $extor->a;
################################################
$sel->start();
$sel->open_ok($base);
$sel->open_ok($_) foreach (@all_links);
$sel->stop();
同様に、抽出されたリンクを使用して click() 関数を実装する方法はありますか?
ありがとう