首页 > 解决方案 > Create a Python executable with Selenium webdriver manager

问题描述

I want to convert my Selenium code to an executable, I used auto-py-to-exe, it always worked for non Selenium codes, so I don't know what to do.

I was looking at the answer that was provided here : Create a Python executable with chromedriver & Selenium but it doesn't exactly address my problem because you need to change the .spec file and add your Chromedriver path, but I don't use chromdriver, I use webdriver manager.

so I am kinda lost here any help

标签: pythonseleniumselenium-webdriverexecutable

解决方案


我遇到了同样的问题。我想假设 selenium 脚本是普通的 python 文件。它奏效了。使其成为可执行文件的步骤:

pip install pyinstaller
pyinstaller --onefile pythonScriptName.py

推荐阅读