Swipe doesn't works

I want to produce vertical swipe. below is my code. It also not throwing exception or some error

public void swipe() {

  Dimension size = getDriver().manage().window().getSize();
  int startX = size.width/2;
  int endX = startX;
  int  startY = (int) (size.height * 0.8);
  int endY = (int) (size.height * 0.2);
  TouchAction t = new TouchAction ((PerformsTouchActions) getDriver()); 
  t.press(PointOption.point(startX, startY))
  	.moveTo(PointOption.point(endX, endY))


  1. If it is android then enable in developer menu show touches to see where exactly touch happen. Double check that you can swipe manually using same coordinates.
  2. Try also guide http://appium.io/docs/en/writing-running-appium/tutorial/swipe-tutorial/

thanks very much Aleksei

If you have any problem with swipe guide -> let me know and I will update

Alekesi I read some solutions on your link and it helped me. thanks one more time. now I have a different problem, I cant clear text fields on IOS using .clear() methods. oh god why everything is problem and challenge in Appium

well. problem not in Appium. Appium just uses what android or ios instruments allow. so often problem is android/ios limitations or differences.

e.g. clear of password field may not work correctly. Appium just translate clear command to native XCUITest command for ios.

sometime it is needed tap into input field first. try it.

third double check that you really do clear on input element!

all fails -> show a bit page source of field you trying to clear with code how you find element.

I am in the field at that time when I am trying to use clear(); but nothing. I also tried
element.sendKeys( Keys . COMMAND , “a”);
element.sendKeys( Keys . DELETE );
and also
element.sendKeys( Keys . CONTROL , “a”);
element.sendKeys( Keys . BACKSPACE);

but it is not selecting the whole value that is in the field, its entering some emojis from Ios.

P.S KEY.BACKSPACE AND KEY.DELETE WORKS , but deletes only one char from field. :frowning: