Skip to content

Commit 21985d7

Browse files
committed
Build root Tor Browser Bundle path using the supplied binary's path
Based on @baum314nk's comment: #159 (comment) Fixes #159.
1 parent 5a37678 commit 21985d7

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
name="tbselenium",
99
description="Tor Browser automation with Selenium",
1010
keywords=["tor", "selenium", "tor browser"],
11-
version="0.5.3",
11+
version="0.6.1",
1212
long_description=long_description,
1313
long_description_content_type='text/markdown',
1414
url='https://github.com/webfp/tor-browser-selenium',
1515
packages=["tbselenium", "tbselenium.test"],
1616
install_requires=[
17-
"selenium>=3.14"
17+
"selenium>=4"
1818
]
1919
)

tbselenium/tbdriver.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import shutil
22
from os import environ, chdir
3-
from os.path import isdir, isfile, join, abspath
3+
from os.path import isdir, isfile, join, abspath, dirname
44
from time import sleep
55
from http.client import CannotSendRequest
66
from selenium.webdriver.support.ui import WebDriverWait
@@ -160,6 +160,10 @@ def setup_tbb_paths(self, tbb_path, tbb_fx_binary_path, tbb_profile_path,
160160
% tbb_path)
161161
tbb_fx_binary_path = join(tbb_path, cm.DEFAULT_TBB_FX_BINARY_PATH)
162162
tbb_profile_path = join(tbb_path, cm.DEFAULT_TBB_PROFILE_PATH)
163+
else:
164+
# based on https://github.com/webfp/tor-browser-selenium/issues/159#issue-1016463002
165+
tbb_path = dirname(dirname(tbb_fx_binary_path))
166+
163167
if not isfile(tbb_fx_binary_path):
164168
raise TBDriverPathError("Invalid Firefox binary %s"
165169
% tbb_fx_binary_path)

0 commit comments

Comments
 (0)