From e10ac0382b6c3801f6140de8d12ab6d4f9067646 Mon Sep 17 00:00:00 2001 From: Leon Date: Sat, 3 Jun 2023 00:40:33 +0200 Subject: [PATCH] Update test_workflow.py --- example/test_workflow.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/example/test_workflow.py b/example/test_workflow.py index 7ec17a8..ac9a438 100644 --- a/example/test_workflow.py +++ b/example/test_workflow.py @@ -16,14 +16,18 @@ def main(): for k,v in os.environ.items(): logger.info("%s = %s" % (k,v)) - tmp = Path('/tmp') + tmp = Path('/tmp').resolve() - for item in tmp.glob('chrome*'): + for item in tmp.rglob('**'): + print(item) + if item.is_dir(): - path_list = os.environ['PATH'].split(os.pathsep) - path_list.insert(0, str(item)) - os.environ['PATH'] = os.pathsep.join(path_list) + if 'chrome-' in item.name: + path_list = os.environ['PATH'].split(os.pathsep) + path_list.insert(0, str(item)) + os.environ['PATH'] = os.pathsep.join(path_list) + break time.sleep(5) driver = uc.Chrome(headless=True) driver.get("https://nowsecure.nl")