Py2exe isn't copying webdriver_prefs.json into builds

前端 未结 4 569
小蘑菇
小蘑菇 2020-12-21 10:54

I\'m using py2exe to compile a Python 2.7 script that uses Selenium 2.39.0 to open up Firefox windows and carry out some routines. In the past, I\'ve been able to compile th

4条回答
  •  情话喂你
    2020-12-21 11:26

    I found a solution, and thought I would post it in case others have a similar problem. I found the missing webdriver_prefs.json file tucked away in

    C:\Python27\Lib\site-packages\selenium-2.39.0-py2.7.egg\selenium\webdriver\firefox\

    After I had navigated to that directory, I grabbed the webdriver_prefs.json file and the webdriver.xpi file. I then copied both of those files into

    dist\selenium\webdriver\firefox\

    created by py2exe, and was able to run the compiled code as expected. God save the queen.

提交回复
热议问题