same as before

This commit is contained in:
piair 2021-12-29 11:08:15 +01:00
parent de4e4b4e01
commit e0a5d953d3
1 changed files with 6 additions and 4 deletions

10
V4.py
View File

@ -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)