Skip to content

Commit dea2a7d

Browse files
Preparing 6.0.0. Removal of deprecated code.
- also changed artefact version in build.gradle - improved NOTICE
1 parent d8f9aad commit dea2a7d

18 files changed

+25
-504
lines changed

NOTICE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Copyright 2014-2017 Appium Contributors
1+
Copyright 2014-2018 Appium Contributors

build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ apply plugin: 'signing'
88
apply plugin: 'maven-publish'
99

1010
group 'io.appium'
11-
version '6.0.0-BETA5'
11+
version '6.0.0'
1212

1313
repositories {
1414
jcenter()

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

-10
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,6 @@
2323
import java.time.Duration;
2424

2525
public interface LocksDevice extends ExecutesMethod {
26-
/**
27-
* Check if the device is locked.
28-
*
29-
* @deprecated Use {@link #isDeviceLocked()} instead
30-
* @return true if device is locked. False otherwise
31-
*/
32-
@Deprecated
33-
default boolean isLocked() {
34-
return CommandExecutionHelper.execute(this, getIsDeviceLockedCommand());
35-
}
3626

3727
/**
3828
* This method locks a device. It will return silently if the device

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

-229
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@
1818

1919
import static com.google.common.base.Preconditions.checkNotNull;
2020
import static com.google.common.collect.ImmutableList.builder;
21-
import static io.appium.java_client.touch.LongPressOptions.longPressOptions;
22-
import static io.appium.java_client.touch.offset.ElementOption.element;
23-
import static io.appium.java_client.touch.offset.PointOption.point;
2421
import static java.util.stream.Collectors.toList;
2522

2623
import com.google.common.collect.ImmutableList;
@@ -32,9 +29,7 @@
3229
import io.appium.java_client.touch.WaitOptions;
3330
import io.appium.java_client.touch.offset.ElementOption;
3431
import io.appium.java_client.touch.offset.PointOption;
35-
import org.openqa.selenium.WebElement;
3632

37-
import java.time.Duration;
3833
import java.util.List;
3934
import java.util.Map;
4035

@@ -70,45 +65,6 @@ public T press(PointOption pressOptions) {
7065
return (T) this;
7166
}
7267

73-
/**
74-
* Press on the center of an element.
75-
*
76-
* @param el element to press on.
77-
* @return this TouchAction, for chaining.
78-
* @deprecated use {@link #press(PointOption)} instead
79-
*/
80-
@Deprecated
81-
public T press(WebElement el) {
82-
return press(element(el));
83-
}
84-
85-
/**
86-
* Press on an absolute position on the screen.
87-
*
88-
* @param x x coordinate.
89-
* @param y y coordinate.
90-
* @return this TouchAction, for chaining.
91-
* @deprecated use {@link #press(PointOption)} instead
92-
*/
93-
@Deprecated
94-
public T press(int x, int y) {
95-
return press(point(x, y));
96-
}
97-
98-
/**
99-
* Press on an element, offset from upper left corner by a number of pixels.
100-
*
101-
* @param el element to press on.
102-
* @param x x offset.
103-
* @param y y offset.
104-
* @return this TouchAction, for chaining.
105-
* @deprecated use {@link #press(PointOption)} instead
106-
*/
107-
@Deprecated
108-
public T press(WebElement el, int x, int y) {
109-
return press(element(el, x, y));
110-
}
111-
11268
/**
11369
* Remove the current touching implement from the screen (withdraw your touch).
11470
*
@@ -138,47 +94,6 @@ public T moveTo(PointOption moveToOptions) {
13894
return (T) this;
13995
}
14096

141-
/**
142-
* Move current touch to center of an element.
143-
*
144-
* @param el element to move to.
145-
* @return this TouchAction, for chaining.
146-
* @deprecated {@link #moveTo(PointOption)} instead
147-
*/
148-
@Deprecated
149-
public T moveTo(WebElement el) {
150-
return moveTo(element(el));
151-
}
152-
153-
/**
154-
* Move current touch to a new position relative to the current position on
155-
* the screen. If the current position of this TouchAction is (xOld, yOld),
156-
* then this method will move the TouchAction to (xOld + x, yOld + y).
157-
*
158-
* @param x change in x coordinate to move through.
159-
* @param y change in y coordinate to move through.
160-
* @return this TouchAction, for chaining.
161-
* @deprecated {@link #moveTo(PointOption)} instead
162-
*/
163-
@Deprecated
164-
public T moveTo(int x, int y) {
165-
return moveTo(point(x, y));
166-
}
167-
168-
/**
169-
* Move current touch to an element, offset from upper left corner.
170-
*
171-
* @param el element to move current touch to.
172-
* @param x x offset.
173-
* @param y y offset.
174-
* @return this TouchAction, for chaining.
175-
* @deprecated {@link #moveTo(PointOption)} instead
176-
*/
177-
@Deprecated
178-
public T moveTo(WebElement el, int x, int y) {
179-
return moveTo(element(el, x, y));
180-
}
181-
18297
/**
18398
* Tap on an element.
18499
*
@@ -203,45 +118,6 @@ public T tap(PointOption tapOptions) {
203118
return (T) this;
204119
}
205120

206-
/**
207-
* Tap the center of an element.
208-
*
209-
* @param el element to tap.
210-
* @return this TouchAction, for chaining.
211-
* @deprecated use {@link #tap(PointOption)} instead.
212-
*/
213-
@Deprecated
214-
public T tap(WebElement el) {
215-
return tap(element(el));
216-
}
217-
218-
/**
219-
* Tap an absolute position on the screen.
220-
*
221-
* @param x x coordinate.
222-
* @param y y coordinate.
223-
* @return this TouchAction, for chaining.
224-
* @deprecated use {@link #tap(PointOption)} instead.
225-
*/
226-
@Deprecated
227-
public T tap(int x, int y) {
228-
return tap(point(x, y));
229-
}
230-
231-
/**
232-
* Tap an element, offset from upper left corner.
233-
*
234-
* @param el element to tap.
235-
* @param x x offset.
236-
* @param y y offset.
237-
* @return this TouchAction, for chaining.
238-
* @deprecated use {@link #tap(PointOption)} instead.
239-
*/
240-
@Deprecated
241-
public T tap(WebElement el, int x, int y) {
242-
return tap(element(el, x, y));
243-
}
244-
245121
/**
246122
* A wait action, used as a NOP in multi-chaining.
247123
*
@@ -267,23 +143,6 @@ public T waitAction(WaitOptions waitOptions) {
267143
return (T) this;
268144
}
269145

270-
/**
271-
* Waits for specified amount of time to pass before continue to next touch action.
272-
*
273-
* @param duration of the wait action. Minimum time reolution unit is one millisecond.
274-
* @return this TouchAction, for chaining.
275-
* @deprecated use {@link #waitAction(WaitOptions)} instead.
276-
*/
277-
@Deprecated
278-
public T waitAction(Duration duration) {
279-
ActionParameter action = new ActionParameter("wait",
280-
new WaitOptions()
281-
.withDuration(duration));
282-
parameterBuilder.add(action);
283-
//noinspection unchecked
284-
return (T) this;
285-
}
286-
287146
/**
288147
* Press and hold the at the center of an element until the context menu event has fired.
289148
*
@@ -310,94 +169,6 @@ public T longPress(PointOption longPressOptions) {
310169
return (T) this;
311170
}
312171

313-
/**
314-
* Press and hold the at the center of an element until the contextmenu event has fired.
315-
*
316-
* @param el element to long-press.
317-
* @return this TouchAction, for chaining.
318-
* @deprecated use {@link #longPress(PointOption)} instead
319-
*/
320-
@Deprecated
321-
public T longPress(WebElement el) {
322-
return longPress(element(el));
323-
}
324-
325-
/**
326-
* Press and hold the at the center of an element until the contextmenu event has fired.
327-
*
328-
* @param el element to long-press.
329-
* @param duration of the long-press. Minimum time resolution unit is one millisecond.
330-
* @return this TouchAction, for chaining.
331-
* @deprecated use {@link #longPress(LongPressOptions)} instead
332-
*/
333-
@Deprecated
334-
public T longPress(WebElement el, Duration duration) {
335-
return longPress(longPressOptions()
336-
.withDuration(duration).withElement(element(el)));
337-
}
338-
339-
/**
340-
* Press and hold the at an absolute position on the screen
341-
* until the contextmenu event has fired.
342-
*
343-
* @param x x coordinate.
344-
* @param y y coordinate.
345-
* @return this TouchAction, for chaining.
346-
* @deprecated use {@link #longPress(PointOption)} instead
347-
*/
348-
@Deprecated
349-
public T longPress(int x, int y) {
350-
return longPress(point(x, y));
351-
}
352-
353-
/**
354-
* Press and hold the at an absolute position on the screen until the
355-
* contextmenu event has fired.
356-
*
357-
* @param x x coordinate.
358-
* @param y y coordinate.
359-
* @param duration of the long-press. Minimum time resolution unit is one millisecond.
360-
* @return this TouchAction, for chaining.
361-
* @deprecated use {@link #longPress(LongPressOptions)} instead
362-
*/
363-
@Deprecated
364-
public T longPress(int x, int y, Duration duration) {
365-
return longPress(longPressOptions()
366-
.withDuration(duration).withPosition(point(x, y)));
367-
}
368-
369-
/**
370-
* Press and hold the at an elements upper-left corner, offset by the given amount,
371-
* until the contextmenu event has fired.
372-
*
373-
* @param el element to long-press.
374-
* @param x x offset.
375-
* @param y y offset.
376-
* @return this TouchAction, for chaining.
377-
* @deprecated use {@link #longPress(PointOption)} instead
378-
*/
379-
@Deprecated
380-
public T longPress(WebElement el, int x, int y) {
381-
return longPress(element(el, x, y));
382-
}
383-
384-
/**
385-
* Press and hold the at an elements upper-left corner, offset by the
386-
* given amount, until the contextmenu event has fired.
387-
*
388-
* @param el element to long-press.
389-
* @param x x offset.
390-
* @param y y offset.
391-
* @param duration of the long-press. Minimum time resolution unit is one millisecond.
392-
* @return this TouchAction, for chaining.
393-
* @deprecated use {@link #longPress(LongPressOptions)} instead
394-
*/
395-
@Deprecated
396-
public T longPress(WebElement el, int x, int y, Duration duration) {
397-
return longPress(longPressOptions()
398-
.withElement(element(el, x, y)).withDuration(duration));
399-
}
400-
401172
/**
402173
* Cancel this action, if it was partially completed by the performsTouchActions.
403174
*/

src/main/java/io/appium/java_client/android/Connection.java

-40
This file was deleted.

src/main/java/io/appium/java_client/android/connection/HasNetworkConnection.java

-11
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,8 @@
2121

2222
import io.appium.java_client.CommandExecutionHelper;
2323
import io.appium.java_client.ExecutesMethod;
24-
import io.appium.java_client.android.Connection;
2524

2625
public interface HasNetworkConnection extends ExecutesMethod {
27-
/**
28-
* Set the network connection of the device.
29-
*
30-
* @param connection The bitmask of the desired connection
31-
* @deprecated use {@link #setConnection(ConnectionState)} instead
32-
*/
33-
@Deprecated
34-
default void setConnection(Connection connection) {
35-
CommandExecutionHelper.execute(this, setConnectionCommand(connection.getBitMask()));
36-
}
3726

3827
/**
3928
* Set the network connection of the device.

src/main/java/io/appium/java_client/imagecomparison/ComparisonResult.java

+2
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ protected void verifyPropertyPresence(String propertyName) {
5656
}
5757

5858
/**
59+
* Returns the visualization of the matching result.
60+
*
5961
* @return The visualization of the matching result represented as base64-encoded PNG image.
6062
*/
6163
public byte[] getVisualization() {

0 commit comments

Comments
 (0)