Update test_workflow.py

This commit is contained in:
Leon 2023-06-03 00:40:33 +02:00 committed by GitHub
parent bebcdc21b5
commit e10ac0382b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 5 deletions

View File

@ -16,14 +16,18 @@ def main():
for k,v in os.environ.items(): for k,v in os.environ.items():
logger.info("%s = %s" % (k,v)) logger.info("%s = %s" % (k,v))
tmp = Path('/tmp') tmp = Path('/tmp').resolve()
for item in tmp.rglob('**'):
for item in tmp.glob('chrome*'):
print(item) print(item)
if item.is_dir(): if item.is_dir():
if 'chrome-' in item.name:
path_list = os.environ['PATH'].split(os.pathsep) path_list = os.environ['PATH'].split(os.pathsep)
path_list.insert(0, str(item)) path_list.insert(0, str(item))
os.environ['PATH'] = os.pathsep.join(path_list) os.environ['PATH'] = os.pathsep.join(path_list)
break
time.sleep(5) time.sleep(5)
driver = uc.Chrome(headless=True) driver = uc.Chrome(headless=True)
driver.get("https://nowsecure.nl") driver.get("https://nowsecure.nl")