Skip to content

Commit 50fa862

Browse files
authored
Add missing JavaDoc (#289)
1 parent 13a21d5 commit 50fa862

File tree

129 files changed

+2617
-208
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

129 files changed

+2617
-208
lines changed

docs/ConfiguringProjectSettings.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ The **`HUB_HOST`** setting specifies the URL of the **Selenium Grid** hub server
8383
8484
> If this setting is left undefined or specifies an inactive `localhost` URL, **Selenium Foundation** will automatically launch a local Grid instance as specified by the [local Grid configuration](LocalGridConfiguration.md).
8585
86-
The **`GRID_PLUGINS`** setting specifies a semicolon-delimited list of fully-qualified names of local **Selenium Grid** driver plugin classes.
86+
The **`GRID_PLUGINS`** setting specifies a semicolon-delimited list of fully-qualified names of local **Selenium Grid** driver plug-in classes.
8787

8888
**NOTE**: Defining a value for this setting overrides the **ServiceLoader** specification defined by the associated provider configuration file (_com.nordstrom.automation.selenium.DriverPlugin_).
8989

@@ -99,7 +99,7 @@ The **`GRID_PLUGINS`** setting specifies a semicolon-delimited list of fully-qua
9999
100100
#### Grid Configuration for Selenium Foundation unit tests
101101

102-
By default, the unit tests are [configured](LocalGridConfiguration.md) to run the "support" tests, which don't require browser sessions. The local Grid instance launched for this configuration runs in "servlet container" mode. The Gradle project file defines a set of profiles, one for each supported browser, which specify the corresponding dependencies, settings, and driver plugin needed to run the unit tests for that browser.
102+
By default, the unit tests are [configured](LocalGridConfiguration.md) to run the "support" tests, which don't require browser sessions. The local Grid instance launched for this configuration runs in "servlet container" mode. The Gradle project file defines a set of profiles, one for each supported browser, which specify the corresponding dependencies, settings, and driver plug-in needed to run the unit tests for that browser.
103103

104104
| Profile | Browser / Appium Engine |
105105
| --- |:---:|

docs/LocalGridConfiguration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ In addition to declaring driver plug-ins in the **ServiceLoader** provider confi
4444

4545
### Driver Plug-Ins for Desktop Browsers and Appium Engines
4646

47-
Driver plug-ins encapsulate the specific details related to launching **Selenium Grid** nodes that support the corresponding drivers. **Selenium Foundation** provides [driver plugin-ins](ConfiguringProjectSettings.md#desktop-browser-support) for all of the major browsers. It also provides plug-ins for all of the major [automation engines](ConfiguringProjectSettings.md#appium-automation-engine-support) of the `Appium` project.
47+
Driver plug-ins encapsulate the specific details related to launching **Selenium Grid** nodes that support the corresponding drivers. **Selenium Foundation** provides [driver plug-ins](ConfiguringProjectSettings.md#desktop-browser-support) for all of the major browsers. It also provides plug-ins for all of the major [automation engines](ConfiguringProjectSettings.md#appium-automation-engine-support) of the `Appium` project.
4848

4949
#### Drivers for Desktop Browsers
5050

src/main/java/com/nordstrom/automation/selenium/AbstractSeleniumConfig.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ public abstract class AbstractSeleniumConfig extends
5454

5555
private static final String SETTINGS_FILE = "settings.properties";
5656

57+
/** suffix for node configuration modifier files */
5758
protected static final String NODE_MODS_SUFFIX = ".node.mods";
5859
private static final String CAPS_MODS_SUFFIX = ".caps.mods";
5960

@@ -116,7 +117,7 @@ public enum SeleniumSettings implements SettingsCore.SettingsAPI {
116117

117118
/**
118119
* This setting specifies a path-delimited list of fully-qualified names of local <b>Selenium Grid</b> driver
119-
* plugin classes.
120+
* plug-in classes.
120121
* <p>
121122
* <b>NOTE</b>: Defining a value for this setting overrides the <b>ServiceLoader</b> specification defined
122123
* by the associated provider configuration file (<i>com.nordstrom.automation.selenium.DriverPlugin</i>).
@@ -522,6 +523,7 @@ public SearchContextWait getWait(final SearchContext context) {
522523

523524
}
524525

526+
/** singleton instance of concrete version-specific configuration */
525527
protected static SeleniumConfig seleniumConfig;
526528

527529
private URI targetUri;
@@ -530,6 +532,12 @@ public SearchContextWait getWait(final SearchContext context) {
530532
private URL hubUrl;
531533
private SeleniumGrid seleniumGrid;
532534

535+
/**
536+
* Instantiate a configuration object for the specified enumeration class.
537+
*
538+
* @throws ConfigurationException if a failure is encountered while initializing this configuration object
539+
* @throws IOException if a failure is encountered while reading from a configuration input stream
540+
*/
533541
public AbstractSeleniumConfig() throws ConfigurationException, IOException {
534542
super(SeleniumSettings.class);
535543
}

src/main/java/com/nordstrom/automation/selenium/DriverPlugin.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
import com.nordstrom.automation.selenium.core.LocalSeleniumGrid.LocalGridServer;
1818
import net.bytebuddy.implementation.Implementation;
1919

20+
/**
21+
* This interface defines the contract for driver plug-in objects.
22+
*/
2023
public interface DriverPlugin {
2124

2225
/**

src/main/java/com/nordstrom/automation/selenium/core/GridUtility.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ private static <T extends RemoteWebDriver> Constructor<T> getRemoteWebDriverCtor
380380
* Get instances of all configured driver plugins.
381381
*
382382
* @param config {@link SeleniumConfig} object
383-
* @return list of driver plugin instances
383+
* @return list of driver plug-in instances
384384
*/
385385
public static List<DriverPlugin> getDriverPlugins(SeleniumConfig config) {
386386
List<DriverPlugin> driverPlugins = new ArrayList<>();
@@ -389,29 +389,29 @@ public static List<DriverPlugin> getDriverPlugins(SeleniumConfig config) {
389389
String gridPlugins = config.getString(SeleniumSettings.GRID_PLUGINS.key());
390390
// if setting is defined and not empty
391391
if ( ! (gridPlugins == null || gridPlugins.trim().isEmpty())) {
392-
// iterate specified driver plugin class names
392+
// iterate specified driver plug-in class names
393393
for (String driverPlugin : gridPlugins.split(File.pathSeparator)) {
394394
String className = driverPlugin.trim();
395395
try {
396-
// load driver plugin class
396+
// load driver plug-in class
397397
Class<?> pluginClass = Class.forName(className);
398398
// get no-argument constructor
399399
Constructor<?> ctor = pluginClass.getConstructor();
400400
// add instance to plugins list
401401
driverPlugins.add((DriverPlugin) ctor.newInstance());
402402
} catch (ClassNotFoundException e) {
403-
throw new ServiceConfigurationError("Specified driver plugin '" + className + "' not found", e);
403+
throw new ServiceConfigurationError("Specified driver plug-in '" + className + "' not found", e);
404404
} catch (ClassCastException e) {
405-
throw new ServiceConfigurationError("Specified driver plugin '" + className
405+
throw new ServiceConfigurationError("Specified driver plug-in '" + className
406406
+ "' is not a subclass of DriverPlugin", e);
407407
} catch (NoSuchMethodException | SecurityException e) {
408-
throw new ServiceConfigurationError("Specified driver plugin '" + className
408+
throw new ServiceConfigurationError("Specified driver plug-in '" + className
409409
+ "' lacks an accessible no-argument constructor", e);
410410
} catch (InstantiationException | IllegalAccessException | IllegalArgumentException e) {
411-
throw new ServiceConfigurationError("Specified driver plugin '" + className
411+
throw new ServiceConfigurationError("Specified driver plug-in '" + className
412412
+ "' could not be instantiated", e);
413413
} catch (InvocationTargetException e) {
414-
throw new ServiceConfigurationError("Constructor for driver plugin '" + className
414+
throw new ServiceConfigurationError("Constructor for driver plug-in '" + className
415415
+ "' threw an exception", e.getTargetException());
416416
}
417417
}

src/main/java/com/nordstrom/automation/selenium/core/SeleniumGrid.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,14 @@ public Thread newThread(Runnable r) {
7171

7272
private GridServer hubServer;
7373
private Map<URL, GridServer> nodeServers = new HashMap<>();
74-
protected Map<String, String> personalities = new HashMap<>();
7574

75+
/** "personalities" supported by this Grid instance */
76+
protected Map<String, String> personalities = new HashMap<>();
77+
/** SLF4J logger for this Selenium Grid model */
7678
protected static final Logger LOGGER = LoggerFactory.getLogger(SeleniumGrid.class);
7779

7880
/**
79-
* Constructor for Selenium Grid from hub URL.
81+
* Constructor for models of Selenium Grid instances from hub URL.
8082
* <p>
8183
* This is used to create an interface for an active grid - remote or local.
8284
*

0 commit comments

Comments
 (0)