sasikumar
sasikumar

Reputation: 567

can i start a selenium server with different port

can i start a selenium server with different port from my code like we do

seleniumserver s= new seleniumserver(); s.start()

and set port??

Upvotes: 3

Views: 3555

Answers (2)

Sergii Pozharov
Sergii Pozharov

Reputation: 17828

Actually there's a constructor that accept a port number

SeleniumServer server = new SeleniumServer(1234);
server.start();

Upvotes: 3

atamanroman
atamanroman

Reputation: 11808

Try this:

RemoteControlConfiguration conf = new RemoteControlConfiguration();
conf.setPort(1234);
SeleniumServer ss = new SeleniumServer(false, conf);

Upvotes: 2

Related Questions