Skip to content

Commit 3132a5a

Browse files
Merge pull request #397 from TikhomirovSergey/master
The GetsNamedTextField interface has become deprecated
2 parents 1026038 + 79b295c commit 3132a5a

File tree

4 files changed

+10
-5
lines changed

4 files changed

+10
-5
lines changed

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,8 @@ anymore.
116116
- the ability to start an activity using Android intent actions, intent categories, flags and arguments
117117
was added to `AndroidDriver`. Thanks to [@saikrishna321](https://github.com/saikrishna321) for the contribution.
118118
- `scrollTo()` and `scrollToExact()` became deprecated. They are going to be removed in the next release.
119+
- The interface `io.appium.java_client.ios.GetsNamedTextField` and the declared method `T getNamedTextField(String name)` are
120+
deprecated as well. They are going to be removed in the next release.
119121
- Methods `findElements(String by, String using)` and `findElement(String by, String using)` of `org.openga.selenium.remote.RemoteWebdriver` are public now. Thanks to [@SrinivasanTarget](https://github.com/SrinivasanTarget).
120122
- the `io.appium.java_client.NetworkConnectionSetting` class was marked deprecated
121123
- the enum `io.appium.java_client.android.Connection` was added. All supported network bitmasks are defined there.

src/main/java/io/appium/java_client/ios/GetsNamedTextField.java

+6-1
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,16 @@
1818

1919
import org.openqa.selenium.WebElement;
2020

21+
@Deprecated
22+
/**
23+
* This interface is deprecated and it is going to be removed further.
24+
*/
2125
public interface GetsNamedTextField<T extends WebElement> {
2226
/**
2327
* In iOS apps, named TextFields have the same accessibility Id as their
2428
* containing TableElement. This is a convenience method for getting the
25-
* named TextField, rather than its containing element.
29+
* named TextField, rather than its containing element. *
30+
* This method is deprecated and it is going to be removed further.
2631
*
2732
* @param name accessiblity id of TextField
2833
* @return The textfield with the given accessibility id

src/main/java/io/appium/java_client/ios/IOSDriver.java

+1-3
Original file line numberDiff line numberDiff line change
@@ -231,9 +231,7 @@ public T scrollToExact(String text) {
231231
execute(SHAKE);
232232
}
233233

234-
/**
235-
* @see GetsNamedTextField#getNamedTextField(String).
236-
*/
234+
@Deprecated
237235
@SuppressWarnings("unchecked")
238236
@Override
239237
public T getNamedTextField(

src/test/java/io/appium/java_client/ios/IOSGesturesTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public class IOSGesturesTest extends BaseIOSTest {
4646

4747
@Test public void horizontalSwipingTest() {
4848
MobileElement slider = driver.findElementByClassName("UIASlider");
49-
slider.swipe(SwipeElementDirection.LEFT, slider.getSize().getWidth()/2, 0, 3000);
49+
slider.swipe(SwipeElementDirection.LEFT, slider.getSize().getWidth() / 2, 0, 3000);
5050
assertEquals("1%", slider.getAttribute("value"));
5151
slider.swipe(SwipeElementDirection.RIGHT, 2, 0, 3000);
5252
assertEquals("100%", slider.getAttribute("value"));

0 commit comments

Comments
 (0)