Selenium Forum: Functional And Regression Testing Tool.
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Search
Display results as :
Advanced Search
Latest topics
AEM Training | Free Online DemoWed Apr 21, 2021 5:45 pmazharuddin
c# PageFactory - issue initializing elementsFri Nov 01, 2019 8:40 pmthegoatboy
Selenium making automatic connection to random urlsMon Jul 08, 2019 12:58 pmrepairtechsolutions1
How can we design the custom framework in Selenium RCMon Jun 24, 2019 2:26 pmrandybonnettes
What are the new features in Selenium 3.0Tue Jun 18, 2019 5:37 pmpappyvicky
What are you using Selenium for? Fri Apr 12, 2019 3:52 amzhl
LIMITATIONS OF SELENIUMWed Apr 10, 2019 11:23 amswara
Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

Go down
avatar
katuri.babu8@gmail.com
Posts : 1
Join date : 2013-12-19

In Selenium RC wat is the Need of  Running Selenium Server On Custom port Empty In Selenium RC wat is the Need of Running Selenium Server On Custom port

Thu Dec 19, 2013 5:19 pm
The default selenium port was 4444

but by using the 

RemoteControlConfiguration  rcc=new RemoteControlConfiguration();
rcc.setPort(1234);  // This is RCC  class method . here we pass the 4 digits


  My Question is wat is the use of Custom Port 
avatar
ravinderreddy
Posts : 6
Join date : 2012-11-10
Age : 37
Location : Hyderabad/Mumbai

In Selenium RC wat is the Need of  Running Selenium Server On Custom port Empty Re: In Selenium RC wat is the Need of Running Selenium Server On Custom port

Mon Dec 30, 2013 1:26 pm
When running selenium server often it happens that it can’t start with the following error:
“Selenium is already running on port 4444. Or some other service is.”

This happens because Selenium uses the 4444 port as its default and if you already started selenium or some other application is using that port Selenium will be prevented from using the same port.

static int port=4444;
          try {
             ServerSocket serverSocket = new ServerSocket(port);
             //Checking whether 4444 is closed or not
             if(!serverSocket.isClosed())
                port=5555;//Or whatever port you like
             //Now start selenium server
             RemoteControlConfiguration rcc = new RemoteControlConfiguration();
             rcc.setPort(port);
             SeleniumServer server = new SeleniumServer(false, rcc);
             server.start();  }

          catch(Exception e){
            e.printStackTrace(); }
Back to top
Permissions in this forum:
You cannot reply to topics in this forum