I am using Python 2.7. How could I check with python if there is more firefox windows opened? (firefox 37 and newer)
Especially I need to detect firefox POPUP windows (so not regular browser window) and then close it. [I know about popup blocking but this is not my way].
One option is to do it with image detection (I tried autopy module) but I prefer more programmatic approach. My OS is Windows and Linux.
UPDATE: This question is not related to mechanize and selenium - both are different things. I don't want to use selenium/mechanize but firefox.