The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
Running Selenium on an Alternate Port; Starting the Server from Ant

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Jared Richardson

Posts: 1031
Nickname: jaredr
Registered: Jun, 2005

Jared Richardson is an author, speaker, and consultant who enjoys working with Ruby and Rails.
Running Selenium on an Alternate Port; Starting the Server from Ant Posted: Dec 8, 2009 10:41 AM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Jared Richardson.
Original Post: Running Selenium on an Alternate Port; Starting the Server from Ant
Feed Title: Agile Artisans
Feed URL: http://agileartisans.com/main/rss
Feed Description: Jared's Blog
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Jared Richardson
Latest Posts From Agile Artisans

Advertisement
I found myself needing to run Selenium tests from Java against a Selenium server running on a port other than the default 4444. Every example on the web showed me almost the right way to configure this from within JUnit... so now that I've got it working, I'm documenting it. :)

public void setUp() throws Exception {
    // this is the normal way
    // setUp(server_url, "*chrome");

    // this is the alternate port way
    selenium = new DefaultSelenium("localhost", 11111, "*firefox", server_url );
    selenium.start();
}

Hopefully this will save a few others some time!

Free Bonus Tip

Here's how to start and stop the Selenium server from an Ant script.

    <target name="start_server" description="Starts a Selenium Server in the background">
        <java jar="${lib}/selenium-server.jar" fork="true" spawn="true"/>
    </target>
	
    <target name="stop_server" description="Stops your local Selenium Server">
        <


Read: Running Selenium on an Alternate Port; Starting the Server from Ant

Topic: Amethyst Visual Studio Flash Platform IDE - New Beta Previous Topic   Next Topic Topic: NoTabs

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use