# Java-client 5.0.0-BETA1 released

**URL:** <https://discuss.appium.io/t/java-client-5-0-0-beta1-released/13984>\
**Category:** News\
**Created:** [December 29, 2016, 12:11pm UTC](https://discuss.appium.io/t/java-client-5-0-0-beta1-released/13984 "2016-12-29T12:11:43Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![SergeyTichomirov](https://discuss.appium.io/user_avatar/discuss.appium.io/sergeytichomirov/32/5175_2.png) [@SergeyTichomirov](https://discuss.appium.io/u/SergeyTichomirov)\
**Post date:** [December 29, 2016, 12:11pm UTC](https://discuss.appium.io/t/java-client-5-0-0-beta1-released/13984/1 "2016-12-29T12:11:43Z")

</div>

Hi guys!  
Java-client version 5.0.0-BETA1 has been released. The list of chandes is too long 🙂  
It is the beta version. We will wait for contributions and bug reports before 5.0.0 will has been finalized.

**Change list:**

- **[MAJOR ENHANCEMENT]**: Migration to Java 8. Epic: [#399](https://github.com/appium/java-client/issues/399)

- **[MAJOR ENHANCEMENT]**: Migration from Maven to Gradle. Feature request is [#214](https://github.com/appium/java-client/issues/214). Fixes: [#442](https://github.com/appium/java-client/pull/442), [#465](https://github.com/appium/java-client/pull/465).

- **[MAJOR ENHANCEMENT]** **[MAJOR REFACTORING]**. Non-abstract **AppiumDriver** :

- **[MAJOR ENHANCEMENT]** Windows automation. Epic [#471](https://github.com/appium/java-client/issues/471)

- **[MAJOR ENHANCEMENT]** iOS XCUIT mode automation:

- [ENHANCEMENT] Added the ability to set UiAutomator Congfigurator values. [#410](https://github.com/appium/java-client/pull/410).  
[#477](https://github.com/appium/java-client/pull/477).

- [ENHANCEMENT]. Additional methods which perform device rotation were implemented. [#489](https://github.com/appium/java-client/pull/489). [#439](https://github.com/appium/java-client/pull/439). But it works for iOS in XCUIT mode and for Android in UIAutomator2 mode only. The feature request: [#7131](https://github.com/appium/appium/issues/7131)

- [ENHANCEMENT]. TouchID Implementation (iOS Sim Only). Details: [#509](https://github.com/appium/java-client/pull/509)

- [ENHANCEMENT]. The ability to use port, ip and log file as server arguments was provided. Feature request: [#521](https://github.com/appium/java-client/issues/521). Fixes: [#522](https://github.com/appium/java-client/issues/522), [#524](https://github.com/appium/java-client/issues/524).

- [ENHANCEMENT]. The new interface `io.appium.java_client.android.HasDeviceDetails` was added. It is implemented by `io.appium.java_client.android.AndroidDriver` by default. [#518](https://github.com/appium/java-client/pull/518)

- [ENHANCEMENT]. New touch actions were added. `io.appium.java_client.ios.IOSTouchAction#doubleTap(WebElement, int, int)` and `io.appium.java_client.ios.IOSTouchAction#doubleTap(WebElement)`. [#523](https://github.com/appium/java-client/pull/523), [#444](https://github.com/appium/java-client/pull/444)

- [ENHANCEMENT]. All constructors declared by `io.appium.java_client.AppiumDriver` are public now.

- [BUG FIX]: There was the issue when “@WithTimeout” was changing general timeout of the waiting for elements. Bug report: [#467](https://github.com/appium/java-client/issues/467). Fixes: [#468](https://github.com/appium/java-client/issues/468), [#469](https://github.com/appium/java-client/issues/469), [#480](https://github.com/appium/java-client/issues/480). Read: [supported-settings](https://github.com/appium/appium/blob/master/docs/en/advanced-concepts/settings.md#supported-settings)

- Added the server flag `io.appium.java_client.service.local.flags.AndroidServerFlag#REBOOT`. [#476](https://github.com/appium/java-client/pull/476)

- Added `io.appium.java_client.remote.AndroidMobileCapabilityType.APP_WAIT_DURATION` capability. [#461](https://github.com/appium/java-client/pull/461)

- the new automation type `io.appium.java_client.remote.MobilePlatform#ANDROID_UIAUTOMATOR2` was add.

- the new automation type `io.appium.java_client.remote.MobilePlatform#YOUI_ENGINE` was add.

- Additional capabilities were addede:

- **[UPDATE]** to Selenium 3.0.1.

- **[UPDATE]** to Spring Framework 4.3.5.RELEASE.

- **[UPDATE]** to AspectJ weaver 1.8.10.

Let’s suppose it New Year release. 🎄

---

<div class="post-metadata">

**Author:** ![SergeyTichomirov](https://discuss.appium.io/user_avatar/discuss.appium.io/sergeytichomirov/32/5175_2.png) [@SergeyTichomirov](https://discuss.appium.io/u/SergeyTichomirov)\
**Post date:** [December 29, 2016, 12:12pm UTC](https://discuss.appium.io/t/java-client-5-0-0-beta1-released/13984/2 "2016-12-29T12:12:40Z")

</div>



---

<div class="post-metadata">

**Author:** ![SergeyTichomirov](https://discuss.appium.io/user_avatar/discuss.appium.io/sergeytichomirov/32/5175_2.png) [@SergeyTichomirov](https://discuss.appium.io/u/SergeyTichomirov)\
**Post date:** [December 29, 2016, 12:20pm UTC](https://discuss.appium.io/t/java-client-5-0-0-beta1-released/13984/3 "2016-12-29T12:20:56Z")

</div>

Also [WIKI](https://github.com/appium/java-client/wiki) was updated.

---

<div class="post-metadata">

**Author:** ![amitjaincoer191](https://discuss.appium.io/user_avatar/discuss.appium.io/amitjaincoer191/32/5339_2.png) [@amitjaincoer191](https://discuss.appium.io/u/amitjaincoer191)\
**Post date:** [December 30, 2016, 10:56am UTC](https://discuss.appium.io/t/java-client-5-0-0-beta1-released/13984/4 "2016-12-30T10:56:02Z")

</div>

Please confirm that with below enhancement we cannot get our javaclient jar using maven repo and  
**_it is mandatory to use Gradle project instead of MAVEN ?_**

[MAJOR ENHANCEMENT]: Migration from Maven to Gradle. Feature request is #214. Fixes: #442, #465.

---

<div class="post-metadata">

**Author:** ![SergeyTichomirov](https://discuss.appium.io/user_avatar/discuss.appium.io/sergeytichomirov/32/5175_2.png) [@SergeyTichomirov](https://discuss.appium.io/u/SergeyTichomirov)\
**Post date:** [December 30, 2016, 1:17pm UTC](https://discuss.appium.io/t/java-client-5-0-0-beta1-released/13984/5 "2016-12-30T13:17:00Z")

</div>

No. Maven is/will be available further. There is the [install instruction](https://github.com/appium/java-client/blob/master/docs/Installing-the-project.md). It is uploaded to maven central

---

<div class="post-metadata">

**Author:** ![Telmo\_Cardoso](https://discuss.appium.io/user_avatar/discuss.appium.io/telmo_cardoso/32/1435_2.png) [@Telmo\_Cardoso](https://discuss.appium.io/u/Telmo_Cardoso)\
**Post date:** [January 20, 2017, 8:39am UTC](https://discuss.appium.io/t/java-client-5-0-0-beta1-released/13984/6 "2017-01-20T08:39:59Z")

</div>

Hi @SergeyTichomirov if we will deprecate swipe, I guess we will have to use TouchActions to replace it.

But moveTo() does not have any duration parameter, so how will we control the quickness or the swipe?

Thanks

---

<div class="post-metadata">

**Author:** ![SergeyTichomirov](https://discuss.appium.io/user_avatar/discuss.appium.io/sergeytichomirov/32/5175_2.png) [@SergeyTichomirov](https://discuss.appium.io/u/SergeyTichomirov)\
**Post date:** [January 20, 2017, 9:20am UTC](https://discuss.appium.io/t/java-client-5-0-0-beta1-released/13984/7 "2017-01-20T09:20:56Z")

</div>

@Telmo_Cardoso  
Hi. Duration is controlled by the `wait` action. The swiping looks like the sample below

`.press(params).waitAction(params).moveTo(params).release()`. Sоme variations are possible there. It depends on user’s application under the testing.

We marked methods like `swipe` deprecated because they are not robust, however our tests pass (!!!). We have no explanation why does that happen. Even I have found some cases when these methods were not working (with another apps) but were working another touch actions which I made up (but there were similar).

But it is not necessary to use TouchActions as they are. Please take a look at this article:  
[https://github.com/appium/java-client/blob/master/docs/Functions.md](https://github.com/appium/java-client/blob/master/docs/Functions.md)

---

<div class="post-metadata">

**Author:** ![Telmo\_Cardoso](https://discuss.appium.io/user_avatar/discuss.appium.io/telmo_cardoso/32/1435_2.png) [@Telmo\_Cardoso](https://discuss.appium.io/u/Telmo_Cardoso)\
**Post date:** [January 20, 2017, 10:34am UTC](https://discuss.appium.io/t/java-client-5-0-0-beta1-released/13984/8 "2017-01-20T10:34:12Z")

</div>

Hi,

thanks for the quick reply.

But wont .press(params).waitAction(params).moveTo(params).release(). do exactly that. It presses, then waits for X time, then moves and waits for X time. Instead of a swipe with some duration for the movement of swipe itself?

Also, probably even more importantly, when doing the first press command it normally activates the long press action sheet (if there is one) and then swipe fails.

---

<div class="post-metadata">

**Author:** ![SergeyTichomirov](https://discuss.appium.io/user_avatar/discuss.appium.io/sergeytichomirov/32/5175_2.png) [@SergeyTichomirov](https://discuss.appium.io/u/SergeyTichomirov)\
**Post date:** [January 21, 2017, 10:00pm UTC](https://discuss.appium.io/t/java-client-5-0-0-beta1-released/13984/9 "2017-01-21T22:00:05Z")

</div>

So your reply is the answer to the question why the swiping and other “hardcoded” gestures as the are now are deprecated

> <https://github.com/appium/java-client/blob/master/src/main/java/io/appium/java_client/android/AndroidDriver.java#L159>

  

> <https://github.com/appium/java-client/blob/master/src/main/java/io/appium/java_client/ios/IOSDriver.java#L161>

There many possible ways to perform the same gesture (using parameters, some intermediate actions etc). So we decided to make users able to make up something that convenient to their projects.

---

<div class="post-metadata">

**Author:** ![Telmo\_Cardoso](https://discuss.appium.io/user_avatar/discuss.appium.io/telmo_cardoso/32/1435_2.png) [@Telmo\_Cardoso](https://discuss.appium.io/u/Telmo_Cardoso)\
**Post date:** [January 21, 2017, 11:25pm UTC](https://discuss.appium.io/t/java-client-5-0-0-beta1-released/13984/10 "2017-01-21T23:25:22Z")

</div>

Thanks for clarification.

I’v seen my error 🙂 I was using debug mode to evaluate code. And so I would instantiate the ta = new TouchAction() and then evaluate it just changing the press(), waitAction() and moveTo() parameters in Evaluate Expression of Intelij… And in order for gesture to work properly TouchAction needs to be instantiated every time.

So basically it is as if I was doing this:

```
TouchAction ta = new TouchAction(driver);
ta.press(350, 900).waitAction(3000).moveTo(350, 200).release().perform();
ta.press(350, 900).waitAction(3000).moveTo(350, 200).release().perform();
ta.press(350, 900).waitAction(3000).moveTo(350, 200).release().perform();

```

😓 my bad. The first one, swipes, the others will just do a long press on element.

---

<div class="post-metadata">

**Author:** ![SergeyTichomirov](https://discuss.appium.io/user_avatar/discuss.appium.io/sergeytichomirov/32/5175_2.png) [@SergeyTichomirov](https://discuss.appium.io/u/SergeyTichomirov)\
**Post date:** [January 22, 2017, 6:54pm UTC](https://discuss.appium.io/t/java-client-5-0-0-beta1-released/13984/11 "2017-01-22T18:54:25Z")

</div>

Yes. We understand that there is some inconvenience. So that 's why we add the supplier. We suppose that this was user may create their own gesture library

> <https://github.com/appium/java-client/blob/master/docs/Functions.md#touch-action-supplier>

---

<div class="post-metadata">

**Author:** ![Aleksei](https://discuss.appium.io/user_avatar/discuss.appium.io/aleksei/32/6267_2.png) [@Aleksei](https://discuss.appium.io/u/Aleksei)\
**Post date:** [January 23, 2017, 1:04pm UTC](https://discuss.appium.io/t/java-client-5-0-0-beta1-released/13984/12 "2017-01-23T13:04:48Z")

</div>

tried to change duration time of waitAction - but it has zero effect of scroll speed (iOS). just wonder if it ever worked…

---

<div class="post-metadata">

**Author:** ![pengboZheng](https://discuss.appium.io/letter_avatar_proxy/v4/letter/p/a698b9/32.png) [@pengboZheng](https://discuss.appium.io/u/pengboZheng)\
**Post date:** [January 25, 2017, 8:48pm UTC](https://discuss.appium.io/t/java-client-5-0-0-beta1-released/13984/13 "2017-01-25T20:48:55Z")

</div>

startX = 188  
startY = 86  
endX = 94  
endY = 86  
xOffset = endX - startX // result: -94  
yOffset = endY - startY // result: 0  
With swipe  
`driver.swipe(startX, startY, xOffset, yOffset, 800);`  
will move the element to left.(Works just fine)  
Please see [Server log](https://gist.github.com/pb-z/b39faf4aced605f771163f0db1d42850) for `swipe`

But with `TouchAction` like below:  
`new TouchAction(driver).press(startX, startY).waitAction(800).moveTo(xOffset, yOffset).release().perform();`  
will only do long press.  
Please see [Server log](https://gist.github.com/pb-z/a962e1a7aedf8de6f21195e4e1d27edf) for `TouchAction`

Compare the server logs from **driver.swipe** and **TouchAction** you can see:  
**In driver.swipe:**  
`{"fromX":188,"fromY":86,"toX":-94,"toY":0,"duration":0.8}`  
But in the **TouchAction** will post like:  
`{"fromX":188,"fromY":86,"toX":94,"toY":0,"duration":0.8}`  
which **toX** is positive instead of negative in **TouchAction**

Could anyone help to explain what is the reason that cause the different output please? And how to fix it? Thanks

---

<div class="post-metadata">

**Author:** ![Aleksei](https://discuss.appium.io/user_avatar/discuss.appium.io/aleksei/32/6267_2.png) [@Aleksei](https://discuss.appium.io/u/Aleksei)\
**Post date:** [January 25, 2017, 10:15pm UTC](https://discuss.appium.io/t/java-client-5-0-0-beta1-released/13984/14 "2017-01-25T22:15:33Z")

</div>

MoveTo just absolute :-). if you see in source:

iOSDriver:

> ```
> @Override public void swipe(int startx, int starty, int endx, int endy, int duration) {
> int xOffset = endx - startx;
> int yOffset = endy - starty;
> new TouchAction(this).press(startx, starty).waitAction(duration).moveTo(xOffset, yOffset).release().perform();
> }
> 
> ```

AndroidDriver:

> ```
> @Override public void swipe(int startx, int starty, int endx, int endy, int duration) {
> new TouchAction(this).press(startx, starty).waitAction(duration).moveTo(endx, endy).release().perform();
> }
> 
> ```

---

<div class="post-metadata">

**Author:** ![SergeyTichomirov](https://discuss.appium.io/user_avatar/discuss.appium.io/sergeytichomirov/32/5175_2.png) [@SergeyTichomirov](https://discuss.appium.io/u/SergeyTichomirov)\
**Post date:** [January 26, 2017, 10:46am UTC](https://discuss.appium.io/t/java-client-5-0-0-beta1-released/13984/15 "2017-01-26T10:46:24Z")

</div>

@Aleksei

There is the server side bug

> <https://github.com/appium/appium/issues/7486>

---

<div class="post-metadata">

**Author:** ![pengboZheng](https://discuss.appium.io/letter_avatar_proxy/v4/letter/p/a698b9/32.png) [@pengboZheng](https://discuss.appium.io/u/pengboZheng)\
**Post date:** [January 26, 2017, 2:49pm UTC](https://discuss.appium.io/t/java-client-5-0-0-beta1-released/13984/16 "2017-01-26T14:49:54Z")

</div>

I passed absolute number like  
new TouchAction(driver).press(startX, startY).waitAction(800).moveTo(-282, yOffset).release().perform();  
And Even the server log is correct:

> [debug] [JSONWP Proxy] Proxying [POST /uiaTarget/0/dragfromtoforduration] to [POST [http://localhost:8100/session/48CA2A14-86C2-42EE-A1EE-D9CE8342C7CF/uiaTarget/0/dragfromtoforduration](http://localhost:8100/session/48CA2A14-86C2-42EE-A1EE-D9CE8342C7CF/uiaTarget/0/dragfromtoforduration)] with body: {“fromX”:188,“fromY”:86,“toX”:-94,“toY”:86,“duration”:0.8}  
> [debug] [JSONWP Proxy] Got response with status 200: {“value”:{},“sessionId”:“48CA2A14-86C2-42EE-A1EE-D9CE8342C7CF”,“status”:0}  
> [debug] [MJSONWP] Responding to client with driver.performTouch() result: {}  
> [HTTP] ← POST /wd/hub/session/36e0659b-a1bb-4927-9f14-51e064bea580/touch/perform 200 2247 ms - 74

But the actual Action in simulator still showing longpress instead of swipe to left see the gif please:  
 ![](https://discuss.appium.io/uploads/default/original/2X/e/e6fb601429a79d1a35c4473e35e6064f29435bff.gif)

---

<div class="post-metadata">

**Author:** ![Rashmi](https://discuss.appium.io/letter_avatar_proxy/v4/letter/r/82dd89/32.png) [@Rashmi](https://discuss.appium.io/u/Rashmi)\
**Post date:** [February 9, 2017, 5:14am UTC](https://discuss.appium.io/t/java-client-5-0-0-beta1-released/13984/17 "2017-02-09T05:14:22Z")

</div>

Hi…

Appium: 1.6.4 beta  
Java-client 5.0.0-BETA1  
Device app automation:iOS 10.2

Hidekeyboad functionality not working. It doesn`t show any error but it doesn`t hide keyboard .

---

<div class="post-metadata">

**Author:** ![Styris](https://discuss.appium.io/user_avatar/discuss.appium.io/styris/32/5458_2.png) [@Styris](https://discuss.appium.io/u/Styris)\
**Post date:** [March 14, 2017, 12:16am UTC](https://discuss.appium.io/t/java-client-5-0-0-beta1-released/13984/19 "2017-03-14T00:16:33Z")

</div>

@SergeyTichomirov sorry am little confused. I currently use an Eclipse/Maven project. With 5.0.0 are we supposed to transition over to IntelliJ with Gradle?

Also first you took away srollTo(), and now you taking away swipe()? you are killing us brother 🙂  
Thanks.

---

<div class="post-metadata">

**Author:** ![menypeled](https://discuss.appium.io/user_avatar/discuss.appium.io/menypeled/32/97_2.png) [@menypeled](https://discuss.appium.io/u/menypeled)\
**Post date:** [September 6, 2017, 11:32am UTC](https://discuss.appium.io/t/java-client-5-0-0-beta1-released/13984/20 "2017-09-06T11:32:44Z")

</div>

Hi,

We are struggling with scroll & swipe after the swipe method deprecation in Java-Client 5.

Did you find a robust swipe/scroll solution?

Thanks…
