Skip to content

Commit 18eba21

Browse files
saikrishna321SrinivasanTarget
authored andcommitted
deprecate selendroid (#1034)
* deprecate selendroid * fixed review * added detailed deprecated statement to use UIA1 for Android API below 21 and UI2 for API >= * making travis happy * fixed linter issue * trying to make travis happy
1 parent 6ad1a6c commit 18eba21

File tree

12 files changed

+62
-1
lines changed

12 files changed

+62
-1
lines changed

src/main/java/io/appium/java_client/pagefactory/HowToUseLocators.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,12 @@
4040
*
4141
* @return the strategy which defines how to use locators which are described by the
4242
* {@link SelendroidFindBy} annotation
43+
* @deprecated Selendroid driver is going to be deprecated.
44+
* Use {@link AndroidFindBy} instead.
45+
* It is recommended to use UIAutomator1 for Android API below 21
46+
* and UIAutomator2 for API >= 21
4347
*/
48+
@Deprecated
4449
LocatorGroupStrategy selendroidAutomation() default LocatorGroupStrategy.CHAIN;
4550

4651
/**

src/main/java/io/appium/java_client/pagefactory/OverrideWidget.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,13 @@
6363
* {@link io.appium.java_client.remote.AutomationName#SELENDROID} automation is used.
6464
* A declared class should not be abstract. Declared class also should be a subclass
6565
* of an annotated class/class which is declared by an annotated field.
66-
*
66+
* @deprecated Selendroid driver is going to be deprecated.
67+
* Use {@link io.appium.java_client.remote.AutomationName#ANDROID_UIAUTOMATOR2} instead.
68+
* It is recommended to use UIAutomator1 for Android API below 21
69+
* and UIAutomator2 for API >= 21
6770
* @return a class which extends {@link io.appium.java_client.pagefactory.Widget}
6871
*/
72+
@Deprecated
6973
Class<? extends Widget> selendroid() default Widget.class;
7074

7175
/**

src/main/java/io/appium/java_client/pagefactory/SelendroidBy.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,12 @@
1919

2020
/**
2121
* Used to build a complex selendroid locator.
22+
* @deprecated Selendroid driver is going to be deprecated.
23+
* Use {@link AndroidBy} instead.
24+
* It is recommended to use UIAutomator1 for Android API below 21
25+
* and UIAutomator2 for API &gt;= 21
2226
*/
27+
@Deprecated
2328
public @interface SelendroidBy {
2429
/**
2530
* It is an id of the target element.

src/main/java/io/appium/java_client/pagefactory/SelendroidFindAll.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,14 @@
2828
* series of {@link SelendroidBy} tags
2929
* It will then search for all elements that match any criteria. Note that elements
3030
* are not guaranteed to be in document order.
31+
*
32+
* @deprecated Selendroid driver is going to be deprecated.
33+
* Use {@link AndroidBy} instead.
34+
* It is recommended to use UIAutomator1 for Android API below 21
35+
* and UIAutomator2 for API &gt;= 21
3136
*/
3237
@Retention(RUNTIME) @Target({FIELD, TYPE})
38+
@Deprecated
3339
public @interface SelendroidFindAll {
3440
/**
3541
* It is a set of {@link SelendroidBy} strategies which may be used to find the target element.

src/main/java/io/appium/java_client/pagefactory/SelendroidFindBy.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,15 @@
3131
* {@link org.openqa.selenium.support.PageFactory}
3232
* this allows users to quickly and easily create PageObjects.
3333
* using Selendroid UI selectors like, id, name, class name, tag and xpath
34+
*
35+
* @deprecated Selendroid driver is going to be deprecated.
36+
* Use {@link AndroidFindBy} instead.
37+
* It is recommended to use UIAutomator1 for Android API below 21
38+
* and UIAutomator2 for API &gt;= 21
3439
*/
3540
@Retention(RUNTIME) @Target({FIELD, TYPE})
3641
@Repeatable(SelendroidFindBySet.class)
42+
@Deprecated
3743
public @interface SelendroidFindBy {
3844
/**
3945
* It is an id of the target element.

src/main/java/io/appium/java_client/pagefactory/SelendroidFindByAllSet.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,15 @@
2626
/**
2727
* Defines set of chained/possible locators. Each one locator
2828
* should be defined with {@link SelendroidFindAll}
29+
*
30+
* @deprecated Selendroid driver is going to be deprecated.
31+
* Use {@link AndroidFindAll} instead.
32+
* It is recommended to use UIAutomator1 for Android API below 21
33+
* and UIAutomator2 for API &gt;= 21
2934
*/
3035
@Target(value = {TYPE, FIELD})
3136
@Retention(value = RUNTIME)
37+
@Deprecated
3238
public @interface SelendroidFindByAllSet {
3339
/**
3440
* @return an array of {@link SelendroidFindAll} which builds a sequence of

src/main/java/io/appium/java_client/pagefactory/SelendroidFindByChainSet.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,15 @@
2626
/**
2727
* Defines set of chained/possible locators. Each one locator
2828
* should be defined with {@link SelendroidFindBys}
29+
*
30+
* @deprecated Selendroid driver is going to be deprecated.
31+
* Use {@link AndroidFindBys} instead.
32+
* It is recommended to use UIAutomator1 for Android API below 21
33+
* and UIAutomator2 for API &gt;= 21
2934
*/
3035
@Target(value = {TYPE, FIELD})
3136
@Retention(value = RUNTIME)
37+
@Deprecated
3238
public @interface SelendroidFindByChainSet {
3339
/**
3440
* @return an array of {@link SelendroidFindBys} which builds a sequence of

src/main/java/io/appium/java_client/pagefactory/SelendroidFindBySet.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,15 @@
2626
/**
2727
* Defines set of chained/possible locators. Each one locator
2828
* should be defined with {@link io.appium.java_client.pagefactory.SelendroidFindBy}
29+
*
30+
* @deprecated Selendroid driver is going to be deprecated.
31+
* Use {@link AndroidFindBySet} instead.
32+
* It is recommended to use UIAutomator1 for Android API below 21
33+
* and UIAutomator2 for API &gt;= 21
2934
*/
3035
@Target(value = {TYPE, FIELD})
3136
@Retention(value = RUNTIME)
37+
@Deprecated
3238
public @interface SelendroidFindBySet {
3339
/**
3440
* @return an array of {@link io.appium.java_client.pagefactory.SelendroidFindBy} which builds a sequence of

src/main/java/io/appium/java_client/pagefactory/SelendroidFindBys.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,14 @@
2626
/**
2727
* Used to mark a field on a Page Object to indicate that lookup should
2828
* use a series of {@link SelendroidBy} tags.
29+
*
30+
* @deprecated Selendroid driver is going to be deprecated.
31+
* Use {@link AndroidBy} instead.
32+
* It is recommended to use UIAutomator1 for Android API below 21
33+
* and UIAutomator2 for API &gt;= 21
2934
*/
3035
@Retention(RUNTIME) @Target({FIELD, TYPE})
36+
@Deprecated
3137
public @interface SelendroidFindBys {
3238
/**
3339
* It is a set of {@link SelendroidBy} strategies which build the chain of the searching for the target element.

src/main/java/io/appium/java_client/remote/AndroidMobileCapabilityType.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,12 @@ public interface AndroidMobileCapabilityType extends CapabilityType {
249249
*/
250250
String ANDROID_NATURAL_ORIENTATION = "androidNaturalOrientation";
251251

252+
/**
253+
* Selendroid driver is going to be deprecated.
254+
* It is recommended to use UIAutomator1 for Android API below 21
255+
* and UIAutomator2 for API &gt;= 21
256+
*/
257+
@Deprecated
252258
String SELENDROID_PORT = "selendroidPort";
253259

254260
/**

src/main/java/io/appium/java_client/service/local/flags/AndroidServerFlag.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,11 @@ public enum AndroidServerFlag implements ServerArgument {
2828
/**
2929
* Local port used for communication with Selendroid. Sample:
3030
* --selendroid-port 8080
31+
* Selendroid driver is going to be deprecated.
32+
* It is recommended to use UIAutomator1 for Android API below 21
33+
* and UIAutomator2 for API &gt;= 21
3134
*/
35+
@Deprecated
3236
SELENDROID_PORT("--selendroid-port"),
3337
/**
3438
* If set, prevents Appium from killing the adb server

src/test/java/io/appium/java_client/pagefactory_tests/widget/tests/combined/DefaultSelendroidWidget.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
import java.util.List;
88

9+
@Deprecated
910
public class DefaultSelendroidWidget extends DefaultStubWidget {
1011

1112
@SelendroidFindBy(linkText = "SELENDROID_SOME_SUB_LOCATOR")

0 commit comments

Comments
 (0)