I found out about Selenium as a web testing tool from A Wicket Diary and found it to be conceptually an excellent web integration testing tool. However, after a couple of hours of fudging around with it and the lack of any documentation on how to integrate with JUnit I have decided to give up on this for the time being.
Hani’s approach to things is to run
ant and let it go through things. My approach is a bit more contrived.
I expect to be able to go to my POM and put in
However, at this point I had trouble since there is no
org.openqa.selenium in Maven central at the time, though now it is available.
After searching around, I found that atlasian does have it. With that I also learned about the repository tag in the POM:
And the following dependency was used.
At which point I expect the dependent jars to be downloaded for me as well. But no luck, it does not have any dependent jar information. It seems it just needs Jetty which also has incomplete dependent jar information with version 5.1.9.
After adding the relevant jars I was expecting to find some samples and Javadoc on creating the test case. I found a short, incomplete and incorrect sample back then [the link no longer exists] and no Javadocs could be found, not even on www.docjar.com. The example wasn’t good either as it had a hard coded path, I hope there is a version that does not require a hard coded path.
In the end I was able to get Selenium to start up my web browser, which then goes to http://localhost:8080/selenium-driver/SeleneseRunner.html which unfortunately does not exist.
Perhaps someone can write up an example of how to use this thing within the context of a Maven build.