Hi everebody!
Long waited Java-client version 4.0.0 has been released. There are many changes. The maiin difference is that it is not compatible with Appium server v<1.5.0. Also some API was improved.
Change list:
all code marked @Deprecated was removed. Java client won’t support old servers (v<1.5.0)
anymore.
the ability to start an activity using Android intent actions, intent categories, flags and arguments
was added to AndroidDriver. Thanks to @saikrishna321 for the contribution.
scrollTo() and scrollToExact() became deprecated. They are going to be removed in the next release.
The interface io.appium.java_client.ios.GetsNamedTextField and the declared method T getNamedTextField(String name) are deprecated as well. They are going to be removed in the next release.
Methods findElements(String by, String using) and findElement(String by, String using) of org.openga.selenium.remote.RemoteWebdriver are public now. Thanks to @SrinivasanTarget.
the io.appium.java_client.NetworkConnectionSetting class was marked deprecated
the enum io.appium.java_client.android.Connection was added. All supported network bitmasks are defined there.
Android. Old methods which get/set connection were marked @Deprecated
Android. New methods which consume/return io.appium.java_client.android.Connection were added.
the commandRepository field is public now. The modification of the MobileCommand
Constructors like AppiumDriver(HttpCommandExecutor executor, Capabilities capabilities) were added to io.appium.java_client.android.AndroidDriver and io.appium.java_client.ios.IOSDriver
The refactoring of io.appium.java_client.internal.JsonToMobileElementConverter. Now it accepts org.openqa.selenium.remote.RemoteWebDriver as the constructor parameter. It is possible to re-use io.appium.java_client.android.internal.JsonToAndroidElementConverter or io.appium.java_client.ios.internal.JsonToIOSElementConverter by RemoteWebDriver when it is needed.
Constructors of the abstract io.appium.java_client.AppiumDriver were redesigned. Now they require
a subclass of io.appium.java_client.internal.JsonToMobileElementConverter. Constructors of io.appium.java_client.android.AndroidDriver and io.appium.java_client.ios.IOSDriver are same still.
The pushFile(String remotePath, File file) was added to AndroidDriver
FIX of TouchAction. Instances of the TouchAction class are reusable now
FIX of the swiping issue (iOS, server version >= 1.5.0). Now the swiping is implemented differently by
AndroidDriver and IOSDriver. Thanks to @truebit and @nuggit32 for the catching.
@SergeyTichomirov, since scrollTo is going to be obsolete method in coming release. so what is alternative to do? we need to again switch to jsExecutor?
also, driver.swipe(int i,int i,int i2,int i3,int i4); which is not provide info about which one is starting and ending co-ordinates.
Actually these methods use the same approach. But locators were hardcoded and people were complaining. It was not working for many specific cases. We could not find the generic solution, so we decided to remove these methods later and warn users now.