sudo lsmod | grep -i vbox
vboxsf 40960 0
vboxguest 233472 5 vboxsf
vboxvideo 36864 2
ttm 94208 1 vboxvideo
drm_kms_helper 151552 1 vboxvideo
syscopyarea 16384 2 vboxvideo,drm_kms_helper
sysfillrect 16384 2 vboxvideo,drm_kms_helper
sysimgblt 16384 2 vboxvideo,drm_kms_helper
drm 344064 5 vboxvideo,ttm,drm_kms_helper
/var/log/vboxadd*
cd /media/$(whoami)/VBox_GAs_X.Y.Z
./VBoxLinuxAdditions.run
Verifying archive integrity... All good.
Uncompressing VirtualBox X.Y.Z Guest Additions for Linux........
VirtualBox Guest Additions installer
Removing installed version X.Y.Z of VirtualBox Guest Additions...
update-initramfs: Generating /boot/initrd.img-4.15.0-128-generic
Copying additional installer modules ...
Installing additional modules ...
VirtualBox Guest Additions: Building the VirtualBox Guest Additions kernel modules. This may take a while.
VirtualBox Guest Additions: Running kernel modules will not be replaced until the system is restarted
...
#!/usr/bin/env python3
from __future__ import print_function
import os,sys,time,re
from selenium import webdriver
from selenium.common.exceptions import WebDriverException
from selenium.webdriver.chrome.options import Options
is_windows = os.getenv('OS') != None and re.compile('.*NT').match( os.getenv('OS'))
homedir = os.getenv('USERPROFILE' if is_windows else 'HOME')
print('user home directory path: {}'.format(homedir), file = sys.stderr)
chromedriver_path = homedir + os.sep + 'Downloads' + os.sep + ('chromedriver.exe' if is_windows else 'chromedriver')
print('chromedriver path: {}'.format(chromedriver_path), file = sys.stderr)
options = Options()
profile_dir_name = None
if len(sys.argv) > 1:
profile_dir_name = sys.argv[1]
if profile_dir_name == None:
profile_dir_name = 'CustomProfile'
user_data_dir ='{0}\\AppData\\Local\\Google\\Chrome\\User Data\\{1}'.format(os.getenv('USERPROFILE'), profile_dir_name) if is_windows else '{0}/.config/{1}'.format(os.getenv('HOME'), profile_dir_name)
if os.path.isdir(user_data_dir):
print('Custom profile will be used: "{}"'.format(user_data_dir), file = sys.stderr)
else:
print('Custom profile will be created: "{}"'.format(user_data_dir), file = sys.stderr)
options.add_argument( 'user-data-dir={}'.format(user_data_dir))
try:
driver = webdriver.Chrome(executable_path = chromedriver_path, options = options)
# TODO: Message: unknown error: Chrome failed to start: exited normally.
# unknown error: DevToolsActivePort file doesn't exist
# The process started from chrome location
# C:\Program Files\Google\Chrome\Application\chrome.exe
# is no longer running, so ChromeDriver is assuming that Chrome has crashed.
# from chromedriver / chrome version mismatch
except WebDriverException as e:
driver = None
print(e, file = sys.stderr)
pass
# TODO: catch unknown error: Could not remove old devtools port file.
# Perhaps the given user-data-dir at ... is still
# attached to a running Chrome or Chromium process
if driver != None:
driver.get('chrome://version/')
time.sleep(10)
driver.close()
driver.quit()
if not os.path.isdir(user_data_dir + os.sep + 'Default' ):
print('The profile was not created: "{}"'.format(user_data_dir), file = sys.stderr)
# on a vanilla Windows node
# PATH=%PATH%;c:\Python38;%USERPROFILE%\Downloads
Type mismatch: cannot convert from Value to String
упростите@EnableSentry(dsn ="${sentry.sdn}")