Attaching test cases for this (+ small change in doc).
Tested this in one of WIP branch where I had modified select_active_windows and it failed
as expected.
Please let me know if something can be improved in this.
Regards,Ankit Kumar Pandey