Skip to content

Commit

Permalink
Put options behind environment variable
Browse files Browse the repository at this point in the history
  • Loading branch information
sirspen committed Aug 23, 2024
1 parent 14e5343 commit 5664113
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions selenosis/selenium.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,14 @@ def create_webdriver(self, *args, **kwargs):
options.add_argument('headless')
options.add_argument('disable-gui')
options.add_argument('no-sandbox')
options.add_argument('disable-web-security')
options.add_argument('--disable-features=IsolateOrigins,site-per-process')
if os.environ.get('DISABLE_DEV_SHM_USAGE'):
options.add_argument('disable-dev-shm-usage')
if os.environ.get('CHROME_BIN'):
options.binary_location = os.environ['CHROME_BIN']
if os.environ.get('DISABLE_WEB_SECURITY'):
options.add_argument('disable-web-security')
options.add_argument('--disable-features=IsolateOrigins,site-per-process')


kwargs['options'] = options

Expand Down

0 comments on commit 5664113

Please sign in to comment.