Dojo实习生设置Firefox的个人资料名称 [英] Dojo intern set firefox profile name
问题描述
environments:[
{browserName:'firefox',firefox_profile:'default'},
{firefox_profile:'默认'}
],
和
environments:[
{browserName:'firefox',profile:'default'},
{profile:'default'}
] ,
以及
功能:{
'selenium-version':'2.42.0',
firefox_profile:'default'
},
$ c $如
> Selenium功能
但是仍然使用匿名配置文件启动Firefox。
但是,如果我使用 watir ,
def setup
@browser = Watir :: Browser。 new:firefox,:profile => 'default'
goto_ecp_console_manage_page
end
浏览器启动默认配置文件 kinit-ed'(kerberos)
解决方案 Selenium功能页面中指出, firefox_profile
的值必须是Base64编码的配置文件。具体来说,您需要压缩一个Firefox配置文件目录,使用Base64对其进行编码,然后使用该字符串作为 firefox_profile
的值。 firefox-profile npm软件包可以使这个过程更容易。你会得到类似的结果:
$ p $ environments:[
{browserName:'firefox',firefox_profile:' UEsDBBQACAAIACynEk ......; },
...
],
字符串在一个单独的模块,因为它将在250kb左右。
Hi Iam trying to set firefox profile name in environment settings of intern config file.I have tried
environments: [
{ browserName: 'firefox',firefox_profile:'default' },
{firefox_profile:'default'}
],
and
environments: [
{ browserName: 'firefox',profile:'default' },
{profile:'default'}
],
as well as
capabilities: {
'selenium-version': '2.42.0',
firefox_profile:'default'
},
as mentioned in Selenium capabilities But still firefox launches with an anonymous profile.
However if I use watir,
def setup
@browser = Watir::Browser.new :firefox, :profile => 'default'
goto_ecp_console_manage_page
end
browser launches the default profile which is 'kinit-ed'(kerberos)
As the Selenium capabilities page you mention points out, the value of firefox_profile
must be a Base64-encoded profile. Specifically, you ZIP up a Firefox profile directory, Base64 encode it, and use that string as the value of firefox_profile
. The firefox-profile npm package can make this process easier. You'll end up with something like:
environments: [
{ browserName: 'firefox', firefox_profile: 'UEsDBBQACAAIACynEk...'; },
...
],
I would recommend storing the profile string in a separate module since it's going to be around 250kb.
这篇关于Dojo实习生设置Firefox的个人资料名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!