Reputation: 689
I recently started using Selenium for a .net project I'm working on.
It seems to work well however obviously you have to supply a URL like http://localhost:55555
or whatever address you are testing your application on.
My problem is that different people's computers in my team visual studio deploys to different port numbers on localhost so every time to get the tests to pass they have to find out what port there computer is deploying to locally and change it in the tests.
Does anyone know of a way I can detect the port number automatically so it doesn't need changed for each persons computer?
Thanks
Upvotes: 1
Views: 754
Reputation: 419
I don't think you can do this with Selenium, because the port number is set randomly by VS during launch. However, the common solution to your problem is to have everyone use the same test port. This post shows how to do it.
Upvotes: 3