Many a times developers don't assign the
name attribute to pop-up windows. In such cases, we can use its window
handle attribute. However, the
handle attributes keep changing and it becomes difficult to identify the pop-up window, especially when there is more than one pop-up window open. Using the
title attributes of the page displayed in a pop-up window, we can build a more reliable way to identify the pop-up windows.
In this recipe, we will use the
title attribute to identify the pop-up window and then perform operations on it.
We will create a test that retrieves the handles of all the open windows in the current driver context. We will iterate through this list ...