我用Perl和硒/ webdriver的编写用户界面测试。我知道我可以使用Selenium::Firefox::Profile
模块为Firefox创建配置文件。Selenium/Webdriver:使用现有的Firefox配置文件?
我想用我的默认配置文件,或一个与Firefox配置文件管理器创建。是否可以使用现有的Firefox配置文件进行测试?
这不起作用:
my $ff_profile = Selenium::Firefox::Profile->new('default-1480098066829');
my $driver = Selenium::Remote::Driver->new(
'remote_server_addr' => 'localhost',
'browser_name' => 'firefox',
'firefox_profile' => $ff_profile,
'port' => '5555',
'marionette_enabled' => 1,
);
我的默认配置文件接受必须测试的内部网页自签名的SSL证书。当Webdriver使用新的配置文件打开该页面时,由于Firefox证书对话框的原因而失败。
如果我不能用我的默认配置文件,是有一些方法来将此证书添加到webdriver的新的个人资料?
很多次我们看到***不起作用***作为解释问题,我不明白为什么。没有人叫他们的服务站,并问*“我的车不工作,你认为什么是错的?”*那么为什么软件得到同样的待遇?你还可以说*你的意思是“因为Firefox证书对话框而失败”*? – Borodin
Firefox将显示未知自签名证书的警告页面,此页面导致webdriver错误: 执行命令时出错:get:处理命令时出现未知的服务器端错误:Reached error page:about:certerror? e = nssBadCert&u = https:// ... –
你的软件用什么调用来提升错误,什么是返回值和错误字符串? – Borodin