我拿到硒IDE,跟着this post,拿到
python test_default_server.py
它抱怨Firefox不在我的道路上:
Please add the directory containing ''firefox.exe'' to your PATH environment
variable, or explicitly specify a path to Firefox 3 like this:
*firefox3c:\blah\firefox.exe
我可以更改PATH环境变量,但我更愿意使用它们提到的本地配置选项(“显式指定路径”)。我该怎么做?“*firefox3c”指的是什么?
Selenium 1.0.1、Python2.5、Windows XP。
如果在C编辑器上,请使用以下字符串:
注意:在程序文件和firefox.exe之前使用一个额外的反斜杠,因为一个反斜杠将成为无法识别的转义序列。
在实例化selenium而不仅仅是“*firefox”时,必须使用以下字符串:
注意:我不确定路径是否正确,但应该是类似的路径。
更新:你在哪里实例化你的浏览器? 根据问题中的标签,我想你是一个python人:
这很有帮助。
setUp("http://localhost:8080/BingDemo/BingDriver.html", "*firefox C:\Program Files (x86)\Mozilla Firefox\firefox.exe");
但是,在*firefox中用
\\
替换所有出现的\
此外,还可以将环境变量的路径指向
mozilla.exe
相关问题 更多 >
编程相关推荐