From e0a5d953d37fa42535a7753579f90890b80792a8 Mon Sep 17 00:00:00 2001 From: piair Date: Wed, 29 Dec 2021 11:08:15 +0100 Subject: [PATCH] same as before --- V4.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/V4.py b/V4.py index cc5b0d0..6abc447 100644 --- a/V4.py +++ b/V4.py @@ -109,10 +109,12 @@ def CustomSleep(temps): def ListTabs(Mdriver = None ): tabs = [] if Mdriver : - driver = Mdriver - for i in driver.window_handles : - driver.switch_to.window(i) - tabs.append(driver.current_url) + ldriver = Mdriver + else : + ldriver = driver + for i in ldriver.window_handles : + ldriver.switch_to.window(i) + tabs.append(ldriver.current_url) return(tabs)