Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion NOTICE
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Copyright 2014-2017 Appium Contributors
Copyright 2014-2018 Appium Contributors
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ apply plugin: 'signing'
apply plugin: 'maven-publish'

group 'io.appium'
version '6.0.0-BETA5'
version '6.0.0'

repositories {
jcenter()
Expand Down
10 changes: 0 additions & 10 deletions src/main/java/io/appium/java_client/LocksDevice.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,6 @@
import java.time.Duration;

public interface LocksDevice extends ExecutesMethod {
/**
* Check if the device is locked.
*
* @deprecated Use {@link #isDeviceLocked()} instead
* @return true if device is locked. False otherwise
*/
@Deprecated
default boolean isLocked() {
return CommandExecutionHelper.execute(this, getIsDeviceLockedCommand());
}

/**
* This method locks a device. It will return silently if the device
Expand Down
229 changes: 0 additions & 229 deletions src/main/java/io/appium/java_client/TouchAction.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@

import static com.google.common.base.Preconditions.checkNotNull;
import static com.google.common.collect.ImmutableList.builder;
import static io.appium.java_client.touch.LongPressOptions.longPressOptions;
import static io.appium.java_client.touch.offset.ElementOption.element;
import static io.appium.java_client.touch.offset.PointOption.point;
import static java.util.stream.Collectors.toList;

import com.google.common.collect.ImmutableList;
Expand All @@ -32,9 +29,7 @@
import io.appium.java_client.touch.WaitOptions;
import io.appium.java_client.touch.offset.ElementOption;
import io.appium.java_client.touch.offset.PointOption;
import org.openqa.selenium.WebElement;

import java.time.Duration;
import java.util.List;
import java.util.Map;

Expand Down Expand Up @@ -70,45 +65,6 @@ public T press(PointOption pressOptions) {
return (T) this;
}

/**
* Press on the center of an element.
*
* @param el element to press on.
* @return this TouchAction, for chaining.
* @deprecated use {@link #press(PointOption)} instead
*/
@Deprecated
public T press(WebElement el) {
return press(element(el));
}

/**
* Press on an absolute position on the screen.
*
* @param x x coordinate.
* @param y y coordinate.
* @return this TouchAction, for chaining.
* @deprecated use {@link #press(PointOption)} instead
*/
@Deprecated
public T press(int x, int y) {
return press(point(x, y));
}

/**
* Press on an element, offset from upper left corner by a number of pixels.
*
* @param el element to press on.
* @param x x offset.
* @param y y offset.
* @return this TouchAction, for chaining.
* @deprecated use {@link #press(PointOption)} instead
*/
@Deprecated
public T press(WebElement el, int x, int y) {
return press(element(el, x, y));
}

/**
* Remove the current touching implement from the screen (withdraw your touch).
*
Expand Down Expand Up @@ -138,47 +94,6 @@ public T moveTo(PointOption moveToOptions) {
return (T) this;
}

/**
* Move current touch to center of an element.
*
* @param el element to move to.
* @return this TouchAction, for chaining.
* @deprecated {@link #moveTo(PointOption)} instead
*/
@Deprecated
public T moveTo(WebElement el) {
return moveTo(element(el));
}

/**
* Move current touch to a new position relative to the current position on
* the screen. If the current position of this TouchAction is (xOld, yOld),
* then this method will move the TouchAction to (xOld + x, yOld + y).
*
* @param x change in x coordinate to move through.
* @param y change in y coordinate to move through.
* @return this TouchAction, for chaining.
* @deprecated {@link #moveTo(PointOption)} instead
*/
@Deprecated
public T moveTo(int x, int y) {
return moveTo(point(x, y));
}

/**
* Move current touch to an element, offset from upper left corner.
*
* @param el element to move current touch to.
* @param x x offset.
* @param y y offset.
* @return this TouchAction, for chaining.
* @deprecated {@link #moveTo(PointOption)} instead
*/
@Deprecated
public T moveTo(WebElement el, int x, int y) {
return moveTo(element(el, x, y));
}

/**
* Tap on an element.
*
Expand All @@ -203,45 +118,6 @@ public T tap(PointOption tapOptions) {
return (T) this;
}

/**
* Tap the center of an element.
*
* @param el element to tap.
* @return this TouchAction, for chaining.
* @deprecated use {@link #tap(PointOption)} instead.
*/
@Deprecated
public T tap(WebElement el) {
return tap(element(el));
}

/**
* Tap an absolute position on the screen.
*
* @param x x coordinate.
* @param y y coordinate.
* @return this TouchAction, for chaining.
* @deprecated use {@link #tap(PointOption)} instead.
*/
@Deprecated
public T tap(int x, int y) {
return tap(point(x, y));
}

/**
* Tap an element, offset from upper left corner.
*
* @param el element to tap.
* @param x x offset.
* @param y y offset.
* @return this TouchAction, for chaining.
* @deprecated use {@link #tap(PointOption)} instead.
*/
@Deprecated
public T tap(WebElement el, int x, int y) {
return tap(element(el, x, y));
}

/**
* A wait action, used as a NOP in multi-chaining.
*
Expand All @@ -267,23 +143,6 @@ public T waitAction(WaitOptions waitOptions) {
return (T) this;
}

/**
* Waits for specified amount of time to pass before continue to next touch action.
*
* @param duration of the wait action. Minimum time reolution unit is one millisecond.
* @return this TouchAction, for chaining.
* @deprecated use {@link #waitAction(WaitOptions)} instead.
*/
@Deprecated
public T waitAction(Duration duration) {
ActionParameter action = new ActionParameter("wait",
new WaitOptions()
.withDuration(duration));
parameterBuilder.add(action);
//noinspection unchecked
return (T) this;
}

/**
* Press and hold the at the center of an element until the context menu event has fired.
*
Expand All @@ -310,94 +169,6 @@ public T longPress(PointOption longPressOptions) {
return (T) this;
}

/**
* Press and hold the at the center of an element until the contextmenu event has fired.
*
* @param el element to long-press.
* @return this TouchAction, for chaining.
* @deprecated use {@link #longPress(PointOption)} instead
*/
@Deprecated
public T longPress(WebElement el) {
return longPress(element(el));
}

/**
* Press and hold the at the center of an element until the contextmenu event has fired.
*
* @param el element to long-press.
* @param duration of the long-press. Minimum time resolution unit is one millisecond.
* @return this TouchAction, for chaining.
* @deprecated use {@link #longPress(LongPressOptions)} instead
*/
@Deprecated
public T longPress(WebElement el, Duration duration) {
return longPress(longPressOptions()
.withDuration(duration).withElement(element(el)));
}

/**
* Press and hold the at an absolute position on the screen
* until the contextmenu event has fired.
*
* @param x x coordinate.
* @param y y coordinate.
* @return this TouchAction, for chaining.
* @deprecated use {@link #longPress(PointOption)} instead
*/
@Deprecated
public T longPress(int x, int y) {
return longPress(point(x, y));
}

/**
* Press and hold the at an absolute position on the screen until the
* contextmenu event has fired.
*
* @param x x coordinate.
* @param y y coordinate.
* @param duration of the long-press. Minimum time resolution unit is one millisecond.
* @return this TouchAction, for chaining.
* @deprecated use {@link #longPress(LongPressOptions)} instead
*/
@Deprecated
public T longPress(int x, int y, Duration duration) {
return longPress(longPressOptions()
.withDuration(duration).withPosition(point(x, y)));
}

/**
* Press and hold the at an elements upper-left corner, offset by the given amount,
* until the contextmenu event has fired.
*
* @param el element to long-press.
* @param x x offset.
* @param y y offset.
* @return this TouchAction, for chaining.
* @deprecated use {@link #longPress(PointOption)} instead
*/
@Deprecated
public T longPress(WebElement el, int x, int y) {
return longPress(element(el, x, y));
}

/**
* Press and hold the at an elements upper-left corner, offset by the
* given amount, until the contextmenu event has fired.
*
* @param el element to long-press.
* @param x x offset.
* @param y y offset.
* @param duration of the long-press. Minimum time resolution unit is one millisecond.
* @return this TouchAction, for chaining.
* @deprecated use {@link #longPress(LongPressOptions)} instead
*/
@Deprecated
public T longPress(WebElement el, int x, int y, Duration duration) {
return longPress(longPressOptions()
.withElement(element(el, x, y)).withDuration(duration));
}

/**
* Cancel this action, if it was partially completed by the performsTouchActions.
*/
Expand Down
40 changes: 0 additions & 40 deletions src/main/java/io/appium/java_client/android/Connection.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,8 @@

import io.appium.java_client.CommandExecutionHelper;
import io.appium.java_client.ExecutesMethod;
import io.appium.java_client.android.Connection;

public interface HasNetworkConnection extends ExecutesMethod {
/**
* Set the network connection of the device.
*
* @param connection The bitmask of the desired connection
* @deprecated use {@link #setConnection(ConnectionState)} instead
*/
@Deprecated
default void setConnection(Connection connection) {
CommandExecutionHelper.execute(this, setConnectionCommand(connection.getBitMask()));
}

/**
* Set the network connection of the device.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ protected void verifyPropertyPresence(String propertyName) {
}

/**
* Returns the visualization of the matching result.
*
* @return The visualization of the matching result represented as base64-encoded PNG image.
*/
public byte[] getVisualization() {
Expand Down
Loading