Skip to content

Commit 02a1852

Browse files
#565: initial commit
1 parent 3768529 commit 02a1852

15 files changed

+219
-30
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,17 @@
2626
* series of {@link io.appium.java_client.pagefactory.AndroidFindBy} tags
2727
* It will then search for all elements that match any criteria. Note that elements
2828
* are not guaranteed to be in document order.
29-
* It is deprecated. Set of {@link io.appium.java_client.pagefactory.AndroidFindBy}
30-
* can be defined without this annotation. To define the correct way how to use
31-
* the defined set please take a look at {@link HowToUseLocators}. The article.
32-
* https://docs.oracle.com/javase/tutorial/java/annotations/repeating.html.
3329
*/
34-
@Deprecated
3530
@Retention(RetentionPolicy.RUNTIME) @Target({ElementType.FIELD, ElementType.TYPE})
3631
public @interface AndroidFindAll {
3732
/**
3833
* It is a set of {@link io.appium.java_client.pagefactory.AndroidFindBy} strategies which may
3934
* be used to find the target element.
4035
*/
4136
AndroidFindBy[] value();
37+
38+
/**
39+
* @return priority of the searching
40+
*/
41+
int priority() default 0;
4242
}

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,9 @@
6666
* It is a xpath to the target element.
6767
*/
6868
String xpath() default "";
69+
70+
/**
71+
* @return priority of the searching
72+
*/
73+
int priority() default 0;
6974
}

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,17 @@
2424
/**
2525
* Used to mark a field on a Page Object to indicate that lookup should use
2626
* a series of {@link io.appium.java_client.pagefactory.AndroidFindBy} tags.
27-
* It is deprecated. Set of {@link io.appium.java_client.pagefactory.AndroidFindBy}
28-
* can be defined without this annotation. To define the correct way how to use
29-
* the defined set please take a look at {@link HowToUseLocators}. The article.
30-
* https://docs.oracle.com/javase/tutorial/java/annotations/repeating.html.
3127
*/
32-
@Deprecated
3328
@Retention(RetentionPolicy.RUNTIME) @Target({ElementType.FIELD, ElementType.TYPE})
3429
public @interface AndroidFindBys {
3530
/**
3631
* It is a set of {@link io.appium.java_client.pagefactory.AndroidFindBy} strategies which build
3732
* the chain of the searching for the target element.
3833
*/
3934
AndroidFindBy[] value();
35+
36+
/**
37+
* @return priority of the searching
38+
*/
39+
int priority() default 0;
4040
}

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,17 @@
2626
* series of {@link io.appium.java_client.pagefactory.SelendroidFindBy} tags
2727
* It will then search for all elements that match any criteria. Note that elements
2828
* are not guaranteed to be in document order.
29-
* It is deprecated. Set of {@link io.appium.java_client.pagefactory.SelendroidFindBy}
30-
* can be defined without this annotation. To define the correct way how to use
31-
* the defined set please take a look at {@link HowToUseLocators}. The article.
32-
* https://docs.oracle.com/javase/tutorial/java/annotations/repeating.html.
3329
*/
34-
@Deprecated
3530
@Retention(RetentionPolicy.RUNTIME) @Target({ElementType.FIELD, ElementType.TYPE})
3631
public @interface SelendroidFindAll {
3732
/**
3833
* It is a set of {@link io.appium.java_client.pagefactory.SelendroidFindBy} strategies which
3934
* may be used to find the target element.
4035
*/
4136
SelendroidFindBy[] value();
37+
38+
/**
39+
* @return priority of the searching
40+
*/
41+
int priority() default 0;
4242
}

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,9 @@
6767
* It is a part of the text of the desired element.
6868
*/
6969
String partialLinkText() default "";
70+
71+
/**
72+
* @return priority of the searching
73+
*/
74+
int priority() default 0;
7075
}

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,17 @@
2424
/**
2525
* Used to mark a field on a Page Object to indicate that lookup should
2626
* use a series of {@link io.appium.java_client.pagefactory.SelendroidFindBy} tags.
27-
* It is deprecated. Set of {@link io.appium.java_client.pagefactory.SelendroidFindBy}
28-
* can be defined without this annotation. To define the correct way how to use
29-
* the defined set please take a look at {@link HowToUseLocators}. The article.
30-
* https://docs.oracle.com/javase/tutorial/java/annotations/repeating.html.
3127
*/
32-
@Deprecated
3328
@Retention(RetentionPolicy.RUNTIME) @Target({ElementType.FIELD, ElementType.TYPE})
3429
public @interface SelendroidFindBys {
3530
/**
3631
* It is a set of {@link io.appium.java_client.pagefactory.SelendroidFindBy} strategies which
3732
* build the chain of the searching for the target element.
3833
*/
3934
SelendroidFindBy[] value();
35+
36+
/**
37+
* @return priority of the searching
38+
*/
39+
int priority() default 0;
4040
}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
/*
2+
* Licensed under the Apache License, Version 2.0 (the "License");
3+
* you may not use this file except in compliance with the License.
4+
* See the NOTICE file distributed with this work for additional
5+
* information regarding copyright ownership.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package io.appium.java_client.pagefactory;
18+
19+
import java.lang.annotation.ElementType;
20+
import java.lang.annotation.Retention;
21+
import java.lang.annotation.RetentionPolicy;
22+
import java.lang.annotation.Target;
23+
24+
/**
25+
* Used to mark a field on a Page/Screen Object to indicate that lookup should use a series
26+
* of {@link WindowsFindBy} tags
27+
* It will then search for all elements that match any criteria. Note that elements
28+
* are not guaranteed to be in document order.
29+
*/
30+
@Retention(RetentionPolicy.RUNTIME) @Target({ElementType.FIELD, ElementType.TYPE})
31+
public @interface WindowsFindAll {
32+
/**
33+
* It is a set of {@link WindowsFindBy} strategies which may be
34+
* used to find the target element.
35+
*/
36+
WindowsFindBy[] value();
37+
38+
/**
39+
* @return priority of the searching
40+
*/
41+
int priority() default 0;
42+
}

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,9 @@
6262
* It is a xpath to the target element.
6363
*/
6464
String xpath() default "";
65+
66+
/**
67+
* @return priority of the searching
68+
*/
69+
int priority() default 0;
6570
}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/*
2+
* Licensed under the Apache License, Version 2.0 (the "License");
3+
* you may not use this file except in compliance with the License.
4+
* See the NOTICE file distributed with this work for additional
5+
* information regarding copyright ownership.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package io.appium.java_client.pagefactory;
18+
19+
import java.lang.annotation.ElementType;
20+
import java.lang.annotation.Retention;
21+
import java.lang.annotation.RetentionPolicy;
22+
import java.lang.annotation.Target;
23+
24+
/**
25+
* Used to mark a field on a Page Object to indicate that lookup should use
26+
* a series of {@link WindowsFindBy} tags.
27+
*/
28+
@Retention(RetentionPolicy.RUNTIME) @Target({ElementType.FIELD, ElementType.TYPE})
29+
public @interface WindowsFindBys {
30+
/**
31+
* It is a set of {@link WindowsFindBy} strategies which build
32+
* the chain of the searching for the target element.
33+
*/
34+
WindowsFindBy[] value();
35+
36+
/**
37+
* @return priority of the searching
38+
*/
39+
int priority() default 0;
40+
}

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,17 @@
2626
* of {@link io.appium.java_client.pagefactory.iOSFindBy} tags
2727
* It will then search for all elements that match any criteria. Note that elements
2828
* are not guaranteed to be in document order.
29-
* It is deprecated. Set of {@link io.appium.java_client.pagefactory.iOSFindBy}
30-
* can be defined without this annotation. To define the correct way how to use
31-
* the defined set please take a look at {@link HowToUseLocators}. The article.
32-
* https://docs.oracle.com/javase/tutorial/java/annotations/repeating.html.
3329
*/
34-
@Deprecated
3530
@Retention(RetentionPolicy.RUNTIME) @Target({ElementType.FIELD, ElementType.TYPE})
3631
public @interface iOSFindAll {
3732
/**
3833
* It is a set of {@link io.appium.java_client.pagefactory.iOSFindBy} strategies which may be
3934
* used to find the target element.
4035
*/
4136
iOSFindBy[] value();
37+
38+
/**
39+
* @return priority of the searching
40+
*/
41+
int priority() default 0;
4242
}

0 commit comments

Comments
 (0)