I am creating a webdriver instance using selenium for some automation work. I am opening multiple tabs at a time and would like to know if there is a way to get the URLs of all the tabs open.
driver=webdriver.Chrome()
driver.current_url
The above code provides me with the URL of the first tab only. Another thing I tried was:
driver.window_handles[0].current_url
The above solution failed as window_handles()
returns a unicode object which does not contain current_url
I prefer not going through all the tabs actively in order to find the current_url
of each tab as it would disrupt the automation task at hand.