1

Is there a way to focus on the latest window open? or switching to the window by getting the current handle of the window?

I was able to print the only window that is opened which is:

CDwindow-e8d2af8d-33e8-4538-be6b-6e61f470bf9a
user7242550
  • 241
  • 1
  • 6
  • 19

1 Answers1

2

this answer worked for me:

driver.switch_to_window(driver.window_handles[-1])
title=driver.title
user7242550
  • 241
  • 1
  • 6
  • 19