Selenium RC start the selenium server in different port

3,188 views
Skip to first unread message

somi

unread,
Jun 4, 2010, 6:53:53 AM6/4/10
to Selenium Users
Hi,
I need to start the selenium server in different port.
I have started the server using following command
java -jar selenium-server.jar -port 7777

It is started properly as follows
but when i run the test script it is showing the error as
There was 1 error:
1) testTextField(auto.AddFields)java.lang.RuntimeException: Could not
start Selenium session: :

I have used selenium in java and junit frame work


Please provide me the solution

Thank you
somi

David Burns

unread,
Jun 4, 2010, 7:13:36 AM6/4/10
to Selenium Users
Have you updated your test to use that port when creating a new
Selenium instance?

David Burns
http://www.theautomatedtester.co.uk/

somi

unread,
Jun 4, 2010, 9:36:43 AM6/4/10
to Selenium Users
Hi David,

I have not specified the port in my test as in java it is not
required ie it takes only URL and the browser type inputs like
setUp("http://172.16.11.20:9001/sapp/", "*iexplore");

When i start the server with default port(4444) it successfully runs
the test. but problem when i start the server using other port.

Thank you.
Somi

On Jun 4, 4:13 pm, David Burns <theautomatedtes...@googlemail.com>
wrote:
> Have you updated your test to use that port when creating a new
> Selenium instance?
>
> David Burnshttp://www.theautomatedtester.co.uk/

somi

unread,
Jun 4, 2010, 9:39:10 AM6/4/10
to Selenium Users
Hey i am using the Selenium RC of following version.
selenium-remote-control-1.0-beta-1

Thanks

Moises Siles

unread,
Jun 4, 2010, 12:26:11 PM6/4/10
to seleniu...@googlegroups.com
Could you post your java code?

I think you have to specify the port, for example in my ruby code


 def setup
    @verification_errors = []
    @selenium = Selenium::Client::Driver.new \
      :host => "localhost",
      :port => 4444,
      :browser => "*chrome",
      :url => "http://change-this-to-the-site-you-are-testing/",
      :timeout_in_second => 60

    @selenium.start_new_browser_session
  end




--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en.


somi

unread,
Jun 7, 2010, 6:50:05 AM6/7/10
to Selenium Users
Hi
i refered google and changed the code to use port even then the same
error occured.
package yy;
import com.thoughtworks.selenium.*;
import com.thoughtworks.selenium.DefaultSelenium;
import java.util.*;

public class ABC extends SeleneseTestCase {
public String testscrptnm;
GeneralUtils s;
public void LaunchBrowser() throws Exception {

final String sServerHost = "localhost";
final int iServerPort = 4545;
final String sBrowserType = "*iexplore";
final String sBaseUrl = "http://ABC/tt/";

Selenium selenium = new DefaultSelenium(sServerHost,
iServerPort, sBrowserType, sBaseUrl);
selenium.start(); // Start Selenium.
selenium.setSpeed("5000");
}
Thank you
somi



On Jun 4, 9:26 pm, Moises Siles <moises.si...@gmail.com> wrote:
> Could you post your java code?
>
> I think you have to specify the port, for example in my ruby code
>
>  def setup
>     @verification_errors = []
>     @selenium = Selenium::Client::Driver.new \
>       :host => "localhost",
>     *  :port => 4444,*
>       :browser => "*chrome",
>       :url => "http://change-this-to-the-site-you-are-testing/",
>       :timeout_in_second => 60
>
>     @selenium.start_new_browser_session
>   end
>
> > selenium-user...@googlegroups.com<selenium-users%2Bunsu...@googlegroups.com>
> > .

Prasad Joshi

unread,
Jun 8, 2010, 12:02:26 AM6/8/10
to seleniu...@googlegroups.com
Hi,
 
I think after selenium.setSpeed("5000"); you should write selenium.open("/")l; command and execute the code.
Please try this and give the feedback.
 
--Prasad
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages