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

Selenium ModuleNotFound Error #45

Closed chessboards closed 3 years ago

chessboards commented 3 years ago

When using webbot and its dependencies (selenium, urllib3) not in a virtual environment installed through pip, but in the same folder (ex. a library folder), selenium cannot be found through the relative imports in webbot.py.

A fix for this would be adding this to the beginning of the file (could be better optimized to include only specific methods): import os import sys sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))

I haven't gotten this to fully work as of yet without error, so I wouldn't implement just yet. I'll let you know once I get it working, perhaps with a pull request

issue-label-bot[bot] commented 3 years ago

Issue Label Bot is not confident enough to auto-label this issue. See dashboard for more details.

chessboards commented 3 years ago

Realized that this is probably too specific of a use case