解决PyInstaller打包selenium脚本时弹出driver终端窗口

  1. 找到service.py
    C:\Users\XXX\AppData\Roaming\Python\Python39\site-packages\selenium\webdriver\common\service.py

  2. 添加creationflags
    在第77行添加:

creationflags=134217728
解决PyInstaller打包selenium脚本时弹出driver终端窗口_第1张图片

  1. 使用PyInstaller打包
    pyinstaller -F -w -i xxx.ico xxx.py

你可能感兴趣的:(selenium,python,测试工具)