Skip to content

Delete deprecated methods #1077

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Dec 28, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import org.openqa.selenium.Capabilities;
import org.openqa.selenium.WebDriverException;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.interactions.Mouse;
import org.openqa.selenium.remote.CommandExecutor;
import org.openqa.selenium.remote.RemoteWebDriver;
import org.openqa.selenium.remote.Response;
Expand Down Expand Up @@ -156,13 +155,6 @@ public List findElementsByXPath(String using) {
return super.findElementsByXPath(using);
}

/**
* Mouse doesn't work on mobile devices and emulators.
*/
@Deprecated public Mouse getMouse() {
return super.getMouse();
}

@Override
public String toString() {
return String.format("%s, Capabilities: %s", getClass().getCanonicalName(),
Expand Down
53 changes: 0 additions & 53 deletions src/main/java/io/appium/java_client/FindsByIosUIAutomation.java

This file was deleted.

77 changes: 0 additions & 77 deletions src/main/java/io/appium/java_client/MobileBy.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,20 +63,6 @@ protected String getLocatorString() {
.findElement(selector.toString(), getLocatorString());
}

/**
* Read https://developer.apple.com/library/tvos/documentation/DeveloperTools/
* Conceptual/InstrumentsUserGuide/UIAutomation.html
*
* @param iOSAutomationText is iOS UIAutomation string
* @return an instance of {@link io.appium.java_client.MobileBy.ByIosUIAutomation}
*
* @deprecated UIAutomation is going to get deprecated.
* It is recommended to use XCUITest
*/
public static By IosUIAutomation(final String iOSAutomationText) {
return new ByIosUIAutomation(iOSAutomationText);
}

/**
* Read http://developer.android.com/intl/ru/tools/testing-support-library/
* index.html#uia-apis
Expand Down Expand Up @@ -162,69 +148,6 @@ public static By image(final String b64Template) {
public static By custom(final String selector) {
return new ByCustom(selector);
}

public static class ByIosUIAutomation extends MobileBy implements Serializable {

public ByIosUIAutomation(String iOSAutomationText) {
super(MobileSelector.IOS_UI_AUTOMATION, iOSAutomationText);
}

/**
* {@inheritDoc}
*
* @throws WebDriverException when current session doesn't support the given selector or when
* value of the selector is not consistent.
* @throws IllegalArgumentException when it is impossible to find something on the given
* {@link SearchContext} instance
*/
@SuppressWarnings("unchecked")
@Override
public List<WebElement> findElements(SearchContext context) throws WebDriverException,
IllegalArgumentException {
Class<?> contextClass = context.getClass();

if (FindsByIosUIAutomation.class.isAssignableFrom(contextClass)) {
return FindsByIosUIAutomation.class.cast(context)
.findElementsByIosUIAutomation(getLocatorString());
}

if (FindsByFluentSelector.class.isAssignableFrom(contextClass)) {
return super.findElements(context);
}

throw formIllegalArgumentException(contextClass, FindsByIosUIAutomation.class,
FindsByFluentSelector.class);
}

/**
* {@inheritDoc}
*
* @throws WebDriverException when current session doesn't support the given selector or when
* value of the selector is not consistent.
* @throws IllegalArgumentException when it is impossible to find something on the given
* {@link SearchContext} instance
*/
@Override public WebElement findElement(SearchContext context) throws WebDriverException,
IllegalArgumentException {
Class<?> contextClass = context.getClass();

if (FindsByIosUIAutomation.class.isAssignableFrom(contextClass)) {
return ((FindsByIosUIAutomation<?>) context)
.findElementByIosUIAutomation(getLocatorString());
}

if (FindsByFluentSelector.class.isAssignableFrom(contextClass)) {
return super.findElement(context);
}

throw formIllegalArgumentException(contextClass, FindsByIosUIAutomation.class,
FindsByFluentSelector.class);
}

@Override public String toString() {
return "By.IosUIAutomation: " + getLocatorString();
}
}


public static class ByAndroidUIAutomator extends MobileBy implements Serializable {
Expand Down
Loading