无法创建WWW实例:Mechanize :: Firefox

eli*_*ane 4 perl automated-tests www-mechanize

我刚刚安装了WWW:Mechanize::Firefox,但是当我尝试创建这个"类"的实例时:

    my $mech = WWW::Mechanize::Firefox->new();
Run Code Online (Sandbox Code Playgroud)

我收到此错误:

Failed to connect to , problem connecting to "localhost", port 4242: 
No connection could be made because the target machine 
actively refused it. 
at C:/strawberry/perl/site/lib/MozRepl/Client.pm line 144
Run Code Online (Sandbox Code Playgroud)

有人可以帮忙吗?

dax*_*xim 7

您必须安装mozrepl并在菜单中启动它Tools ? MozRepl ? Start.

  • @Grigor:右键单击新firefox中的任何工具栏(不是选项卡):然后单击菜单栏查看菜单栏.然后出现菜单栏,然后​​是tools-> mozrepl-> Start (2认同)