Skip to content

Commit 595da74

Browse files
committed
refactor: change prefix to AppiumBy in locator toString implementation
1 parent da8fde2 commit 595da74

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ protected AppiumBy(String selector, String locatorString, String locatorName) {
4848
}
4949

5050
@Override public String toString() {
51-
return String.format("By.%s: %s", locatorName, remoteParameters.value());
51+
return String.format("AppiumBy.%s: %s", locatorName, remoteParameters.value());
5252
}
5353

5454
/**

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,17 @@ public static By iOSNsPredicateString(final String iOSNsPredicateString) {
107107
return new ByIosNsPredicate(iOSNsPredicateString);
108108
}
109109

110+
/**
111+
* The Windows UIAutomation selector.
112+
* @deprecated Use {@link AppiumBy#windowsAutomation(String)} instead.
113+
* @param windowsAutomation The element name in the Windows UIAutomation selector
114+
* @return an instance of {@link MobileBy.ByWindowsAutomation}
115+
*/
116+
@Deprecated
117+
public static By windowsAutomation(final String windowsAutomation) {
118+
return new ByWindowsAutomation(windowsAutomation);
119+
}
120+
110121
/**
111122
* This locator strategy is available in Espresso Driver mode.
112123
* @deprecated Use {@link AppiumBy#androidViewTag(String)} instead.
@@ -269,6 +280,10 @@ public static class ByWindowsAutomation extends AppiumBy.ByWindowsAutomation {
269280
protected ByWindowsAutomation(String locatorString) {
270281
super(locatorString);
271282
}
283+
284+
@Override public String toString() {
285+
return "By.windowsAutomation: " + getRemoteParameters().value();
286+
}
272287
}
273288

274289
/**

0 commit comments

Comments
 (0)