How to explicitly specify a path to Firefox for Selenium?

后端 未结 8 2323
伪装坚强ぢ
伪装坚强ぢ 2021-02-14 14:16

I got Selenium IDE, followed this post, got to

python test_default_server.py

and it complains Firefox is not in my path:

Please         


        
8条回答
  •  执念已碎
    2021-02-14 14:27

    If on C# editor, use the following string:

    selenium = new DefaultSelenium("localhost", 4444, "*firefox C:\\Program Files\\firefox.exe", "http://www.google.com/");
    

    Note: use an extra back slash before Program Files and firefox.exe, since a single backslash becomes an unrecognized escape sequence.

提交回复
热议问题