JavaDoc for Selenium JARs?

4,247 views
Skip to first unread message

David

unread,
Feb 7, 2013, 8:55:44 PM2/7/13
to seleniu...@googlegroups.com
Since the Selenium binaries are distributed as JARs or JARs in zip files, do any of them contain the JavaDoc packaged inside?

If not, is there a reason not to include? It's more files yes, but the JavaDoc files are likely to be small in filesize compared to the compiled class files inside the JAR, so it's negligible in terms of filesize added on when included.

I guess those wanting JavaDoc can compile from source and package separately, but it seems more efficient to pre-package with the distributed JARs.

A benefit of having JavaDocs bundled (correctly) with the JAR is that you get (Eclipse) IDE autocomplete JavaDoc reference built in when you simply include the external JAR reference to the project. I currently just go online to view the JavaDocs, but having it in Eclipse would be nice.

Krishnan Mahadevan

unread,
Feb 8, 2013, 4:29:57 AM2/8/13
to seleniu...@googlegroups.com
David,
The javadocs along with the sources are for sure being published on to the Global Maven repos.



Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/


--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/594atW0fwMsJ.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

David

unread,
Feb 8, 2013, 2:59:20 PM2/8/13
to seleniu...@googlegroups.com
Thanks Krishnan, that link was helpful. But this is still confusing to a newcomer, it appears the JavaDoc JARs are broken up by components, the individual drivers, Selenium API, Selenium server, Selenium Java (bindings?).

So in terms of general usage that maps or matches the web SVN repo:


where you get the whole JavaDoc of the whole project tree, is there a JAR for that or one has to compile/package themselves?

And a second question for the community, I'm just a novice user of Eclipse, so anyone able to get WebDriver JavaDoc autocompletion tooltip working on Eclipse? We use the standalone server JAR with Eclipse as our Java bindings (since we also use the same JAR for RemoteWebDriver/server and Grid2 runs).

Attempting to add external JAR reference to JavaDoc JAR for selenium-api-2.28.0-javadoc.jar or selenium-java-2.28.0-javadoc.jar or selenium-server-2.28.0-javadoc.jar to Eclipse didn't allow for the autocomplete JavaDoc tooltip to work. So either I'm using the wrong JARs, or I'm not setting it up correctly.

On a side note, I was working with some other simpler Java library (less classes than WebDriver) and I had to compile from sources, which included JavaDocs, so I just packaged it all in a JAR (714k including class files & JavaDoc), and in Eclipse it found the JavaDoc and autocomplete tooltip works. Just wondering if the JavaDoc has to be packaged with the class files or follow some same naming convention as the class JAR for Eclipse to be able to find the matching JavaDoc.

Would like to here tips from others who have successfully configured WebDriver JavaDoc tooltip in Eclipse, if anyone has done so at all.

David

unread,
Feb 8, 2013, 3:01:33 PM2/8/13
to seleniu...@googlegroups.com
Forgot to mention we don't use maven to set up our Eclipse environment, but I'd consider it, if it helps with this JavaDoc issue. We do use maven to run our CI test jobs though, just not combined w/ individual Eclipse dev environments.

David

unread,
Feb 8, 2013, 3:29:33 PM2/8/13
to seleniu...@googlegroups.com
Ok, thought I'd do a Google search, and made some progress, but seems WebDriver is really complex w/ JavaDocs.

I followed instructions in this blog post:


and JavaDoc tooltip now shows for WebDriver constructors (the various drivers, DesiredCapabilities), but for the individual methods within the driver and DesiredCapability, Eclipse says no attached source found, it only shows the method signature but no info of JavaDoc method comment, argument comments, etc. Something still not linked correctly.

For me though, I linked the JavaDoc URL to the selenium standalone server JAR.

Krishnan Mahadevan

unread,
Feb 10, 2013, 12:01:59 AM2/10/13
to seleniu...@googlegroups.com
David,
You might want to consider using Maven as your build tool. I havent worked with ANT but from what I have experienced with Maven, I must admit I am pampered by what Maven has to offer :)

Since you are using Maven to run your CI, I would suggest that you please consider extending it for your project management as well.

Coming back to your question on javadocs, I think this selenium-server-2.29.0.zip [All variants of the Selenium Server: stand-alone, jar with dependencies and sources. ] contains everything that you would possibly need.

Wouldn't that help ?

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/


To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/2D_7lTPZfsAJ.

David

unread,
Feb 11, 2013, 2:18:12 PM2/11/13
to seleniu...@googlegroups.com
Thanks for suggestions Krishnan.

I briefly tried the server package, w/o extracting and referencing (in Eclipse) all the JARs in the package, too much, don't feel like it. But I think that wouldn't have helped much because just on a high level look over the JARs in the package, none of them seem to indicate they have the JavaDoc files included inside. I checked the server JAR, the standalone server JAR, and the src files JAR. The source only has the Java files, no HTML JavaDoc files.

Mike Riley

unread,
Feb 13, 2013, 3:22:09 PM2/13/13
to seleniu...@googlegroups.com
Hi David,

The source files you referred to are for the server, not the client, and you generally want the client.  That is why I always download both sets of sources using SVN (haven't set up Git for it yet).

I always build my own JavaDoc files from the sources.  I then keep them locally on my system so that when I am coding they come up more quickly than over the web.

While you should also be able to point at the JavaDoc on the web and have access to everything for the client, the problem is if you are not on the current revision of Selenium.  In that case you would be using JavaDoc info that may not exactly match the library you are using.  That is why I do a build to get local copies that always match the library I am using.

Doing that allowed me to find areas that were a bit behind in the JavaDoc info and so I submitted updates to get them current.  Mostly those were internal calls, but still very helpful.

Another advantage of grabbing all the sources for the client is that I can now single step into the library when I am trying to figure out why something isn't working.

Mike

Krishnan Mahadevan

unread,
Feb 13, 2013, 8:55:29 PM2/13/13
to seleniu...@googlegroups.com
Mike,
You dont need to go through all of that rigmarole if you are using Maven. Selenium artifacts are by default published on global maven repos along with javadocs and sources as well. 

So all you have to do is, tell maven to download javadocs and sources and then after merely doing an F3 on a method [ in eclipse ] is going to take you to the method definition. 

Working with a jar and building javadocs+sources from the repo has one minor disadvantage. There can be a mismatch between the code dwelling in the jar vs the code you see in the source. 
To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/aq2KP609AQIJ.

For more options, visit https://groups.google.com/groups/opt_out.
 
 


--

Mike Riley

unread,
Feb 15, 2013, 5:43:09 PM2/15/13
to seleniu...@googlegroups.com
Hi Krishnan,

I am going to have to look into Maven.  I think we are going to be using it here for CI with our developers, so I should have a good chance to look at it then.

I use Netbeans myself, but it has the same capability as Eclipse.

So far I have not seen any discrepancy between the source and the jar file, just the JavaDoc info is sometimes out of date (or simply done incorrectly).

Mike

Parthi

unread,
Mar 16, 2014, 5:27:02 AM3/16/14
to seleniu...@googlegroups.com
Hi,
Download the doc and add this doc for the jar file "selenium-java-2.40.0.jar". Its working for me, using NetBeans.
Reply all
Reply to author
Forward
0 new messages