Search
 
 

Display results as :
 


Rechercher Advanced Search

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

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

View previous topic View next topic Go down

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

Post by katuri.babu8@gmail.com on 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 

katuri.babu8@gmail.com

Posts : 1
Join date : 2013-12-19

Back to top Go down

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

Post by ravinderreddy on 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(); }

ravinderreddy

Posts : 6
Join date : 2012-11-10
Age : 29
Location : Hyderabad/Mumbai

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum