Hi Nate, hi Dan, here is a quick guideline with the steps that got Selenium up and running in Java driver mode:
01 Download 'selenium-0.6.0-java.zip' from: http://selenium.thoughtworks.com/download.html 02 Unzip the file and place the folder 'selenium-0.6.0-java\browser-bot' in your webservers web app folder. Rename the 'browser-bot' folder to 'selenium-driver'. For tomcat: <tomcat root>\webapps\selenium-driver 03 Create a new Java project and provide it with the necessary dependend libraries. My dependend non project specific libraries are: - commons-logging - commons-net - commons-codec - commons-validator - log4j - junit - servletapi - selenium - jetty - jasper-compiler - jasper-runtime - jacob - cargo - j2ee (for some JSP specific classes) Some of these won't be generally needed, I just listed all possibly needed ones. 04 Write some test source code for your web application as shown in the attached class 'WebProcess', method 'testMyWebProcess'. 05 Adjust the web root URL in 'ProcessSuite.oneTimeSetUp()'. The class 'ProcessSuite' should be used to start the test. It ensures that only one Selenium instance will be started for all tests of the test suite as opposed to one instance per test. 06 Start JUnit with class 'ProcessSuite'. ('Run as JUnit Test' in eclipse.) I changed my Tomcat port from 8080 to 9090, as the Selenium Java driver insists on using 8080 for Jetty (hard coded). Then Jetty grumped about my 'web.xml' not being conform to the Web Application 2.3 DTD. After fixing that it worked. Now I experience problems with commands being executed multiple times in the browser and in the wrong order. The latter one I fairly understand but I don't know yet why commands are issued up to 80 times in a row. :( I will address this issue in the developer mailing list. Greetings, Ralf -----Ursprüngliche Nachricht----- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von Nate Kirby Gesendet: Dienstag, 29. November 2005 18:52 An: selenium-users@lists.public.thoughtworks.org Betreff: Re: [Selenium-users] Java Driven mode broken in 0.6.0? Ralf, If you could post just a quick outline of the guideline mentioned, I would appreciate it immensely. Thanks Nate ----- Original Message ----- From: "Ralf Kintrup" <[EMAIL PROTECTED]> To: <selenium-users@lists.public.thoughtworks.org> Sent: Tuesday, November 29, 2005 12:46 AM Subject: AW: [Selenium-users] Java Driven mode broken in 0.6.0? Hi all, the Java driven mode fits in natural for Java based web applications. That's why I prefer it over adding Java Script code to our pure Java code base. I have the Java driven mode up and running using the 0.6.0 zip file from the Selenium download site. I didn't try to compile the source yet. The lack of documentation gives developers a too long start-up time for the Java driven mode. I plan to write a guideline for it to fill the gap. So, don't ditch the Java driver as it really is a great way to test Java based web applications simply by adding another JUnit test case to the project. Ralf -----Ursprüngliche Nachricht----- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von Dan Fabulich Gesendet: Dienstag, 29. November 2005 01:21 An: selenium-users@lists.public.thoughtworks.org; selenium-devel@lists.public.thoughtworks.org Betreff: [Selenium-users] Java Driven mode broken in 0.6.0? (Forgive my cross-posting, but this is both an end-user request and a volunteer to aid in development.) Browsing through the lists, it doesn't look like anyone has gotten Java Driven mode to work in some time. If so, I'd like to help fix it. http://www.google.com/search?q=site:lists.public.thoughtworks.org%20java%20driven http://tinyurl.com/dmmzq http://lists.public.thoughtworks.org/pipermail/selenium-users/2005-July/000789.html http://tinyurl.com/8r2wx I, like others, are getting SeleniumCommandTimedOutExceptions... I couldn't find an issue in JIRA, so I filed one myself. http://jira.public.thoughtworks.org/browse/SEL-166 It looks like people seem to think that nobody uses Java driven mode: http://lists.public.thoughtworks.org/pipermail/selenium-devel/2005-October/000792.html http://tinyurl.com/dexnj Poking through the code in Eclipse, it looks to me like it's an issue with deadlocking around the SingleEntryAsyncQueue. On top of this, I have no evidence that logging works at all, which makes debugging problems really fun and exciting. All of the pieces are there to get Java Driven mode to work, but it doesn't look like it actually *does* work. Of course, it's hard to tell, because there's no installation/configuration documentation for the Java driver! That's only compounded by the fact that the link on the downloads page doesn't even really point to the 0.6.0 Java driver; it points to the 0.5.0 driver. Can anyone confirm whether it works for them, by pulling down the archive and running the Ant script? http://gforge.public.thoughtworks.org/download.php/53/selenium-0.6.0-java-src.zip http://tinyurl.com/7wyn6 If, as I suspect, it isn't working at all, then I'd like to volunteer to resuscitate it. (Furthermore, I think it'd be a terrible loss if it went away permanently in 0.7.0!) Using a Java driver in Selenium should be a winning combination for the Java (JSF) web application I'm testing... it would make it really easy for me to use the Java business objects to configure the back end, then initiate browser connections to verify functionality in the UI. If if Selenium is Javascript-only, then I won't have any way to directly verify that actions in the UI have had the correct effect on the database; I'll only be able to verify them *using* the UI, which just makes my life more difficult. Thanks for reading all this. Please let me know if Java driven mode works for you and, if not, whether I can help in fixing it. -Dan _______________________________________________ Selenium-users mailing list Selenium-users@lists.public.thoughtworks.org http://lists.public.thoughtworks.org/mailman/listinfo/selenium-users _______________________________________________ Selenium-users mailing list Selenium-users@lists.public.thoughtworks.org http://lists.public.thoughtworks.org/mailman/listinfo/selenium-users -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.362 / Virus Database: 267.13.8/184 - Release Date: 11/27/2005 _______________________________________________ Selenium-users mailing list Selenium-users@lists.public.thoughtworks.org http://lists.public.thoughtworks.org/mailman/listinfo/selenium-users _______________________________________________ Selenium-users mailing list Selenium-users@lists.public.thoughtworks.org http://lists.public.thoughtworks.org/mailman/listinfo/selenium-users