Selenium - 自定义 Firefox 配置文件

发布于 2024-09-18 00:49:32 字数 575 浏览 4 评论 0原文

我已经设置了一个新的 Firefox 配置文件以与 Selenium 一起使用(接受本地 QA 站点的证书警告)。

但是,我不断被告知配置文件目录不存在。

这是我的批处理文件中的行

java -jar selenium-server.jar -firefoxProfileTemplate ~/"C:\Documents and Settings\dadams\Application Data\Mozilla\Firefox\Profiles\k39jzisz.SeleniumUser"

,但我收到的消息是:

Firefox profile template doesn't exist: C:\Installs\selenium-remote-control-1.0.
3\selenium-server-1.0.3\~\C:\Documents and Settings\dadams\Application Data\Mozi
lla\Firefox\Profiles\k39jzisz.SeleniumUser

任何人都可以告诉我我没有正确执行哪些操作吗?

I've setup a new firefox profile for use with Selenium (accepted certificate warnings for local QA site).

But, I keep getting told the profile directory does not exist.

This is the line from my batch file

java -jar selenium-server.jar -firefoxProfileTemplate ~/"C:\Documents and Settings\dadams\Application Data\Mozilla\Firefox\Profiles\k39jzisz.SeleniumUser"

but the message I get is:

Firefox profile template doesn't exist: C:\Installs\selenium-remote-control-1.0.
3\selenium-server-1.0.3\~\C:\Documents and Settings\dadams\Application Data\Mozi
lla\Firefox\Profiles\k39jzisz.SeleniumUser

Can anyone tell me what I have notdoen correctly?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

恋你朝朝暮暮 2024-09-25 00:49:33

您启动服务器的方式是正确的,只要不要提及用户主目录(~/)就可以了。我不确定反斜杠 () 是否有效,如果不能尝试使用正斜杠 (/):


java -jar selenium-server.jar -firefoxProfileTemplate "C:\Documents and Settings\dadams\Application Data\Mozilla\Firefox\Profiles\k39jzisz.SeleniumUser"

The way you start your server is correct, just do not mention the user home directory (~/) then it should be fine. I am not sure if the backward slash () works, if not try out with forward slashes (/):


java -jar selenium-server.jar -firefoxProfileTemplate "C:\Documents and Settings\dadams\Application Data\Mozilla\Firefox\Profiles\k39jzisz.SeleniumUser"
自此以后,行同陌路 2024-09-25 00:49:32

我认为问题实际上是配置文件的位置。

我创建了一个新的配置文件并将其放入“c:\lib\selenium\ff_profile”
正如建议的: http://agileqatesting.com/?p=27

它似乎有效正确!

所以批处理文件中的行现在看起来像

java -jar selenium-server.jar -firefoxProfileTemplate "C:\lib\selenium\ff_profile"

I think the problem was actually the location of the profile.

I created a new profile and put it in "c:\lib\selenium\ff_profile"
as suggested on: http://agileqatesting.com/?p=27

and it seems to work correctly!

so the line in the batch file now looks like

java -jar selenium-server.jar -firefoxProfileTemplate "C:\lib\selenium\ff_profile"
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文