Cannot find firefox binary in PATH. Make sure firefox is installed. OS appears to be: VISTA

前端 未结 14 1120
眼角桃花
眼角桃花 2020-12-25 13:10

I am not able to run my script in any of the browsers. Below is the error i get for firefox. The location where firefox is installed is correct. Dont know what is wrong.

相关标签:
14条回答
  • 2020-12-25 14:14

    you have to add vm argument while running the program. This should be like

    -Dwebdriver.firefox.bin=/custom/path/of/firefox/exe
    

    In IntelliJ IDE much simpler Goto Run → Edit Configurations... In VM options add the above.

    IntelliJ Run Configurations

    Eclipse also have the options to give vm argument while running. This way I am using portable Firefox with selenium.

    0 讨论(0)
  • 2020-12-25 14:16

    The simplest way is to use the below code before you define your Driver.

    System.setProperty("webdriver.firefox.bin",
                        "C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe");
    
    0 讨论(0)
提交回复
热议问题