port

Finding a available port number in Windows

See the following page for some clever code for finding an available port number in Windows to start an instance of the selenium server. This is handy when you are trying to start multiple instances of selenium and need port numbers that are not in use.

http://www.seleniumrecipes.com/content/searchport-batchfile

Tags: