Skip to content

Commit a24f657

Browse files
Github workflow fixes
1 parent b6aee49 commit a24f657

File tree

1 file changed

+20
-35
lines changed

1 file changed

+20
-35
lines changed

src/main/java/io/appium/java_client/AppiumBy.java

+20-35
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@
2929

3030
public abstract class AppiumBy extends By implements Remotable {
3131

32-
@Getter
33-
private final Parameters remoteParameters;
32+
@Getter private final Parameters remoteParameters;
3433
private final String locatorName;
3534

3635
protected AppiumBy(String selector, String locatorString, String locatorName) {
@@ -39,28 +38,24 @@ protected AppiumBy(String selector, String locatorString, String locatorName) {
3938
this.locatorName = locatorName;
4039
}
4140

42-
@Override
43-
public List<WebElement> findElements(SearchContext context) {
41+
@Override public List<WebElement> findElements(SearchContext context) {
4442
return context.findElements(this);
4543
}
4644

47-
@Override
48-
public WebElement findElement(SearchContext context) {
45+
@Override public WebElement findElement(SearchContext context) {
4946
return context.findElement(this);
5047
}
5148

52-
@Override
53-
public String toString() {
49+
@Override public String toString() {
5450
return String.format("%s.%s: %s", AppiumBy.class.getSimpleName(), locatorName, remoteParameters.value());
5551
}
5652

5753
/**
5854
* About Android accessibility
59-
* <a href="https://developer.android.com/intl/ru/training/accessibility/accessible-app.html">https://developer.android.com/intl/ru/training/accessibility/accessible-app.html</a>
55+
* https://developer.android.com/intl/ru/training/accessibility/accessible-app.html
6056
* About iOS accessibility
61-
* <a href="https://developer.apple.com/library/ios/documentation/UIKit/Reference/">https://developer.apple.com/library/ios/documentation/UIKit/Reference/</a>
57+
* https://developer.apple.com/library/ios/documentation/UIKit/Reference/
6258
* UIAccessibilityIdentification_Protocol/index.html
63-
*
6459
* @param accessibilityId id is a convenient UI automation accessibility Id.
6560
* @return an instance of {@link AppiumBy.ByAndroidUIAutomator}
6661
*/
@@ -70,19 +65,17 @@ public static By accessibilityId(final String accessibilityId) {
7065

7166
/**
7267
* This locator strategy is only available in Espresso Driver mode.
73-
*
7468
* @param dataMatcherString is a valid json string detailing hamcrest matcher for Espresso onData().
75-
* See <a href="http://appium.io/docs/en/writing-running-appium/android/espresso-datamatcher-selector/">
76-
* the documentation</a> for more details.
69+
* See <a href="http://appium.io/docs/en/writing-running-appium/android/espresso-datamatcher-selector/">
70+
* the documentation</a> for more details
7771
* @return an instance of {@link AppiumBy.ByAndroidDataMatcher}
7872
*/
7973
public static By androidDataMatcher(final String dataMatcherString) {
8074
return new ByAndroidDataMatcher(dataMatcherString);
8175
}
8276

8377
/**
84-
* Refer to <a href="https://developer.android.com/training/testing/ui-automator">https://developer.android.com/training/testing/ui-automator</a>
85-
*
78+
* Refer to https://developer.android.com/training/testing/ui-automator
8679
* @param uiautomatorText is Android UIAutomator string
8780
* @return an instance of {@link AppiumBy.ByAndroidUIAutomator}
8881
*/
@@ -92,10 +85,9 @@ public static By androidUIAutomator(final String uiautomatorText) {
9285

9386
/**
9487
* This locator strategy is only available in Espresso Driver mode.
95-
*
9688
* @param viewMatcherString is a valid json string detailing hamcrest matcher for Espresso onView().
97-
* See <a href="http://appium.io/docs/en/writing-running-appium/android/espresso-datamatcher-selector/">
98-
* the documentation</a> for more details
89+
* See <a href="http://appium.io/docs/en/writing-running-appium/android/espresso-datamatcher-selector/">
90+
* the documentation</a> for more details
9991
* @return an instance of {@link AppiumBy.ByAndroidViewMatcher}
10092
*/
10193
public static By androidViewMatcher(final String viewMatcherString) {
@@ -104,10 +96,9 @@ public static By androidViewMatcher(final String viewMatcherString) {
10496

10597
/**
10698
* This locator strategy is available in Espresso Driver mode.
107-
*
99+
* @since Appium 1.8.2 beta
108100
* @param tag is a view tag string
109101
* @return an instance of {@link ByAndroidViewTag}
110-
* @since Appium 1.8.2 beta
111102
*/
112103
public static By androidViewTag(final String tag) {
113104
return new ByAndroidViewTag(tag);
@@ -116,7 +107,6 @@ public static By androidViewTag(final String tag) {
116107
/**
117108
* For IOS it is the full name of the XCUI element and begins with XCUIElementType.
118109
* For Android it is the full name of the UIAutomator2 class (e.g.: android.widget.TextView)
119-
*
120110
* @param selector the class name of the element
121111
* @return an instance of {@link ByClassName}
122112
*/
@@ -127,7 +117,6 @@ public static By className(final String selector) {
127117
/**
128118
* For IOS the element name.
129119
* For Android it is the resource identifier.
130-
*
131120
* @param selector element id
132121
* @return an instance of {@link ById}
133122
*/
@@ -138,7 +127,6 @@ public static By id(final String selector) {
138127
/**
139128
* For IOS the element name.
140129
* For Android it is the resource identifier.
141-
*
142130
* @param selector element id
143131
* @return an instance of {@link ByName}
144132
*/
@@ -162,25 +150,24 @@ public static By custom(final String selector) {
162150
* This locator strategy is available only if OpenCV libraries and
163151
* Node.js bindings are installed on the server machine.
164152
*
165-
* @param b64Template base64-encoded template image string. Supported image formats are the same
166-
* as for OpenCV library.
167-
* @return an instance of {@link ByImage}
168153
* @see <a href="https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/image-comparison.md">
169-
* The documentation on Image Comparison Features</a>.
154+
* The documentation on Image Comparison Features</a>
170155
* @see <a href="https://github.com/appium/appium-base-driver/blob/master/lib/basedriver/device-settings.js">
171-
* The settings available for lookup fine-tuning</a>.
156+
* The settings available for lookup fine-tuning</a>
172157
* @since Appium 1.8.2
158+
* @param b64Template base64-encoded template image string. Supported image formats are the same
159+
* as for OpenCV library.
160+
* @return an instance of {@link ByImage}
173161
*/
174162
public static By image(final String b64Template) {
175163
return new ByImage(b64Template);
176164
}
177165

178166
/**
179167
* This locator strategy is available in XCUITest Driver mode.
180-
*
181-
* @param iOSClassChainString is a valid class chain locator string
168+
* @param iOSClassChainString is a valid class chain locator string.
182169
* See <a href="https://github.com/facebookarchive/WebDriverAgent/wiki/Class-Chain-Queries-Construction-Rules">
183-
* the documentation</a> for more details.
170+
* the documentation</a> for more details
184171
* @return an instance of {@link AppiumBy.ByIosClassChain}
185172
*/
186173
public static By iOSClassChain(final String iOSClassChainString) {
@@ -189,7 +176,6 @@ public static By iOSClassChain(final String iOSClassChainString) {
189176

190177
/**
191178
* This locator strategy is available in XCUITest Driver mode.
192-
*
193179
* @param iOSNsPredicateString is an iOS NsPredicate String
194180
* @return an instance of {@link AppiumBy.ByIosNsPredicate}
195181
*/
@@ -259,8 +245,7 @@ protected ByImage(String b64Template) {
259245

260246
public static class ByIosClassChain extends AppiumBy implements Serializable {
261247
protected ByIosClassChain(String locatorString) {
262-
super("-ios class chain", locatorString,
263-
"iOSClassChain");
248+
super("-ios class chain", locatorString, "iOSClassChain");
264249
}
265250
}
266251

0 commit comments

Comments
 (0)