We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d859281 commit e34efefCopy full SHA for e34efef
seleniumbase/undetected/__init__.py
@@ -214,9 +214,16 @@ def __init__(
214
language = "en-US"
215
options.add_argument("--lang=%s" % language)
216
if not options.binary_location:
217
- options.binary_location = (
+ binary_location = (
218
browser_executable_path or find_chrome_executable()
219
)
220
+ if binary_location:
221
+ options.binary_location = binary_location
222
+ else:
223
+ # Improve the default error message in this situation.
224
+ # Setting options.binary_location to None results in:
225
+ # "TypeError: Binary Location Must be a String"
226
+ raise Exception("Chrome not found! Install it first!")
227
self._delay = constants.UC.RECONNECT_TIME
228
self.user_data_dir = user_data_dir
229
self.keep_user_data_dir = keep_user_data_dir
0 commit comments