Here comes 2 windows pop out during the testing.
my code:
string BaseWindow = driver.CurrentWindowHandle;
ReadOnlyCollection
Using the original post code.
string existingWindowHandle = driver.CurrentWindowHandle;
Its the first window.
One important thing is:
ReadOnlyCollection
Contains the string name object, not the Windows Title Name, for
example Collection windowHandles
could contains:
Not Windows Title Name as {Menu},{PopUp}
It contains: {45e615b3-266f-4ae0-a508-e901f42a36d3},{c6010037-0be6-4842-8d38-7f37c2621e81}