nateshmbhat / webbot

Web automation library for simple and easy end to end testing and web browser automation that offers super charged features while keeping it simple to use and master
https://pypi.org/project/webbot/
Mozilla Public License 2.0
239 stars 87 forks source link

Conversion of a Python script using webbot module to an .exe file #1

Closed v-dimi closed 5 years ago

v-dimi commented 5 years ago

As I tried to convert my running Python (3.6.5) script to an .exe file using pyinstaller I was getting an error that the path of the webbot module could not be found.

In order to overcome this problem I tried to specify the path of the module in the spec file, without success. An easier workaround suggests copying the downloaded folder webbot in the same folder where the .exe file is.

But in order for this to work you should not convert it as one file like this

pyinstaller --onefile file.py

but like this

pyinstaller file.py

After doing this the .exe could be launched without any problems.

An other error was coming because of trying to import webbot in my script. Probably this is a noob mistake, but one has to:

from webbot import Browser

All in all, a very handy and easy to use module