Skip to content

Commit

Permalink
Fixing some stupid JDK8 javadoc errors
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkusBernhardt committed Oct 27, 2015
1 parent 7f2e47a commit ef12bbf
Show file tree
Hide file tree
Showing 8 changed files with 64 additions and 43 deletions.
@@ -1,4 +1,5 @@
package com.github.markusbernhardt.selenium2library;

import java.io.File;
import java.util.ResourceBundle;

Expand Down Expand Up @@ -32,13 +33,13 @@
* instance and should work with most modern browsers and can be used with the
* Jython interpreter or any other Java application.<br>
* <br>
* <font size="+1"><b>Before running tests</b></font><br>
* <span style="font-size: 120%;"><b>Before running tests</b></span><br>
* Prior to running test cases using Selenium2Library, the library must be
* imported into your Robot Framework test suite (see importing section), and
* the `Open Browser` keyword must be used to open a browser to the desired
* location.<br>
* <br>
* <font size="+1"><b>Locating elements</b></font><br>
* <span style="font-size: 120%;"><b>Locating elements</b></span><br>
* All keywords in Selenium2Library that need to find an element on the page
* take an locator argument.<br>
* <br>
Expand All @@ -48,7 +49,7 @@
* <i>name</i> are key attributes to all elements.<br>
* <br>
* List of key attributes:
* <table border="1" cellspacing="0">
* <table border="1" cellspacing="0" summary="">
* <tr>
* <td><b>Element Type</b></td>
* <td><b>Key Attributes</b></td>
Expand Down Expand Up @@ -76,7 +77,7 @@
* </table>
* <br>
* Example:
* <table border="1" cellspacing="0">
* <table border="1" cellspacing="0" summary="">
* <tr>
* <td>Click Element</td>
* <td>my_element</td>
Expand All @@ -88,7 +89,7 @@
* find an element by specifying a locator strategy with a locator prefix.<br>
* <br>
* Supported strategies are:
* <table border="1" cellspacing="0">
* <table border="1" cellspacing="0" summary="">
* <tr>
* <td><b>Strategy</b></td>
* <td><b>Example</b></td>
Expand Down Expand Up @@ -152,7 +153,7 @@
* with the specified id attribute.<br>
* <br>
* Example:<br>
* <table border="1" cellspacing="0">
* <table border="1" cellspacing="0" summary="">
* <tr>
* <td>Table Should Contain</td>
* <td>my_table</td>
Expand All @@ -161,16 +162,18 @@
* </table>
* <br>
* More complex table locator strategies:
* <table border="1" cellspacing="0">
* <table border="1" cellspacing="0" summary="">
* <tr>
* <td><b>Strategy</b></td>
* <td><b>Example</b></td>
* <td><b>Description</b></td>
* </tr>
* <tr>
* <td>xpath</td>
* <td>Table Should Contain | xpath=//table/[@name="my_table"] | text</td>
* <td>Matches by arbitrary XPath expression</td>
* </tr>
* <tr>
* <td>css</td>
* <td>Table Should Contain | css=table.my_class | text</td>
* <td>Matches by CSS selector</td>
Expand All @@ -182,7 +185,7 @@
* Strategy` for details about custom location strategies.<br>
* <br>
* Example:
* <table border="1" cellspacing="0">
* <table border="1" cellspacing="0" summary="">
* <tr>
* <td>Add Location Strategy</td>
* <td>custom</td>
Expand All @@ -195,7 +198,7 @@
* </tr>
* </table>
* <br>
* <font size="+1"><b>Timeouts</b></font><br>
* <span style="font-size: 120%;"><b>Timeouts</b></span><br>
* There are several Wait ... keywords that take <b>timeout</b> as an argument.
* All of these timeout arguments are optional. The timeout used by all of them
* can be set globally using the `Set Selenium Timeout keyword`.<br>
Expand All @@ -206,12 +209,12 @@
* "http://robotframework.googlecode.com/svn/trunk/doc/userguide/RobotFrameworkUserGuide.html#time-format"
* >Time Format</a> for details about the time syntax.<br>
* <br>
* <font size="+1"><b>Log Level</b></font><br>
* <span style="font-size: 120%;"><b>Log Level</b></span><br>
* There are several keywords that take <b>timeout</b> as an argument. All of
* these timeout arguments are optional. The default is usually INFO.<br>
* <br>
* List of log levels:
* <table border="1" cellspacing="0">
* <table border="1" cellspacing="0" summary="">
* <tr>
* <td><b>Log Level</b></td>
* <td><b>Description</b></td>
Expand Down Expand Up @@ -307,7 +310,7 @@ public Selenium2Library(String timeout, String implicitWait) {
* about this functionality.<br>
* <br>
* Examples:
* <table border="1" cellspacing="0">
* <table border="1" cellspacing="0" summary="">
* <tr>
* <td>Library</td>
* <td>Selenium2Library</td>
Expand Down Expand Up @@ -356,7 +359,7 @@ public Selenium2Library(String timeout, String implicitWait) {
* Default=5.0. Optional custom timeout.
* @param implicitWait
* Default=0.0. Optional custom implicit wait time.
* @param runOnFailure
* @param keywordToRunOnFailure
* Default=Capture Page Screenshot. Optional custom keyword to
* run on failure.
*/
Expand Down Expand Up @@ -509,6 +512,12 @@ public String getKeywordDocumentation(String keywordName) {
return keywordDocumentation;
}

/**
* Returns the currently active Selenium2Library instance.
*
* @return the library instance
* @throws ScriptException - if error occurs in script
*/
public static Selenium2Library getLibraryInstance() throws ScriptException {
ScriptEngine engine = new ScriptEngineManager().getEngineByName("python");
engine.put("library", "Selenium2Library");
Expand All @@ -523,6 +532,10 @@ public static Selenium2Library getLibraryInstance() throws ScriptException {

/**
* Convert all arguments in the object array to string
*
* @param args
* array with object to convert to the return string
* @return the return string
*/
protected Object[] toStrings(Object[] args) {
Object[] newArgs = new Object[args.length];
Expand Down
Expand Up @@ -128,7 +128,7 @@ public void addLocationStrategy(String strategyName, String functionDefinition)
* locator in multiple arguments when executing the JavaScript function. <br>
* <br>
* Example:
* <table border="1" cellspacing="0">
* <table border="1" cellspacing="0" summary="">
* <tr>
* <td>Add Location Strategy</td>
* <td>byId</td>
Expand All @@ -142,7 +142,7 @@ public void addLocationStrategy(String strategyName, String functionDefinition)
* </table>
* <br>
* Example with delimiter:
* <table border="1" cellspacing="0">
* <table border="1" cellspacing="0" summary="">
* <tr>
* <td>Add Location Strategy</td>
* <td>byClassname</td>
Expand Down Expand Up @@ -215,7 +215,7 @@ public String openBrowser(String url, String browserName, String alias, String r
* Opens a new browser instance to given URL.<br>
* <br>
* Possible values for browser are as follows:
* <table border="1" cellspacing="0">
* <table border="1" cellspacing="0" summary="">
* <tr>
* <td>firefox</td>
* <td>FireFox</td>
Expand Down Expand Up @@ -288,14 +288,14 @@ public String openBrowser(String url, String browserName, String alias, String r
* proxy, can be configured.<br>
* <br>
* Example of desiredCapabilities as simple string:<br>
* <table border="1" cellspacing="0">
* <table border="1" cellspacing="0" summary="">
* <tr>
* <td>platform:Windows 8,browserName:firefox,version:25</td>
* </tr>
* </table>
* <br>
* Example of desiredCapabilities as JSON object:<br>
* <table border="1" cellspacing="0">
* <table border="1" cellspacing="0" summary="">
* <tr>
* <td>
* {<br>
Expand All @@ -318,7 +318,7 @@ public String openBrowser(String url, String browserName, String alias, String r
* with the listed options are implemented.<br>
* <br>
* Firefox:
* <table border="1" cellspacing="0">
* <table border="1" cellspacing="0" summary="">
* <tr>
* <td>
* {<br>
Expand Down Expand Up @@ -355,7 +355,7 @@ public String openBrowser(String url, String browserName, String alias, String r
* instance. The alias can be used later for switching between
* browsers instances, just as returned index.
* @param remoteUrl
* Default=NONE. Optional remote grid URL. When specified no
* Default=False. Optional remote grid URL. When specified no
* local WebDriver instance is created, but a network connection
* to a Selenium 2 WebDriver Grid Hub at the given URL is opened.
* @param desiredCapabilities
Expand All @@ -367,7 +367,10 @@ public String openBrowser(String url, String browserName, String alias, String r
* href=
* "http://code.google.com/p/selenium/wiki/DesiredCapabilities"
* >DesiredCapabilities</a>
* @param browserOptions
* Default=NONE. Extended browser options as JSON structure.
* @return The index of the newly created browser instance.
* @throws Throwable - if anything goes wrong
*
* @see BrowserManagement#closeAllBrowsers
* @see BrowserManagement#closeBrowser
Expand Down Expand Up @@ -412,7 +415,7 @@ public String openBrowser(String url, String browserName, String alias, String r
* it.<br>
* <br>
* Example:
* <table border="1" cellspacing="0">
* <table border="1" cellspacing="0" summary="">
* <tr>
* <td>Open Browser</td>
* <td>http://google.com</td>
Expand Down Expand Up @@ -473,7 +476,7 @@ public String openBrowser(String url, String browserName, String alias, String r
* opening the first one because it used index '1' when switching to it
* later. If you aren't sure about that you can store the index into a
* variable as below.
* <table border="1" cellspacing="0">
* <table border="1" cellspacing="0" summary="">
* <tr>
* <td>${id} =</td>
* <td>Open Browser</td>
Expand Down Expand Up @@ -589,7 +592,7 @@ public void maximizeBrowserWindow() {
* Returns current window size as <b>width</b> then <b>height</b>.<br>
* <br>
* Example:
* <table border="1" cellspacing="0">
* <table border="1" cellspacing="0" summary="">
* <tr>
* <td>${width}</td>
* <td>${height}=</td>
Expand All @@ -609,7 +612,7 @@ public Object[] getWindowSize() {
* specified values.<br>
* <br>
* Example:
* <table border="1" cellspacing="0">
* <table border="1" cellspacing="0" summary="">
* <tr>
* <td>Set Window Size</td>
* <td>800</td>
Expand Down Expand Up @@ -681,7 +684,7 @@ public void selectWindow() {
* The special locator main (default) can be used to select the main window.<br>
* <br>
* Example:
* <table border="1" cellspacing="0">
* <table border="1" cellspacing="0" summary="">
* <tr>
* <td>Click Link</td>
* <td>popup_link</td>
Expand All @@ -707,7 +710,7 @@ public void selectWindow() {
* It is also possible to specify the approach Selenium2Library should take
* to find a window by specifying a locator strategy. See `Introduction` for
* details about locators:
* <table border="1" cellspacing="0">
* <table border="1" cellspacing="0" summary="">
* <tr>
* <td><b>Strategy</b></td>
* <td><b>Example</b></td>
Expand Down Expand Up @@ -1045,7 +1048,7 @@ public String getSeleniumTimeout() {
* can be altered in importing the library.<br>
* <br>
* Example:
* <table border="1" cellspacing="0">
* <table border="1" cellspacing="0" summary="">
* <tr>
* <td>${orig timeout} =</td>
* <td>Set Selenium Timeout</td>
Expand Down Expand Up @@ -1104,7 +1107,7 @@ public String getSeleniumImplicitWait() {
* to be called one time per session.</i><br>
* <br>
* Example:
* <table border="1" cellspacing="0">
* <table border="1" cellspacing="0" summary="">
* <tr>
* <td>${orig wait} =</td>
* <td>Set Selenium Implicit Wait</td>
Expand Down Expand Up @@ -1151,7 +1154,7 @@ public String setSeleniumImplicitWait(String timestr) {
* to be called one time per session.</i><br>
* <br>
* Example:
* <table border="1" cellspacing="0">
* <table border="1" cellspacing="0" summary="">
* <tr>
* <td>${orig wait} =</td>
* <td>Set Browser Implicit Wait</td>
Expand Down
Expand Up @@ -371,7 +371,7 @@ protected void pageShouldNotContainElement(String locator, String tag, String me
* expression. The identifier expires when the page is reloaded.<br>
* <br>
* Example:
* <table border="1" cellspacing="0">
* <table border="1" cellspacing="0" summary="">
* <tr>
* <td>Assign ID to Element</td>
* <td>xpath=//div[@id=\"first_div\"]</td>
Expand Down Expand Up @@ -949,7 +949,7 @@ public void focus(String locator) {
* for details about locators.<br>
* <br>
* Example:
* <table border="1" cellspacing="0">
* <table border="1" cellspacing="0" summary="">
* <tr>
* <td>Drag And Drop</td>
* <td>elem1</td>
Expand Down Expand Up @@ -985,7 +985,7 @@ public void dragAndDrop(String source, String target) {
* for details about locators.<br>
* <br>
* Example:
* <table border="1" cellspacing="0">
* <table border="1" cellspacing="0" summary="">
* <tr>
* <td>Drag And Drop By Offset</td>
* <td>elem1</td>
Expand Down Expand Up @@ -1175,7 +1175,7 @@ public void simulate(String locator, String event) {
* for details about locators.<br>
* <br>
* Example:
* <table border="1" cellspacing="0">
* <table border="1" cellspacing="0" summary="">
* <tr>
* <td>Press Key</td>
* <td>text_field</td>
Expand Down
Expand Up @@ -311,7 +311,7 @@ public void radioButtonShouldNotBeSelected(String groupName) {
* <b>groupName</b> to <b>value</b>.<br>
* <br>
* Example:
* <table border="1" cellspacing="0">
* <table border="1" cellspacing="0" summary="">
* <tr>
* <td>Select Radio Button</td>
* <td>size</td>
Expand Down Expand Up @@ -352,7 +352,7 @@ public void selectRadioButton(String groupName, String value) {
* Selenium Server is running.<br>
* <br>
* Example:
* <table border="1" cellspacing="0">
* <table border="1" cellspacing="0" summary="">
* <tr>
* <td>Choose File</td>
* <td>my_upload_field</td>
Expand Down
Expand Up @@ -131,7 +131,7 @@ public void chooseOkOnConfirmation() {
* called before the action that causes the confirmation dialog to be shown.<br>
* <br>
* Example:
* <table border="1" cellspacing="0">
* <table border="1" cellspacing="0" summary="">
* <tr>
* <td>Click Button</td>
* <td>Send</td>
Expand Down Expand Up @@ -207,7 +207,7 @@ public String confirmAction() {
* <i>window.document.getElementById('foo')</i>.<br>
* <br>
* Example:
* <table border="1" cellspacing="0">
* <table border="1" cellspacing="0" summary="">
* <tr>
* <td>Execute JavaScript</td>
* <td>return window.my_js_function('arg1', 'arg2');</td>
Expand Down Expand Up @@ -250,7 +250,7 @@ public Object executeJavascript(String... code) {
* <i>window.document.getElementById('foo')</i>.<br>
* <br>
* Example:
* <table border="1" cellspacing="0">
* <table border="1" cellspacing="0" summary="">
* <tr>
* <td>Execute Async JavaScript</td>
* <td>return window.my_js_function('arg1', 'arg2');</td>
Expand Down

0 comments on commit ef12bbf

Please sign in to comment.