Skip to content

Commit

Permalink
[java] Fixing typos in javadoc and parameter names
Browse files Browse the repository at this point in the history
  • Loading branch information
barancev committed Apr 7, 2019
1 parent 0d07868 commit 13fbeac
Show file tree
Hide file tree
Showing 25 changed files with 47 additions and 47 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ public static void assertEquals(String expected, String[] actual) {
* Compares two strings, but handles "regexp:" strings like HTML Selenese
*
* @param expectedPattern expression of expected
* @param actual expresssion of actual
* @param actual expression of actual
* @return true if actual matches the expectedPattern, or false otherwise
*/
public static boolean seleniumEquals(String expectedPattern, String actual) {
Expand Down Expand Up @@ -498,7 +498,7 @@ protected boolean isCaptureScreenShotOnFailure() {
return captureScreenShotOnFailure;
}

protected void setCaptureScreenShotOnFailure(boolean captureScreetShotOnFailure) {
this.captureScreenShotOnFailure = captureScreetShotOnFailure;
protected void setCaptureScreenShotOnFailure(boolean captureScreenShotOnFailure) {
this.captureScreenShotOnFailure = captureScreenShotOnFailure;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -106,14 +106,14 @@ public static class Builder extends DriverService.Builder<
private String whitelistedIps = System.getProperty(CHROME_DRIVER_WHITELISTED_IPS_PROPERTY);

@Override
public int score(Capabilities capabilites) {
public int score(Capabilities capabilities) {
int score = 0;

if (BrowserType.CHROME.equals(capabilites.getBrowserName())) {
if (BrowserType.CHROME.equals(capabilities.getBrowserName())) {
score++;
}

if (capabilites.getCapability(ChromeOptions.CAPABILITY) != null) {
if (capabilities.getCapability(ChromeOptions.CAPABILITY) != null) {
score++;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public ChromeOptions addArguments(String... arguments) {
* </code></pre>
*
* <p>Each argument may contain an option "--" prefix: "--foo" or "foo".
* Arguments with an associated value should be delimitted with an "=":
* Arguments with an associated value should be delimited with an "=":
* "foo=bar".
*
* @param arguments The arguments to use when starting Chrome.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ public static class Builder extends DriverService.Builder<
EdgeDriverService, EdgeDriverService.Builder> {

@Override
public int score(Capabilities capabilites) {
public int score(Capabilities capabilities) {
int score = 0;

if (BrowserType.EDGE.equals(capabilites.getBrowserName())) {
if (BrowserType.EDGE.equals(capabilities.getBrowserName())) {
score++;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ public void waitFor() {
}

/**
* @deprecated DriverSerrice is responsible for process management
* @deprecated DriverService is responsible for process management
*/
@Deprecated
public void waitFor(long timeout) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,19 +133,19 @@ protected boolean isLegacy() {
}

@Override
public int score(Capabilities capabilites) {
if (capabilites.getCapability(FirefoxDriver.MARIONETTE) != null
&& ! capabilites.is(FirefoxDriver.MARIONETTE)) {
public int score(Capabilities capabilities) {
if (capabilities.getCapability(FirefoxDriver.MARIONETTE) != null
&& ! capabilities.is(FirefoxDriver.MARIONETTE)) {
return 0;
}

int score = 0;

if (BrowserType.FIREFOX.equals(capabilites.getBrowserName())) {
if (BrowserType.FIREFOX.equals(capabilities.getBrowserName())) {
score++;
}

if (capabilites.getCapability(FirefoxOptions.FIREFOX_OPTIONS) != null) {
if (capabilities.getCapability(FirefoxOptions.FIREFOX_OPTIONS) != null) {
score++;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -379,18 +379,18 @@ protected boolean isLegacy() {
}

@Override
public int score(Capabilities capabilites) {
if (capabilites.is(FirefoxDriver.MARIONETTE)) {
public int score(Capabilities capabilities) {
if (capabilities.is(FirefoxDriver.MARIONETTE)) {
return 0;
}

int score = 0;

if (capabilites.getCapability(FirefoxDriver.BINARY) != null) {
if (capabilities.getCapability(FirefoxDriver.BINARY) != null) {
score++;
}

if (capabilites.getCapability(FirefoxDriver.PROFILE) != null) {
if (capabilities.getCapability(FirefoxDriver.PROFILE) != null) {
score++;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,14 @@ public static class Builder extends DriverService.Builder<
private Boolean silent = null;

@Override
public int score(Capabilities capabilites) {
public int score(Capabilities capabilities) {
int score = 0;

if (BrowserType.IE.equals(capabilites.getBrowserName())) {
if (BrowserType.IE.equals(capabilities.getBrowserName())) {
score++;
}

if (capabilites.getCapability(InternetExplorerOptions.IE_OPTIONS) != null) {
if (capabilities.getCapability(InternetExplorerOptions.IE_OPTIONS) != null) {
score++;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
/**
* Indicates that the coordinates provided to an interactions operation are invalid. This, most
* likely, means that a move operation was provided with invalid coordinates or that an action that
* depends on mouse position (like click) was not preceeded by a move operation.
* depends on mouse position (like click) was not preceded by a move operation.
*/
public class InvalidCoordinatesException extends WebDriverException {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public interface TouchScreen {
void scroll(Coordinates where, int xOffset, int yOffset);

/**
* Allows the execution of double tapon the screen, analogous to double click using a Mouse.
* Allows the execution of double tap on the screen, analogous to double click using a Mouse.
*
* @param where The coordinates of the element to double tap
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public TouchActions scroll(WebElement onElement, int xOffset, int yOffset) {
}

/**
* Allows the execution of double tapon the screen, analogous to double click using a Mouse.
* Allows the execution of double tap on the screen, analogous to double click using a Mouse.
*
* @param onElement The {@link WebElement} to double tap
* @return self
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ public interface NetworkInterfaceProvider {
Iterable<NetworkInterface> getNetworkInterfaces();

// TODO: Remove this whole method
// This method should only return an iterface if it's named exactly "lo"
// This method should only return an interface if it's named exactly "lo"
NetworkInterface getLoInterface();
}
2 changes: 1 addition & 1 deletion java/client/src/org/openqa/selenium/net/NetworkUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public InetAddress getIp4NonLoopbackAddressOfThisMachine() {

/**
* Returns a single address that is guaranteed to resolve to an ipv4 representation of localhost
* This may either be a hostname or an ip address, dependending if we can guarantee what that the
* This may either be a hostname or an ip address, depending if we can guarantee what that the
* hostname will resolve to ip4.
*
* @return The address part og such an address
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,18 +96,18 @@ public static class Builder extends DriverService.Builder<
private boolean silent = Boolean.getBoolean(OPERA_DRIVER_SILENT_OUTPUT_PROPERTY);

@Override
public int score(Capabilities capabilites) {
public int score(Capabilities capabilities) {
int score = 0;

if (BrowserType.OPERA_BLINK.equals(capabilites.getBrowserName())) {
if (BrowserType.OPERA_BLINK.equals(capabilities.getBrowserName())) {
score++;
}

if (BrowserType.OPERA.equals(capabilites.getBrowserName())) {
if (BrowserType.OPERA.equals(capabilities.getBrowserName())) {
score++;
}

if (capabilites.getCapability(OperaOptions.CAPABILITY) != null) {
if (capabilities.getCapability(OperaOptions.CAPABILITY) != null) {
score++;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public OperaOptions addArguments(String... arguments) {
* </code></pre>
*
* <p>Each argument may contain an option "--" prefix: "--foo" or "foo".
* Arguments with an associated value should be delimitted with an "=":
* Arguments with an associated value should be delimited with an "=":
* "foo=bar".
*
* @param arguments The arguments to use when starting Opera.
Expand Down
2 changes: 1 addition & 1 deletion java/client/src/org/openqa/selenium/remote/ErrorCodes.java
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public class ErrorCodes {
public static final int INVALID_XPATH_SELECTOR_RETURN_TYPER = 52;

// json wire protocol doesn't have analogous status codes for
// these new W3C status repsonse 'codes', so making some up!
// these new W3C status response 'codes', so making some up!
public static final int ELEMENT_NOT_INTERACTABLE = 60;
public static final int INVALID_ARGUMENT = 61;
public static final int NO_SUCH_COOKIE = 62;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
* .addAlternative(new FirefoxOptions())
* .addAlternative(new ChromeOptions())
* .addMetadata("cloud:key", "hunter2")
* .setCapabilitiy("proxy", new Proxy())
* .setCapability("proxy", new Proxy())
* .build();
* </pre>
* In this example, we ask for a session where the browser will be either Firefox or Chrome (we
Expand Down Expand Up @@ -138,7 +138,7 @@ public RemoteWebDriverBuilder addMetadata(String key, Object value) {

/**
* Sets a capability for every single alternative when the session is created. These capabilities
* are only set once the session is created, so this will be set on capabiltiies added via
* are only set once the session is created, so this will be set on capabilities added via
* {@link #addAlternative(Capabilities)} or {@link #oneOf(Capabilities, Capabilities...)} even
* after this method call.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ public static abstract class Builder<DS extends DriverService, B extends Builder
* service directly supports that are unique to the driver service (that is, things like
* "{@code proxy}" don't tend to count to the score).
*/
public abstract int score(Capabilities capabilites);
public abstract int score(Capabilities capabilities);

/**
* Sets which driver executable the builder will use.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
public interface CapabilitiesFilter extends Function<Map<String, Object>, Map<String, Object>> {

/**
* Take a map of capabilties and extract those specific to a browser.
* Take a map of capabilities and extract those specific to a browser.
* @return a {@link Map} of capabilities if any match, or {@code null} otherwise.
*/
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public interface Span extends Closeable {

/**
* Add a piece of metadata to the span, which allows high cardinality data to
* be added to the span. This data will not be propogated to other spans.
* be added to the span. This data will not be propagated to other spans.
*/
Span addTag(String key, Object value);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,20 +82,20 @@ public static class Builder extends DriverService.Builder<
private boolean useTechnologyPreview = false;

@Override
public int score(Capabilities capabilites) {
public int score(Capabilities capabilities) {
int score = 0;

if (BrowserType.SAFARI.equals(capabilites.getBrowserName())) {
if (BrowserType.SAFARI.equals(capabilities.getBrowserName())) {
score++;
} else if ("Safari Technology Preview".equals(capabilites.getBrowserName())) {
} else if ("Safari Technology Preview".equals(capabilities.getBrowserName())) {
score++;
}

if (capabilites.getCapability(SafariOptions.CAPABILITY) != null) {
if (capabilities.getCapability(SafariOptions.CAPABILITY) != null) {
score++;
}

if (capabilites.getCapability("se:safari:techPreview") != null) {
if (capabilities.getCapability("se:safari:techPreview") != null) {
score++;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public SafariOptions merge(Capabilities extraCapabilities) {
}

/**
* Construct a {@link SafariOptions} instance from given capabilites.
* Construct a {@link SafariOptions} instance from given capabilities.
* When the {@link #CAPABILITY} capability is set, all other capabilities will be ignored!
*
* @param capabilities Desired capabilities from which the options are derived.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public DefaultElementLocator(SearchContext searchContext, Field field) {
}

/**
* Use this constructor in order to process custom annotaions.
* Use this constructor in order to process custom annotations.
*
* @param searchContext The context to use when finding the element
* @param annotations AbstractAnnotations class implementation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1438,7 +1438,7 @@ public String toString() {
/**
* An expectation to check if js executable.
*
* Useful whenyou know that there should be a Javascript value or something at the stage.
* Useful when you know that there should be a Javascript value or something at the stage.
*
* @param javaScript used as executable script
* @return true once javaScript executed without errors
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public T get() {

/**
* Check for well known error cases, which would mean that loading has finished, but an error
* condition was seen. If an error has occured throw an Error, possibly by using JUnit's
* condition was seen. If an error has occurred throw an Error, possibly by using JUnit's
* Assert.assert* methods
*
* @throws Error When a well-known error condition has caused the load to fail
Expand Down

0 comments on commit 13fbeac

Please sign in to comment.