Skip to content

Commit d86f056

Browse files
authored
Update README.md
1 parent 9692485 commit d86f056

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

README.md

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ This is the Java language bindings for writing Appium Tests that conform to [Web
99
## v8 to v9 Migration
1010

1111
Since v9 the client only supports Java 11 and above.
12-
Follow the [v8 to v9 Migration Guide](./docs/v8-to-v9-migration-guide.md) in order to streamline the migration process.
12+
Follow the [v8 to v9 Migration Guide](./docs/v8-to-v9-migration-guide.md) to streamline the migration process.
1313

1414
## v7 to v8 Migration
1515

1616
Since version 8 Appium Java Client had several major changes, which might require to
1717
update your client code. Make sure to follow the [v7 to v8 Migration Guide](./docs/v7-to-v8-migration-guide.md)
18-
in order to streamline the migration process.
18+
to streamline the migration process.
1919

2020
## Add Appium java client to your test framework
2121

@@ -46,7 +46,7 @@ dependencies {
4646

4747
### Beta/Snapshots
4848

49-
Java client project is available to use even before it is officially published to maven central. Refer [jitpack.io](https://jitpack.io/#appium/java-client)
49+
Java client project is available to use even before it is officially published to Maven Central. Refer [jitpack.io](https://jitpack.io/#appium/java-client)
5050

5151
#### Maven
5252

@@ -73,7 +73,7 @@ Add the dependency:
7373

7474
#### Gradle
7575

76-
Add the JitPack repository to your build file. Add it in your root build.gradle at the end of repositories:
76+
Add the JitPack repository to your build file. Add it to your root build.gradle at the end of repositories:
7777

7878
```groovy
7979
allprojects {
@@ -107,11 +107,11 @@ dependencies {
107107
#### Why is it so complicated?
108108

109109
Selenium client does not follow [Semantic Versioning](https://semver.org/), so breaking changes might be introduced
110-
even in patches, which requires Appium team to update Java client in response.
110+
even in patches, which requires the Appium team to update the Java client in response.
111111

112112
#### How to pin Selenium dependencies?
113113

114-
Appium Java Client declares Selenium dependencies using open version range which is handled in differently by different
114+
Appium Java Client declares Selenium dependencies using an open version range which is handled differently by different
115115
build tools. Sometimes users may want to pin used Selenium dependencies for [various reasons](https://github.com/appium/java-client/issues/1823).
116116
Follow the [Transitive Dependencies Management article](docs/transitive-dependencies-management.md) for more information
117117
about establishing a fixed Selenium version for your Java test framework.
@@ -130,10 +130,10 @@ Appium java client has dedicated classes to support the following Appium drivers
130130
To automate other platforms that are not listed above you could use
131131
[AppiumDriver](src/main/java/io/appium/java_client/AppiumDriver.java) or its custom derivatives.
132132

133-
Appium java client is built on top of Selenium and implements same interfaces that the foundation
133+
Appium java client is built on top of Selenium and implements the same interfaces that the foundation
134134
[RemoteWebDriver](https://github.com/SeleniumHQ/selenium/blob/trunk/java/src/org/openqa/selenium/remote/RemoteWebDriver.java)
135-
does. However, Selenium lib is mostly focused on web browsers automation while
136-
Appium is universal and covers wide range of possible platforms, e.g. mobile and desktop
135+
does. However, Selenium lib is mostly focused on web browser automation while
136+
Appium is universal and covers a wide range of possible platforms, e.g. mobile and desktop
137137
operating systems, IOT devices, etc. Thus, the foundation `AppiumDriver` class in this package
138138
extends `RemoteWebDriver` with additional features, and makes it more flexible, so it is not so
139139
strictly focused on web-browser related operations.
@@ -161,22 +161,22 @@ using [AppiumServiceBuilder](src/main/java/io/appium/java_client/service/local/A
161161

162162
**Note**
163163

164-
> AppiumDriverLocalService does not support the server management on non-local hosts
164+
> AppiumDriverLocalService does not support server management on non-local hosts
165165
166166
## Usage Examples
167167

168168
### UiAutomator2
169169

170170
```java
171171
UiAutomator2Options options = new UiAutomator2Options()
172-
.setUdid('123456')
172+
.setUdid("123456")
173173
.setApp("/home/myapp.apk");
174174
AndroidDriver driver = new AndroidDriver(
175175
// The default URL in Appium 1 is http://127.0.0.1:4723/wd/hub
176176
new URL("http://127.0.0.1:4723"), options
177177
);
178178
try {
179-
WebElement el = driver.findElement(AppiumBy.xpath, "//Button");
179+
WebElement el = driver.findElement(AppiumBy.xpath("//Button"));
180180
el.click();
181181
driver.getPageSource();
182182
} finally {
@@ -188,14 +188,14 @@ try {
188188

189189
```java
190190
XCUITestOptions options = new XCUITestOptions()
191-
.setUdid('123456')
191+
.setUdid("123456")
192192
.setApp("/home/myapp.ipa");
193193
IOSDriver driver = new IOSDriver(
194194
// The default URL in Appium 1 is http://127.0.0.1:4723/wd/hub
195195
new URL("http://127.0.0.1:4723"), options
196196
);
197197
try {
198-
WebElement el = driver.findElement(AppiumBy.accessibilityId, "myId");
198+
WebElement el = driver.findElement(AppiumBy.accessibilityId("myId"));
199199
el.click();
200200
driver.getPageSource();
201201
} finally {
@@ -216,7 +216,7 @@ AppiumDriver driver = new AppiumDriver(
216216
new URL("http://127.0.0.1:4723"), options
217217
);
218218
try {
219-
WebElement el = driver.findElement(AppiumBy.className, "myClass");
219+
WebElement el = driver.findElement(AppiumBy.className("myClass"));
220220
el.click();
221221
driver.getPageSource();
222222
} finally {
@@ -226,32 +226,32 @@ try {
226226

227227
Check the corresponding driver's READMEs to know the list of capabilities and features it supports.
228228

229-
You could find much more code examples by checking client's
229+
You can find many more code examples by checking client's
230230
[unit and integration tests](src/test/java/io/appium/java_client).
231231

232232
## Troubleshooting
233233

234234
### InaccessibleObjectException is thrown in runtime if Java 16+ is used
235235

236236
Appium Java client uses reflective access to private members of other modules
237-
to ensure proper functionality of several features, like Page Object model.
237+
to ensure proper functionality of several features, like the Page Object model.
238238
If you get a runtime exception and `InaccessibleObjectException` is present in
239-
the stacktrace, and your Java runtime is at version 16 or higher, then consider following
239+
the stack trace and your Java runtime is at version 16 or higher, then consider the following
240240
[Oracle's tutorial](https://docs.oracle.com/en/java/javase/16/migrate/migrating-jdk-8-later-jdk-releases.html#GUID-7BB28E4D-99B3-4078-BDC4-FC24180CE82B)
241241
and/or checking [existing issues](https://github.com/appium/java-client/search?q=InaccessibleObjectException&type=issues)
242-
for possible solutions. Basically, the idea there would be to explicitly allow
242+
for possible solutions. The idea there would be to explicitly allow
243243
access for particular modules using `--add-exports/--add-opens` command line arguments.
244244

245245
Another possible, but weakly advised solution, would be to downgrade Java to
246246
version 15 or lower.
247247

248-
### Issues related to environment variables presence or to their values
248+
### Issues related to environment variables' presence or to their values
249249

250-
Such issues are usually the case when Appium server is started directly from your
250+
Such issues are usually the case when the Appium server is started directly from your
251251
framework code rather than run separately by a script or manually. Depending
252252
on the way the server process is started it may or may not inherit the currently
253-
active shell environment. That is why you may still receive errors about variables
254-
presence even though these variables ar actually defined for your command line interpreter.
253+
active shell environment. That is why you may still receive errors about the variables'
254+
presence even though these variables are defined for your command line interpreter.
255255
Again, there is no universal solution to that, as there are many ways to spin up a new
256256
server process. Consider checking the [Appium Environment Troubleshooting](docs/environment.md)
257257
document for more information on how to debug and fix process environment issues.

0 commit comments

Comments
 (0)