File tree Expand file tree Collapse file tree
src/main/java/io/appium/java_client Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6868 <groupId >net.lingala.zip4j</groupId >
6969 <artifactId >zip4j</artifactId >
7070 <version >1.3.2</version >
71+ <scope >test</scope >
7172 </dependency >
7273 <dependency >
7374 <groupId >commons-io</groupId >
7475 <artifactId >commons-io</artifactId >
75- <version >2.1 </version >
76+ <version >2.5 </version >
7677 </dependency >
7778 </dependencies >
7879 <packaging >jar</packaging >
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ public class MobileCommand {
6262 public static final String TOGGLE_LOCATION_SERVICES = "toggleLocationServices" ;
6363 public static final String GET_DEVICE_TIME = "getDeviceTime" ;
6464 public static final String UNLOCK = "unlock" ;
65- static final Map <String , CommandInfo > commandRepository = getMobileCommands ();
65+ public static final Map <String , CommandInfo > commandRepository = getMobileCommands ();
6666
6767 static CommandInfo getC (String url ) {
6868 return new CommandInfo (url , HttpMethod .GET );
Original file line number Diff line number Diff line change @@ -84,7 +84,14 @@ enum Strategies {
8484 return By
8585 .partialLinkText (getValue (annotation , this ));
8686 }
87- };
87+ },
88+ BYNSPREDICATE ("nsPredicate" ) {
89+ @ Override By getBy (Annotation annotation ) {
90+ return MobileBy
91+ .IosNsPredicateString (getValue (annotation , this ));
92+ }
93+ }
94+ ;
8895
8996 private final String valueName ;
9097
Original file line number Diff line number Diff line change 6565 * It is a xpath to the target element.
6666 */
6767 String xpath () default "" ;
68+
69+ /**
70+ * This parameter makes perform the searching by iOS NSPredicate.
71+ * This locator strategy is available in XCUITest Driver mode.
72+ * Documentation to read:
73+ * https://github.com/appium/java-client/blob/master/docs/
74+ * Installing-xcuitest-driver.md
75+ *
76+ * https://github.com/appium/appium-xcuitest-driver/blob/master/README.md
77+ */
78+ String nsPredicate () default "" ;
6879}
You can’t perform that action at this time.
0 commit comments