Can I start a selenium server with a different port

Is it possible to start the selenium server with a different port from my code, as we do

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

and set the port

+3
source share
2 answers

Try the following:

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

In fact, there is a constructor that accepts a port number

SeleniumServer server = new SeleniumServer(1234);
server.start();
+3
source

Source: https://habr.com/ru/post/1757077/


All Articles