switchToNextWindow() and switchToLastWindow()

When is ‘next window’ and what is ‘last window’ and where do we use one vs the other to switch window ?

switchToLastWindow() switches to the window opened last among all available windows, switchToNextWindow() switches to the window after the currently active window (it is not necessarily the last one).

See an example that uses these actions in this topic

Thanks for the explanation and sample codes

1 Like