I am trying to answer an android incoming call using Appium but no luck. Swipe gestures does not work here.
DesiredCapabilities cap_1 = new DesiredCapabilities();
cap_1.setCapability("appium:deviceName","Galaxy A15 5G");
cap_1.setCapability("platformName","Android");
cap_1.setCapability("appium:platformVersion","14");
cap_1.setCapability("browserName","Android");
cap_1.setCapability("appium:udid","MYUDID");
cap_1.setCapability("appium:automationName",
"UiAutomator2");
URL url = new URL("http://127.0.0.1:4723/wd/hub");
WebElement element = driver_mb1.findElement(By.xpath("//android.view.ViewGroup[@resource-id="com.samsung.android.incallui:id/accept_button_in_3_way"]"));
driver_mb1 = new AppiumDriver(url,cap_1);
JavascriptExecutor js = (JavascriptExecutor) driver_mb1;
Map<String, Object> params = new HashMap<>();
params.put("elementId",element);
params.put("direction","left");
params.put("percent",0.75);
js.executeScript("mobile:swipeGesture",params);