Counting the number of browser windows opened by Selenium
Is there a way to get a list of opened browser windows using Selenium? I want to use this to count the number of open browsers within a test.
jeanid last edited by user
IWebDriverhas the method
WindowHandles. The method returns a collection. So you can use the size of the collection to get the number of open windows.
I am not so familiar with C#, but in Java this works:
In C# this should work: