Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix no attribute headless #1647

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions undetected_chromedriver/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ def __init__(
if no_sandbox:
options.arguments.extend(["--no-sandbox", "--test-type"])

if headless or options.headless:
if headless or (hasattr(options, 'headless') and options.headless):
#workaround until a better checking is found
try:
if self.patcher.version_main < 108:
Expand Down Expand Up @@ -485,7 +485,7 @@ def __init__(
else:
self._web_element_cls = WebElement

if options.headless:
if hasattr(options, 'headless') and options.headless:
self._configure_headless()

def _configure_headless(self):
Expand Down