我正在尝试编写一个小代码,但是一旦我导入" Selenium :: Remote :: Driver:",我收到错误说明 "无法在@ INC"
中找到Selenium / Remote / Driver.pm我尝试使用以下命令安装它
sudo apt-get install libtest-www-selenium-perl
我仍然得到同样的错误
$ perl -e 'use Selenium::Remote::Driver;' Can't locate Selenium/Remote/Driver.pm in @INC (you may need to install the Selenium::Remote::Driver module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.22.1 /usr/local/share/perl/5.22.1 /usr/lib/x86_64-linux-gnu/perl5/5.22 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.22 /usr/share/perl/5.22 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base .) at -e line 1. BEGIN failed--compilation aborted at -e line 1.
答案 0 :(得分:0)
Selenium::Remote::Driver不属于Test::WWW::Selenium。来自documentation:
安装
使用cpanm
或CPAN
可能最简单 命令:bash $ cpanm Selenium::Remote::Driver