englishteeth.co.uk

… the weblog of Ian “English Teeth” Robinson
  • rss
  • Home

Selenium RC in the build

August 11, 2008 | 4:19 pm

I had to rediscover a bit of lost knowledge last Friday, namely integrating Selenium RC into a set of integration tests. Pretty straight forward really, but I thought I’d better record it for the next time I can’t remember how to start and stop the server from ant.

<project name="Selenium RC Server">

	<target name="start_selenium_rc" description="Start the Selenium RC server">
		<java
			jar="selenium-server.jar"
			fork="true" failonerror="true">
			<arg value="-Port" />
			<arg value="4440" />
			<arg value="-forcedBrowserMode" />
			<arg value="*iehta" />
		</java>
	</target>

	<target name="stop_selenium_rc" description="Stop the Selenium RC server">
		<get taskname="selenium-shutdown"
			src="http://localhost:4440/selenium-server/driver/?cmd=shutDown"
			dest="junit_report/result.txt" ignoreerrors="true" />
	</target>

</project>

The forced browser mode is IE for project constraints, but I did have an issue with *iexplore not working due to some proxy error but the experimental “elevated security privilege” browser worked fine.

Not so fine is that the goBack() command does not work in SeleniumRC with “*iehta”.

Comments
No Comments »
Categories
development
Tags
ant, java, selenium, testing
Comments rss Comments rss
Trackback Trackback

Author

Ian Robinson is a relatively agile software engineer interested in things both sides of the object relational divide and beyond.

Categories

  • development (35)
  • miscellaneous (20)
  • music (7)
  • software (13)

Blogroll

  • Dan North
  • Dave Astels
  • Dave Wood
  • eirikso.com
  • Matt Raible
  • Object Mentor Blog
  • The Ancient Art of Programming
  • The Wisdom of Ganesh

Tags

active-mq architecture bauhaus blu-ray css db eclipse esb festivals freesat gorm grails groovy hd hd-dvd hibernate java jboss jms junit links mce media center mini music oracle osgi patterns pirsig plugins satellite soa software spring sql struts2 testing themes tools tv web wordpress xml xpath xslt
rss Comments rss valid xhtml 1.1 design by jide powered by Wordpress get firefox