Skip to content

Commit

Permalink
fix some typos, mostly in Java code (#9964)
Browse files Browse the repository at this point in the history
  • Loading branch information
asolntsev authored Oct 21, 2021
1 parent 2d199e1 commit d594da2
Show file tree
Hide file tree
Showing 57 changed files with 102 additions and 103 deletions.
2 changes: 1 addition & 1 deletion common/src/web/rc/tests/TestCssLocators.html
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@
</tr>

<!--css3 selector test-->
<!--attribuite test-->
<!--attribute test-->
<tr>
<td>verifyText</td>
<td>css=a[name^="foo"]</td>
Expand Down
2 changes: 1 addition & 1 deletion common/src/web/rc/tests/TestJavascriptParameters.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
<td>25 * 25 = 625</td>
</tr>

<!-- Demonstrate interation between variable substitution and javascript -->
<!-- Demonstrate interaction between variable substitution and javascript -->
<tr>
<td>store</td>
<td>the value</td>
Expand Down
4 changes: 2 additions & 2 deletions common/src/web/readOnlyPage.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<input id="readOnlyTextInput" type="text" readonly value="Test"/>

<input id="textInputnotenabled" type="text" disabled="true" value="Test"/>
<input id="textInputNotEnabled" type="text" disabled="true" value="Test"/>

<textarea id="writableTextArea" rows="2" cols="20">
This is a sample text area which is supposed to be cleared
Expand All @@ -13,7 +13,7 @@
<textarea id="textAreaReadOnly" readonly rows="5" cols="20">
text area which is not supposed to be cleared</textarea>

<textarea rows="5" id="textAreaNotenabled" disabled="true" cols="20">
<textarea rows="5" id="textAreaNotEnabled" disabled="true" cols="20">
text area which is not supposed to be cleared</textarea>

<div id="content-editable" contentEditable="true"><h1>This</h1><h2>is a</h2><p>contentEditable area</p></div>
Expand Down
4 changes: 2 additions & 2 deletions dotnet/test/common/ClearTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public void WritableTextInputShouldClear()
public void TextInputShouldNotClearWhenDisabled()
{
driver.Url = readOnlyPage;
IWebElement element = driver.FindElement(By.Id("textInputnotenabled"));
IWebElement element = driver.FindElement(By.Id("textInputNotEnabled"));
Assert.That(element.Enabled, Is.False);
Assert.That(() => element.Clear(), Throws.InstanceOf<InvalidElementStateException>());
}
Expand All @@ -46,7 +46,7 @@ public void WritableTextAreaShouldClear()
public void TextAreaShouldNotClearWhenDisabled()
{
driver.Url = readOnlyPage;
IWebElement element = driver.FindElement(By.Id("textAreaNotenabled"));
IWebElement element = driver.FindElement(By.Id("textAreaNotEnabled"));
Assert.That(() => element.Clear(), Throws.InstanceOf<InvalidElementStateException>());
}

Expand Down
18 changes: 9 additions & 9 deletions java/CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ v4.0.0-rc-2
===========

* Supported CDP versions: 85, 93, 94
* Moved NetworkInterceptor to org.opeqa.selenium.devtools
* Moved NetworkInterceptor to org.openqa.selenium.devtools
* NetworkInterceptor now takes a Filter to allow responses to be
captured and rewritten.
* Added a "relay" option to better support forwarding sessions to
Expand Down Expand Up @@ -77,7 +77,7 @@ v4.0.0-beta-3
(#9273)
* Selenium-created sessions supporting CDP have a `se:cdp` capability,
pointing to the websocket address for CDP communication, and a
`se:cdpVersion` which indictaes the version of the CDP to use.
`se:cdpVersion` which indicates the version of the CDP to use.
* Correctly indicate the Firefox supports CDP v85
* Add support for CDP v90 and v91 and remove support for CDP v86 and
v87.
Expand Down Expand Up @@ -131,7 +131,7 @@ v4.0.0-beta-1
* Relative locators now return elements by proximity to last search
term.
* Refreshed Grid UI
* Legay XPI driver marked as deprecated
* Legacy XPI driver marked as deprecated
* Removed reactor-netty httpclient
* Reworked how custom element locators work. They will try to be
remoted directly, before using a local implementation if remoting
Expand Down Expand Up @@ -169,7 +169,7 @@ v4.0.0-alpha-7
* Add support for listening out for console log events.
* Experimental support for script pinning.
* Support multiple versions of CDP simultaneously.
* Fix getText atom for unicode charater middle of word (#8736)
* Fix getText atom for unicode character middle of word (#8736)
* Include original stack trace when throwing TimeoutException.
* Removed okhttp implementation of the http client.
* Add experimental "reactor" http client.
Expand Down Expand Up @@ -204,7 +204,7 @@ v4.0.0-alpha-6
* Ability to set maximum number of concurrent sessions on a node.
* New reactor-based http client implementation. Set the
`webdriver.http.factory` system property to `reactor` try it out.
* Bumped OpenTelemetry verison to 0.4.0
* Bumped OpenTelemetry version to 0.4.0
* Selenium Standalone and Hub now also accept requests to `/wd/hub`
* Implementing file uploading for distributed grid (and deleting
uploaded files when session is closed)
Expand Down Expand Up @@ -398,7 +398,7 @@ v3.14.0
https://snyk.io/research/zip-slip-vulnerability
* Allow temporary installation of FF extension (#1) (#5751)
* Fix windowSize option in Firefox in Javascript (#6075)
* Make ConnectionType searilize as integer (#6176)
* Make ConnectionType serialize as integer (#6176)
* Pass found elements to the EventListener's afterFind method (#6191)
* Add native events under se:ieOptions. (#6183)

Expand Down Expand Up @@ -569,7 +569,7 @@ v3.6.0

* Remove direct dependency on HTMLUnit and PhantomJS from Maven
artifacts.
* All `*Option` classes now extend `MutableCapbilities`
* All `*Option` classes now extend `MutableCapabilities`
`new RemoteWebDriver(new ChromeOptions());`
* Deprecating constructors that don't take strongly-typed `*Options`.
* Improved exceptions when a `Wait` times out when using a
Expand Down Expand Up @@ -678,7 +678,7 @@ Important note:
* Attempt to kill processes before draining input, error, and output
streams. This should reduce apparent hanging when closing Firefox in
particular.
* Grid will make use of W3C capabilities in prefernce to the JSON Wire
* Grid will make use of W3C capabilities in preference to the JSON Wire
Protocol ones.
* Fixing boolean command line arguments (#3877)

Expand Down Expand Up @@ -996,7 +996,7 @@ WebDriver:
* Fix a NullPointerException in RemoteWebDriver.getCurrentUrl
* Reduces time wasted in when using a native driver
* add the useful information about the session / capabilities in the exception when the 'browser may have died'
* give the cleaner almost double the time to clean up the sessions (a whopping 9 more ms). Hopefull will deflake this test in CI.
* give the cleaner almost double the time to clean up the sessions (a whopping 9 more ms). Hopefully will deflake this test in CI.
* Adding El Capitan (OS X 10.11) to Platform
* Updating IE driver to fix clearing of <input type='number'> fields
* Treat a null response to getCookies as [].
Expand Down
10 changes: 5 additions & 5 deletions java/src/com/thoughtworks/selenium/HttpCommandProcessor.java
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,11 @@ protected int getResponseCode(HttpURLConnection conn) throws IOException {

protected String getCommandResponseAsString(String command) throws IOException {
String responseString = null;
int responsecode = HttpURLConnection.HTTP_MOVED_PERM;
int responseCode = HttpURLConnection.HTTP_MOVED_PERM;
HttpURLConnection uc = null;
Writer wr = null;
Reader rdr = null;
while (responsecode == HttpURLConnection.HTTP_MOVED_PERM) {
while (responseCode == HttpURLConnection.HTTP_MOVED_PERM) {
URL result = new URL(pathToServlet);
String body = buildCommandBody(command);
try {
Expand All @@ -180,10 +180,10 @@ protected String getCommandResponseAsString(String command) throws IOException {
wr = getOutputStreamWriter(uc);
wr.write(body);
wr.flush();
responsecode = getResponseCode(uc);
if (responsecode == HttpURLConnection.HTTP_MOVED_PERM) {
responseCode = getResponseCode(uc);
if (responseCode == HttpURLConnection.HTTP_MOVED_PERM) {
pathToServlet = uc.getHeaderField("Location");
} else if (responsecode != HttpURLConnection.HTTP_OK) {
} else if (responseCode != HttpURLConnection.HTTP_OK) {
throwAssertionFailureExceptionOrError(uc.getResponseMessage() + " URL: " + result);
} else {
rdr = getInputStreamReader(uc);
Expand Down
2 changes: 1 addition & 1 deletion java/src/com/thoughtworks/selenium/Selenium.java
Original file line number Diff line number Diff line change
Expand Up @@ -1704,7 +1704,7 @@ public interface Selenium {
String captureNetworkTraffic(String type);

/**
* Tells the Selenium server to add the specificed key and value as a custom outgoing request
* Tells the Selenium server to add the specified key and value as a custom outgoing request
* header. This only works if the browser is configured to use the built in Selenium proxy.
*
* @param key the header name.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
* <p>
* To complicate matters, local ends may send a session request that is one of
* two different dialects (presumably in the future there may be more. *sigh*)
* and care must be taken to ensure that dialacts match, or that a converter
* and care must be taken to ensure that dialects match, or that a converter
* of some sort is added. The Node may be the part of the system responsible
* for adding this converter.
*/
package org.openqa.selenium.grid.distributor;
package org.openqa.selenium.grid.distributor;
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public class NodeFlags implements HasRoles {
@Parameter(
names = {"--override-max-sessions"},
arity = 1,
description = "The # of available processos is the recommended max sessions value (1 browser "
description = "The # of available processors is the recommended max sessions value (1 browser "
+ "session per processor). Setting this flag to true allows the recommended max "
+ "value to be overwritten. Session stability and reliability might suffer as "
+ "the host could run out of resources.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public Optional<Consumer<Message>> apply(String uri, Consumer<Message> downstrea
return Optional.of(upstream::send);

} catch (NoSuchSessionException e) {
LOG.info("Attempt to connect to non-existant session: " + uri);
LOG.info("Attempt to connect to non-existent session: " + uri);
return Optional.empty();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ public Session get(SessionId id) throws NoSuchSessionException {
Require.nonNull("Session ID", id);

URI uri = null;
Capabilities sterotype = null;
Capabilities stereotype = null;
Capabilities caps = null;
Instant start = null;
String rawUri = null;
Expand Down Expand Up @@ -229,7 +229,7 @@ public Session get(SessionId id) throws NoSuchSessionException {

String rawStereotype = sessions.getString(SESSION_STEREOTYPE_COL);

sterotype = rawStereotype == null ?
stereotype = rawStereotype == null ?
new ImmutableCapabilities() :
JSON.toType(rawStereotype, Capabilities.class);

Expand Down Expand Up @@ -261,7 +261,7 @@ public Session get(SessionId id) throws NoSuchSessionException {
}

span.addEvent("Retrieved session from the database", attributeMap);
return new Session(id, uri, sterotype, caps, start);
return new Session(id, uri, stereotype, caps, start);
} catch (SQLException e) {
span.setAttribute("error", true);
span.setStatus(Status.CANCELLED);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,8 @@ public Session get(SessionId id) throws NoSuchSessionException {
String capabilitiesKey = capabilitiesKey(id);
String rawCapabilities = connection.get(capabilitiesKey);

String sterotypeKey = stereotypeKey(id);
String rawStereotype = connection.get(sterotypeKey);
String stereotypeKey = stereotypeKey(id);
String rawStereotype = connection.get(stereotypeKey);

span.setAttribute(REDIS_CAPABILITIES_KEY, capabilitiesKey);
attributeMap.put(REDIS_CAPABILITIES_KEY, EventAttribute.setValue(capabilitiesKey));
Expand All @@ -180,7 +180,7 @@ public Session get(SessionId id) throws NoSuchSessionException {
new ImmutableCapabilities() :
JSON.toType(rawCapabilities, Capabilities.class);

Capabilities sterotype = rawStereotype == null ?
Capabilities stereotype = rawStereotype == null ?
new ImmutableCapabilities() :
JSON.toType(rawStereotype, Capabilities.class);

Expand All @@ -191,7 +191,7 @@ public Session get(SessionId id) throws NoSuchSessionException {
CAPABILITIES_EVENT.accept(attributeMap, caps);

span.addEvent("Retrieved session from the database", attributeMap);
return new Session(id, uri, sterotype, caps, start);
return new Session(id, uri, stereotype, caps, start);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,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 (IE.is(capabilites)) {
if (IE.is(capabilities)) {
score++;
}

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

Expand Down
6 changes: 3 additions & 3 deletions java/src/org/openqa/selenium/net/Urls.java
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public static URL fromUri(URI uri) {
* {@code docker://localhost:1234} would not generally be a valid {@link URL}
* but would be a correct {@link URI}.
* <p>
* A known limitiation is that URI fragments are not handled. In the
* A known limitation is that URI fragments are not handled. In the
* expected use cases for this method, that is not a problem.
*/
public static URI from(String rawUri) {
Expand All @@ -86,8 +86,8 @@ public static URI from(String rawUri) {
return createHttpUri(rawUri);
}

// Check the characters preceeding the colon. If they're all numbers
// (or there's no preceeding character), we're dealing with a short form
// Check the characters preceding the colon. If they're all numbers
// (or there's no preceding character), we're dealing with a short form
// ip6 address.
if (colonIndex != -1) {
if (colonIndex == 0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public Void call() {
thread and the thread executing commands
All this ugliness would go away if we just handled create and delete of sessions fully
inside ResultConfig because then we could avoid switching threads and there will
not be logevents that do not have a session present
not be log events that do not have a session present
Additionally; if we ever get non-session bound logging here, it will come in
the incorrect order. But that should only happen on create/delete, right ?
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public String expand(String toExpand) {

int lastEnd = 0;
while (matcher.find()) {
// Copy from the last end into the stringbuffer
// Copy from the last end into the string builder
toReturn.append(toExpand, lastEnd, matcher.start());
// Now insert the value
toReturn.append(getValue(matcher.group(1)));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ public String toString() {

/**
* An expectation for checking whether the given frame is available to switch to. <p> If the frame
* is available it switches the given driver to the specified webelement.
* is available it switches the given driver to the specified web element.
*
* @param frameLocator used to find the frame (webelement)
* @return WebDriver instance after frame has been switched
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public void testSetBrowserExecutablePathWithNullPath() {
}

@Test
public void testSetBrowserExcecutablePathWithValidPath() {
public void testSetBrowserExecutablePathWithValidPath() {
String path = "c:\\chrome\\is\\cool.exe with_arg";
BrowserConfigurationOptions bco =
new BrowserConfigurationOptions().setBrowserExecutablePath(path);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ public void testShouldLeaveOtherExceptionAlone() {
new DefaultSelenium(failOnStartCommandProcessor).start();
fail("Did not catch RuntimeException as expected");
} catch (RuntimeException expected) {
/* Catching RuntimeEception as expected */
assertTrue(-1 != expected.getMessage().indexOf("Could not start Selenium session: "));
assertTrue(-1 != expected.getMessage().indexOf("some crazy unexpected exception"));
/* Catching RuntimeException as expected */
assertTrue(expected.getMessage().contains("Could not start Selenium session: "));
assertTrue(expected.getMessage().contains("some crazy unexpected exception"));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public void testCssLocators() {

// css3 selector test

// attribuite test
// attribute test

verifyEquals(selenium.getText("css=a[name^=\"foo\"]"), "foobar");

Expand Down Expand Up @@ -149,7 +149,7 @@ public void testCssLocators() {
}

if (isCapableOfAdvancedSelectors(selenium, isIe)) {
// Versions of firefox prior to 3.5 don't propogate the lang property.
// Versions of firefox prior to 3.5 don't propagate the lang property.
verifyEquals(selenium.getText("css=a:lang(en)"), "this is the first element");

verifyEquals(selenium.getText("css=#linkPseudoTest :link"), "link pseudo test");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public void testJavascriptParameters() {
selenium.type("theText", selenium
.getEval("\n function square(n) {\n return n * n;\n };\n '25 * 25 = ' + square(25);\n "));
verifyTrue(selenium.getValue("theText").matches("^25 [\\s\\S]* 25 = 625$"));
// Demonstrate interation between variable substitution and javascript
// Demonstrate interaction between variable substitution and javascript
String var1 = "the value";
selenium.type("theText", selenium.getEval("'${var1}'.toUpperCase()"));
verifyEquals(selenium.getValue("theText"), "${VAR1}");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
public class TestTable extends InternalSelenseTestBase {
/* See https://github.com/SeleniumHQ/selenium-google-code-issue-archive/issues/2255 */
@Test @Ignore
public void getValueFramTableTwiceInARowShouldWork() {
public void getValueFromTableTwiceInARowShouldWork() {
selenium.open("test_table.html");

String value1 = selenium.getTable("test_table.0.0");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public void testShouldLeaveThingsWellAloneIfNotNeeded() {
}

@Test
public void testShouldAddDeclarationIfNecesssary() {
public void testShouldAddDeclarationIfNecessary() {
StringBuilder builder = new StringBuilder();
declaration.mutate("selenium.browserbot.findElement", builder);

Expand Down
Loading

0 comments on commit d594da2

Please sign in to comment.