✔ How To Attach Javadoc And Source Code To

Published: 16 October 2018
on channel: Rex Jones II
4,339
51

In this video, I am going to demonstrate How To Attach Javadoc and Source Code For Selenium. The purpose of Javadoc is to provide documentation about Java while Source Code shows the actual code and comments.

► Increase Video Quality: Settings - Quality - Select HD
► CC Font Size: Settings - Subtitles/CC - Options - Font Size
► Turn CC On or Off: Click CC

► Free Selenium PDF Book: https://www.rexjones2.com/book-seleni...
► Free Java PDF Book: https://www.rexjones2.com/book-part-1...
► All Paperback & eBooks: http://tinyurl.com/Rex-Allen-Jones-Books

► Transcript
The first thing I am going to do is show you how it looks when Javadoc and Source Code is not available. For starters, let’s hover over the WebDriver class and notice how the note states “This element neither has attached source nor attached Javadoc and hence no Javadoc could be found”. We see another note if we click the icon for opening an attached Javadoc in a Browser. It’s letting us know that the Javadoc has not been configured. If we Open Declaration, Source not found shows up under Class File Editor.

Even the methods for WebDriver such as close do not show any information. We see the same note. Let’s start by attaching the Source Code. There are 2 ways to attach a Source. The first way is by navigating to Build Path, then select Configure Build Path. Under the Libraries tab, expand Classpath, and expand client-combined-3.9.0 jar.

We see Source attachment and Javadoc location display None. Select Source attachment, click Edit, select External location, then click the External File button. After clicking the External File button, we locate the sources jar file, click Open, click OK then the click Apply and Close button.
Now, watch what happens when we hover over WebDriver. We see a description of WebDriver. Open Declaration displays the Source Code for WebDriver. A description also shows up for the close method.

When it comes to Javadoc, we have to get the URL from Selenium’s website then configure the Build Path. Scroll down to the Selenium Client and WebDriver Language Bindings section, right click Javadoc, then Open in a new tab. Copy the URL and go back to Eclipse. Let’s Configure the Build Path. Select Javadoc location then click Edit. We paste the URL, remove index.html, click the Validate button, just to confirm the location is valid, click OK 2 times, then click the Apply and Close button.

Now, look what happens when opening the attached Javadoc in a browser. The description for Selenium WebDriver’s class and methods will show up if we attach Source Code or attach Javadoc. That’s why the previous note stated “This element neither has attached source nor attached Javadoc”. If I remove the Source Code, a description still shows up because Javadoc has been attached.

I am going to remove the Source Code and show you second way to attach Source Code. Let’s go back to Build Path, Select Source attachment, click Remove, then click Apply and Close.
We see description is still available for WebDriver and close. That’s because we attached the Javadoc. The other way to attach a source through Open Declaration. Select Open Declaration then click Attach Source button. Although this is a different way to attach the Source Code, it’s the same dialog we saw when going though Build Path.

Select External location, click the External File button, select the sources jar file, and click OK. Here’s the Source Code. I believe having a description of the class and its methods within Eclipse are helpful when you want to read about the class and its methods. Thank You for watching How To Attach Javadoc and Source Code For Selenium.

#SeleniumTraining #SeleniumAutomation #BeginnerSeleniumTutorials #SeleniumWebDriver


Watch video ✔ How To Attach Javadoc And Source Code To online without registration, duration hours minute second in high quality. This video was added by user Rex Jones II 16 October 2018, don't forget to share it with your friends and acquaintances, it has been viewed on our site 4,339 once and liked it 51 people.