Reputation: 129
I have a written a program that will open windows in chrome, iterate through them to find a specific one and close that window if found.
I used a Mac OS python import and am having trouble converting this line:
for item in app('Web Chrome').window[0].tabs():
into a windows friendly version using webdriver. Any ideas?
Upvotes: 0
Views: 333
Reputation: 1036
Did you try with window_handle
function?
for handle in driver.window_handles:
driver.switch_to_window(handle)
Upvotes: 1